From 4fee4e2c7999a84a989d4003db4ab14896cc898d Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 29 Oct 2019 10:06:15 +0100 Subject: [PATCH] remove cell_call_with_current_continuation --- include/mes/symbols.h | 11 +++++------ src/eval-apply.c | 19 +++++++++++-------- src/symbol.c | 2 -- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/mes/symbols.h b/include/mes/symbols.h index d97700c0..6311c64f 100644 --- a/include/mes/symbols.h +++ b/include/mes/symbols.h @@ -30,7 +30,7 @@ SCM cell_undefined; SCM cell_unspecified; SCM cell_closure; SCM cell_circular; -SCM cell_call_with_current_continuation; + SCM cell_vm_apply; SCM cell_vm_apply2; SCM cell_vm_begin; @@ -42,7 +42,6 @@ SCM cell_vm_begin_expand_primitive_load; SCM cell_vm_begin_primitive_load; SCM cell_vm_begin_read_input_file; SCM cell_vm_call_with_current_continuation2; - SCM cell_vm_call_with_values2; SCM cell_vm_eval; SCM cell_vm_eval2; @@ -138,14 +137,14 @@ SCM cell_type_broken_heart; SCM cell_symbol_program; SCM cell_symbol_test; -// CONSTANT SYMBOL_MAX 115 -#define SYMBOL_MAX 115 +// CONSTANT SYMBOL_MAX 114 +#define SYMBOL_MAX 114 // CONSTANT CELL_UNSPECIFIED 7 #define CELL_UNSPECIFIED 7 -// CONSTANT CELL_SYMBOL_RECORD_TYPE 83 -#define CELL_SYMBOL_RECORD_TYPE 83 +// CONSTANT CELL_SYMBOL_RECORD_TYPE 82 +#define CELL_SYMBOL_RECORD_TYPE 82 #endif /* __MES_SYMBOLS_H */ diff --git a/src/eval-apply.c b/src/eval-apply.c index 0f5ec060..d5ba8cbf 100644 --- a/src/eval-apply.c +++ b/src/eval-apply.c @@ -520,27 +520,28 @@ apply: push_cc (cons (CADR (R1), cell_nil), R1, CADDR (R1), cell_vm_return); goto begin_expand; } - else if (c == cell_call_with_current_continuation) - { - R1 = CDR (R1); - goto call_with_current_continuation; - } else check_apply (cell_f, CAR (R1)); } else if (t == TSYMBOL) { - if (CAR (R1) == cell_symbol_call_with_values) + c = CAR (R1); + if (c == cell_symbol_call_with_current_continuation) + { + R1 = CDR (R1); + goto call_with_current_continuation; + } + if (c == cell_symbol_call_with_values) { R1 = CDR (R1); goto call_with_values; } - if (CAR (R1) == cell_symbol_current_module) + if (c == cell_symbol_current_module) { R1 = R0; goto vm_return; } - if (CAR (R1) == cell_symbol_boot_module) + if (c == cell_symbol_boot_module) { R1 = M0; goto vm_return; @@ -724,6 +725,8 @@ eval: goto vm_return; if (R1 == cell_symbol_begin) goto vm_return; + if (R1 == cell_symbol_call_with_current_continuation) + goto vm_return; R1 = assert_defined (R1, module_ref (R0, R1)); goto vm_return; } diff --git a/src/symbol.c b/src/symbol.c index 01d526fb..c2332839 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -68,7 +68,6 @@ init_symbols_ () /*:((internal)) */ cell_unspecified = init_symbol (g_symbol, TSPECIAL, "*unspecified*"); cell_closure = init_symbol (g_symbol, TSPECIAL, "*closure*"); cell_circular = init_symbol (g_symbol, TSPECIAL, "*circular*"); - cell_call_with_current_continuation = init_symbol (g_symbol, TSPECIAL, "*call/cc*"); cell_vm_apply = init_symbol (g_symbol, TSPECIAL, "core:apply"); cell_vm_apply2 = init_symbol (g_symbol, TSPECIAL, "*vm-apply2*"); @@ -211,7 +210,6 @@ init_symbols () /*:((internal)) */ a = acons (cell_symbol_call_with_values, cell_symbol_call_with_values, a); a = acons (cell_symbol_boot_module, cell_symbol_boot_module, a); a = acons (cell_symbol_current_module, cell_symbol_current_module, a); - a = acons (cell_symbol_call_with_current_continuation, cell_call_with_current_continuation, a); a = acons (cell_symbol_mes_version, make_string0 (MES_VERSION), a); a = acons (cell_symbol_mes_datadir, make_string0 (g_datadir), a);