diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-08-23 22:08:16 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-08-23 22:08:16 +0200 |
| commit | 33bab281e27cf866e77fb3bba6e37f5a5edfef03 (patch) | |
| tree | 8332298257ccabe511efbc6deeec0de25672fe10 /src/qreg-commands.c | |
| parent | 6aa97a68a85b83267de597bfb30b70c04b7de97b (diff) | |
Revert "optimize main state machine transitions with tail calls"HEADmaster-fmsbw-cimaster
For yet unknown reasons this does not improve performance on GCC 16
even though it also supports `__attribute__((musttail))`.
As long as I do not understand why, I don't want to risk any
unnecessary problems. I have reason to believe that the tail-call
optimized version still has subtle bugs.
See also the "tail-calls" branch.
This reverts commit 2e097cec409182c3cb39b74489387480bf8a278f.
Diffstat (limited to 'src/qreg-commands.c')
| -rw-r--r-- | src/qreg-commands.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qreg-commands.c b/src/qreg-commands.c index d7b0a10..a6390a1 100644 --- a/src/qreg-commands.c +++ b/src/qreg-commands.c @@ -62,7 +62,7 @@ teco_state_expectqreg_input(teco_machine_main_t *ctx, gunichar chr, GError **err case TECO_MACHINE_QREGSPEC_ERROR: return NULL; case TECO_MACHINE_QREGSPEC_MORE: - TECO_RETURN(ctx, current, error); + return current; case TECO_MACHINE_QREGSPEC_DONE: break; } @@ -72,8 +72,7 @@ teco_state_expectqreg_input(teco_machine_main_t *ctx, gunichar chr, GError **err * states. This means, it must usually be reset manually in got_register_cb() via: * teco_state_expectqreg_reset(ctx); */ - teco_state_t *next = current->expectqreg.got_register_cb(ctx, qreg, table, error); - TECO_RETURN(ctx, next, error); + return current->expectqreg.got_register_cb(ctx, qreg, table, error); } static teco_state_t * |
