aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/stdio-commands.c
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-08-23 22:08:16 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-08-23 22:08:16 +0200
commit33bab281e27cf866e77fb3bba6e37f5a5edfef03 (patch)
tree8332298257ccabe511efbc6deeec0de25672fe10 /src/stdio-commands.c
parent6aa97a68a85b83267de597bfb30b70c04b7de97b (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/stdio-commands.c')
-rw-r--r--src/stdio-commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdio-commands.c b/src/stdio-commands.c
index 94da3c7..34179c3 100644
--- a/src/stdio-commands.c
+++ b/src/stdio-commands.c
@@ -139,7 +139,7 @@ static teco_state_t *
teco_state_print_decimal_input(teco_machine_main_t *ctx, gunichar chr, GError **error)
{
if (chr == '=')
- TECO_RETURN(ctx, &teco_state_print_octal, error);
+ return &teco_state_print_octal;
if (ctx->flags.mode == TECO_MODE_NORMAL) {
if (G_LIKELY(!is_executing) && !teco_print(ctx, 10, error))
@@ -197,7 +197,7 @@ teco_state_print_octal_input(teco_machine_main_t *ctx, gunichar chr, GError **er
return NULL;
teco_expressions_pop_num(0);
}
- TECO_RETURN(ctx, &teco_state_start, error);
+ return &teco_state_start;
}
if (ctx->flags.mode == TECO_MODE_NORMAL) {