From c6fd15469cbcb9c75ff175be0d921988b6ced4a8 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 18 Aug 2020 10:40:55 +0200 Subject: [PATCH] core: Remove cell_begin special. * include/mes/symbols.h (cell_begin): Remove. * src/eval-apply.c (eval_apply): Update to use cell_symbol_begin. * src/symbol.c (init_symbols_): Remove initialization. --- include/mes/symbols.h | 10 +++++----- src/eval-apply.c | 5 +---- src/symbol.c | 2 -- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/include/mes/symbols.h b/include/mes/symbols.h index c1e115a0..d97700c0 100644 --- a/include/mes/symbols.h +++ b/include/mes/symbols.h @@ -30,7 +30,6 @@ SCM cell_undefined; SCM cell_unspecified; SCM cell_closure; SCM cell_circular; -SCM cell_begin; SCM cell_call_with_current_continuation; SCM cell_vm_apply; SCM cell_vm_apply2; @@ -43,6 +42,7 @@ 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 +138,14 @@ SCM cell_type_broken_heart; SCM cell_symbol_program; SCM cell_symbol_test; -// CONSTANT SYMBOL_MAX 116 -#define SYMBOL_MAX 116 +// CONSTANT SYMBOL_MAX 115 +#define SYMBOL_MAX 115 // CONSTANT CELL_UNSPECIFIED 7 #define CELL_UNSPECIFIED 7 -// CONSTANT CELL_SYMBOL_RECORD_TYPE 84 -#define CELL_SYMBOL_RECORD_TYPE 84 +// CONSTANT CELL_SYMBOL_RECORD_TYPE 83 +#define CELL_SYMBOL_RECORD_TYPE 83 #endif /* __MES_SYMBOLS_H */ diff --git a/src/eval-apply.c b/src/eval-apply.c index e0413377..7bc15ce1 100644 --- a/src/eval-apply.c +++ b/src/eval-apply.c @@ -723,10 +723,7 @@ eval: if (R1 == cell_symbol_current_module) goto vm_return; if (R1 == cell_symbol_begin) - { - R1 = cell_begin; - goto vm_return; - } + 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 b747644d..f3466d06 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -70,10 +70,8 @@ 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_begin = init_symbol (g_symbol, TSPECIAL, "*begin*"); 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*"); cell_vm_begin = init_symbol (g_symbol, TSPECIAL, "*vm-begin*");