core: Create symbols dynamically.

* include/mes/symbols.h: New file.
* include/mes/mes.hh: Include it.
* include/mes/constants.h: Remove symbol constants.
* src/symbols.c (init_symbols): Create symbols dynamically.
* build-aux/mes-snarf.scm (snarf-symbols): Update.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-06-16 15:59:26 +02:00
parent 94e40691ba
commit 4613b070e4
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
5 changed files with 278 additions and 379 deletions

View file

@ -124,11 +124,11 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
(define (snarf-symbols string) (define (snarf-symbols string)
(let* ((lines (string-split string #\newline)) (let* ((lines (string-split string #\newline))
(symbols (filter (cut string-prefix? " init_symbol (" <>) lines))) (symbols (filter (cut string-contains <> " = init_symbol (") lines)))
(define (line->symbol line) (define (line->symbol line)
((compose ((compose
(lambda (s) (string-take s (string-index s #\,))) string-trim-both
(cut string-drop <> (string-length " init_symbol ("))) (lambda (s) (string-take s (string-index s #\=))))
line)) line))
(map line->symbol symbols))) (map line->symbol symbols)))

View file

@ -21,246 +21,6 @@
#ifndef __MES_CONSTANTS_H #ifndef __MES_CONSTANTS_H
#define __MES_CONSTANTS_H #define __MES_CONSTANTS_H
/* Symbols */
/* src/mes.c */
// CONSTANT cell_nil 1
#define cell_nil 1
// CONSTANT cell_f 2
#define cell_f 2
// CONSTANT cell_t 3
#define cell_t 3
// CONSTANT cell_dot 4
#define cell_dot 4
// CONSTANT cell_arrow 5
#define cell_arrow 5
// CONSTANT cell_undefined 6
#define cell_undefined 6
// CONSTANT cell_unspecified 7
#define cell_unspecified 7
// CONSTANT cell_closure 8
#define cell_closure 8
// CONSTANT cell_circular 9
#define cell_circular 9
// CONSTANT cell_begin 10
#define cell_begin 10
// CONSTANT cell_call_with_current_continuation 11
#define cell_call_with_current_continuation 11
// CONSTANT cell_vm_apply 12
#define cell_vm_apply 12
// CONSTANT cell_vm_apply2 13
#define cell_vm_apply2 13
// CONSTANT cell_vm_begin 14
#define cell_vm_begin 14
// CONSTANT cell_vm_begin_eval 15
#define cell_vm_begin_eval 15
// CONSTANT cell_vm_begin_expand 16
#define cell_vm_begin_expand 16
// CONSTANT cell_vm_begin_expand_eval 17
#define cell_vm_begin_expand_eval 17
// CONSTANT cell_vm_begin_expand_macro 18
#define cell_vm_begin_expand_macro 18
// CONSTANT cell_vm_begin_expand_primitive_load 19
#define cell_vm_begin_expand_primitive_load 19
// CONSTANT cell_vm_begin_primitive_load 20
#define cell_vm_begin_primitive_load 20
// CONSTANT cell_vm_begin_read_input_file 21
#define cell_vm_begin_read_input_file 21
// CONSTANT cell_vm_call_with_current_continuation2 22
#define cell_vm_call_with_current_continuation2 22
// CONSTANT cell_vm_call_with_values2 23
#define cell_vm_call_with_values2 23
// CONSTANT cell_vm_eval 24
#define cell_vm_eval 24
// CONSTANT cell_vm_eval2 25
#define cell_vm_eval2 25
// CONSTANT cell_vm_eval_check_func 26
#define cell_vm_eval_check_func 26
// CONSTANT cell_vm_eval_define 27
#define cell_vm_eval_define 27
// CONSTANT cell_vm_eval_macro_expand_eval 28
#define cell_vm_eval_macro_expand_eval 28
// CONSTANT cell_vm_eval_macro_expand_expand 29
#define cell_vm_eval_macro_expand_expand 29
// CONSTANT cell_vm_eval_pmatch_car 30
#define cell_vm_eval_pmatch_car 30
// CONSTANT cell_vm_eval_pmatch_cdr 31
#define cell_vm_eval_pmatch_cdr 31
// CONSTANT cell_vm_eval_set_x 32
#define cell_vm_eval_set_x 32
// CONSTANT cell_vm_evlis 33
#define cell_vm_evlis 33
// CONSTANT cell_vm_evlis2 34
#define cell_vm_evlis2 34
// CONSTANT cell_vm_evlis3 35
#define cell_vm_evlis3 35
// CONSTANT cell_vm_if 36
#define cell_vm_if 36
// CONSTANT cell_vm_if_expr 37
#define cell_vm_if_expr 37
// CONSTANT cell_vm_macro_expand 38
#define cell_vm_macro_expand 38
// CONSTANT cell_vm_macro_expand_car 39
#define cell_vm_macro_expand_car 39
// CONSTANT cell_vm_macro_expand_cdr 40
#define cell_vm_macro_expand_cdr 40
// CONSTANT cell_vm_macro_expand_define 41
#define cell_vm_macro_expand_define 41
// CONSTANT cell_vm_macro_expand_define_macro 42
#define cell_vm_macro_expand_define_macro 42
// CONSTANT cell_vm_macro_expand_lambda 43
#define cell_vm_macro_expand_lambda 43
// CONSTANT cell_vm_macro_expand_set_x 44
#define cell_vm_macro_expand_set_x 44
// CONSTANT cell_vm_return 45
#define cell_vm_return 45
// CONSTANT cell_symbol_dot 46
#define cell_symbol_dot 46
// CONSTANT cell_symbol_lambda 47
#define cell_symbol_lambda 47
// CONSTANT cell_symbol_begin 48
#define cell_symbol_begin 48
// CONSTANT cell_symbol_if 49
#define cell_symbol_if 49
// CONSTANT cell_symbol_quote 50
#define cell_symbol_quote 50
// CONSTANT cell_symbol_define 51
#define cell_symbol_define 51
// CONSTANT cell_symbol_define_macro 52
#define cell_symbol_define_macro 52
// CONSTANT cell_symbol_quasiquote 53
#define cell_symbol_quasiquote 53
// CONSTANT cell_symbol_unquote 54
#define cell_symbol_unquote 54
// CONSTANT cell_symbol_unquote_splicing 55
#define cell_symbol_unquote_splicing 55
// CONSTANT cell_symbol_syntax 56
#define cell_symbol_syntax 56
// CONSTANT cell_symbol_quasisyntax 57
#define cell_symbol_quasisyntax 57
// CONSTANT cell_symbol_unsyntax 58
#define cell_symbol_unsyntax 58
// CONSTANT cell_symbol_unsyntax_splicing 59
#define cell_symbol_unsyntax_splicing 59
// CONSTANT cell_symbol_set_x 60
#define cell_symbol_set_x 60
// CONSTANT cell_symbol_sc_expand 61
#define cell_symbol_sc_expand 61
// CONSTANT cell_symbol_macro_expand 62
#define cell_symbol_macro_expand 62
// CONSTANT cell_symbol_portable_macro_expand 63
#define cell_symbol_portable_macro_expand 63
// CONSTANT cell_symbol_sc_expander_alist 64
#define cell_symbol_sc_expander_alist 64
// CONSTANT cell_symbol_call_with_values 65
#define cell_symbol_call_with_values 65
// CONSTANT cell_symbol_call_with_current_continuation 66
#define cell_symbol_call_with_current_continuation 66
// CONSTANT cell_symbol_boot_module 67
#define cell_symbol_boot_module 67
// CONSTANT cell_symbol_current_module 68
#define cell_symbol_current_module 68
// CONSTANT cell_symbol_primitive_load 69
#define cell_symbol_primitive_load 69
// CONSTANT cell_symbol_read_input_file 70
#define cell_symbol_read_input_file 70
// CONSTANT cell_symbol_write 71
#define cell_symbol_write 71
// CONSTANT cell_symbol_display 72
#define cell_symbol_display 72
// CONSTANT cell_symbol_car 73
#define cell_symbol_car 73
// CONSTANT cell_symbol_cdr 74
#define cell_symbol_cdr 74
// CONSTANT cell_symbol_not_a_number 75
#define cell_symbol_not_a_number 75
// CONSTANT cell_symbol_not_a_pair 76
#define cell_symbol_not_a_pair 76
// CONSTANT cell_symbol_system_error 77
#define cell_symbol_system_error 77
// CONSTANT cell_symbol_throw 78
#define cell_symbol_throw 78
// CONSTANT cell_symbol_unbound_variable 79
#define cell_symbol_unbound_variable 79
// CONSTANT cell_symbol_wrong_number_of_args 80
#define cell_symbol_wrong_number_of_args 80
// CONSTANT cell_symbol_wrong_type_arg 81
#define cell_symbol_wrong_type_arg 81
// CONSTANT cell_symbol_buckets 82
#define cell_symbol_buckets 82
// CONSTANT cell_symbol_builtin 83
#define cell_symbol_builtin 83
// CONSTANT cell_symbol_frame 84
#define cell_symbol_frame 84
// CONSTANT cell_symbol_hashq_table 85
#define cell_symbol_hashq_table 85
// CONSTANT cell_symbol_module 86
#define cell_symbol_module 86
// CONSTANT cell_symbol_procedure 87
#define cell_symbol_procedure 87
// CONSTANT cell_symbol_record_type 88
#define cell_symbol_record_type 88
// CONSTANT cell_symbol_size 89
#define cell_symbol_size 89
// CONSTANT cell_symbol_stack 90
#define cell_symbol_stack 90
// CONSTANT cell_symbol_argv 91
#define cell_symbol_argv 91
// CONSTANT cell_symbol_mes_datadir 92
#define cell_symbol_mes_datadir 92
// CONSTANT cell_symbol_mes_version 93
#define cell_symbol_mes_version 93
// CONSTANT cell_symbol_internal_time_units_per_second 94
#define cell_symbol_internal_time_units_per_second 94
// CONSTANT cell_symbol_compiler 95
#define cell_symbol_compiler 95
// CONSTANT cell_symbol_arch 96
#define cell_symbol_arch 96
// CONSTANT cell_symbol_pmatch_car 97
#define cell_symbol_pmatch_car 97
// CONSTANT cell_symbol_pmatch_cdr 98
#define cell_symbol_pmatch_cdr 98
// CONSTANT cell_type_bytes 99
#define cell_type_bytes 99
// CONSTANT cell_type_char 100
#define cell_type_char 100
// CONSTANT cell_type_closure 101
#define cell_type_closure 101
// CONSTANT cell_type_continuation 102
#define cell_type_continuation 102
// CONSTANT cell_type_function 103
#define cell_type_function 103
// CONSTANT cell_type_keyword 104
#define cell_type_keyword 104
// CONSTANT cell_type_macro 105
#define cell_type_macro 105
// CONSTANT cell_type_number 106
#define cell_type_number 106
// CONSTANT cell_type_pair 107
#define cell_type_pair 107
// CONSTANT cell_type_port 108
#define cell_type_port 108
// CONSTANT cell_type_ref 109
#define cell_type_ref 109
// CONSTANT cell_type_special 110
#define cell_type_special 110
// CONSTANT cell_type_string 111
#define cell_type_string 111
// CONSTANT cell_type_struct 112
#define cell_type_struct 112
// CONSTANT cell_type_symbol 113
#define cell_type_symbol 113
// CONSTANT cell_type_values 114
#define cell_type_values 114
// CONSTANT cell_type_variable 115
#define cell_type_variable 115
// CONSTANT cell_type_vector 116
#define cell_type_vector 116
// CONSTANT cell_type_broken_heart 117
#define cell_type_broken_heart 117
// CONSTANT cell_symbol_test 118
#define cell_symbol_test 118
/* Cell types */ /* Cell types */
// CONSTANT TBYTES 0 // CONSTANT TBYTES 0

View file

@ -122,5 +122,6 @@ void assert_msg (int check, char *msg);
#include "mes/builtins.h" #include "mes/builtins.h"
#include "mes/constants.h" #include "mes/constants.h"
#include "mes/macros.h" #include "mes/macros.h"
#include "mes/symbols.h"
#endif /* __MES_MES_H */ #endif /* __MES_MES_H */

146
include/mes/symbols.h Normal file
View file

@ -0,0 +1,146 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU Mes is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or (at
* your option) any later version.
*
* GNU Mes is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MES_SYMBOLS_H
#define __MES_SYMBOLS_H
SCM cell_nil;
SCM cell_f;
SCM cell_t;
SCM cell_dot;
SCM cell_arrow;
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;
SCM cell_vm_begin;
SCM cell_vm_begin_eval;
SCM cell_vm_begin_expand;
SCM cell_vm_begin_expand_eval;
SCM cell_vm_begin_expand_macro;
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;
SCM cell_vm_eval_check_func;
SCM cell_vm_eval_define;
SCM cell_vm_eval_macro_expand_eval;
SCM cell_vm_eval_macro_expand_expand;
SCM cell_vm_eval_pmatch_car;
SCM cell_vm_eval_pmatch_cdr;
SCM cell_vm_eval_set_x;
SCM cell_vm_evlis;
SCM cell_vm_evlis2;
SCM cell_vm_evlis3;
SCM cell_vm_if;
SCM cell_vm_if_expr;
SCM cell_vm_macro_expand;
SCM cell_vm_macro_expand_car;
SCM cell_vm_macro_expand_cdr;
SCM cell_vm_macro_expand_define;
SCM cell_vm_macro_expand_define_macro;
SCM cell_vm_macro_expand_lambda;
SCM cell_vm_macro_expand_set_x;
SCM cell_vm_return;
SCM cell_symbol_dot;
SCM cell_symbol_lambda;
SCM cell_symbol_begin;
SCM cell_symbol_if;
SCM cell_symbol_quote;
SCM cell_symbol_define;
SCM cell_symbol_define_macro;
SCM cell_symbol_quasiquote;
SCM cell_symbol_unquote;
SCM cell_symbol_unquote_splicing;
SCM cell_symbol_syntax;
SCM cell_symbol_quasisyntax;
SCM cell_symbol_unsyntax;
SCM cell_symbol_unsyntax_splicing;
SCM cell_symbol_set_x;
SCM cell_symbol_sc_expand;
SCM cell_symbol_macro_expand;
SCM cell_symbol_portable_macro_expand;
SCM cell_symbol_sc_expander_alist;
SCM cell_symbol_call_with_values;
SCM cell_symbol_call_with_current_continuation;
SCM cell_symbol_boot_module;
SCM cell_symbol_current_module;
SCM cell_symbol_primitive_load;
SCM cell_symbol_read_input_file;
SCM cell_symbol_write;
SCM cell_symbol_display;
SCM cell_symbol_car;
SCM cell_symbol_cdr;
SCM cell_symbol_not_a_number;
SCM cell_symbol_not_a_pair;
SCM cell_symbol_system_error;
SCM cell_symbol_throw;
SCM cell_symbol_unbound_variable;
SCM cell_symbol_wrong_number_of_args;
SCM cell_symbol_wrong_type_arg;
SCM cell_symbol_buckets;
SCM cell_symbol_builtin;
SCM cell_symbol_frame;
SCM cell_symbol_hashq_table;
SCM cell_symbol_module;
SCM cell_symbol_procedure;
SCM cell_symbol_record_type;
SCM cell_symbol_size;
SCM cell_symbol_stack;
SCM cell_symbol_argv;
SCM cell_symbol_mes_datadir;
SCM cell_symbol_mes_version;
SCM cell_symbol_internal_time_units_per_second;
SCM cell_symbol_compiler;
SCM cell_symbol_arch;
SCM cell_symbol_pmatch_car;
SCM cell_symbol_pmatch_cdr;
SCM cell_type_bytes;
SCM cell_type_char;
SCM cell_type_closure;
SCM cell_type_continuation;
SCM cell_type_function;
SCM cell_type_keyword;
SCM cell_type_macro;
SCM cell_type_number;
SCM cell_type_pair;
SCM cell_type_port;
SCM cell_type_ref;
SCM cell_type_special;
SCM cell_type_string;
SCM cell_type_struct;
SCM cell_type_symbol;
SCM cell_type_values;
SCM cell_type_variable;
SCM cell_type_vector;
SCM cell_type_broken_heart;
SCM cell_symbol_test;
// CONSTANT SYMBOL_MAX 119
#define SYMBOL_MAX 119
#endif /* __MES_SYMBOLS_H */

View file

@ -23,8 +23,10 @@
#include <string.h> #include <string.h>
void long g_symbol;
init_symbol (long x, long type, char const *name)
SCM
init_symbol (SCM x, long type, char const *name)
{ {
TYPE (x) = type; TYPE (x) = type;
int length = strlen (name); int length = strlen (name);
@ -32,151 +34,141 @@ init_symbol (long x, long type, char const *name)
CAR (x) = length; CAR (x) = length;
CDR (x) = STRING (string); CDR (x) = STRING (string);
hash_set_x (g_symbols, string, x); hash_set_x (g_symbols, string, x);
g_symbol = g_symbol + 1;
return x;
} }
SCM SCM
init_symbols () /*:((internal)) */ init_symbols () /*:((internal)) */
{ {
g_free = cell_symbol_test + 1; g_free = SYMBOL_MAX + 1;
g_symbol_max = g_free; g_symbol_max = g_free;
g_symbols = make_hash_table_ (500); g_symbols = make_hash_table_ (500);
int size = VALUE (struct_ref_ (g_symbols, 3)); int size = VALUE (struct_ref_ (g_symbols, 3));
// Weird: m2-planet exits 67 here...[printing size = 100]
// if (size == 0) exit (66);
// if (!size) exit (67);
init_symbol (cell_nil, TSPECIAL, "()"); g_symbol = 1;
init_symbol (cell_f, TSPECIAL, "#f"); cell_nil = 1;
init_symbol (cell_t, TSPECIAL, "#t"); cell_nil = init_symbol (g_symbol, TSPECIAL, "()");
init_symbol (cell_dot, TSPECIAL, "."); cell_f = init_symbol (g_symbol, TSPECIAL, "#f");
init_symbol (cell_arrow, TSPECIAL, "=>"); cell_t = init_symbol (g_symbol, TSPECIAL, "#t");
init_symbol (cell_undefined, TSPECIAL, "*undefined*"); cell_dot = init_symbol (g_symbol, TSPECIAL, ".");
init_symbol (cell_unspecified, TSPECIAL, "*unspecified*"); cell_arrow = init_symbol (g_symbol, TSPECIAL, "=>");
init_symbol (cell_closure, TSPECIAL, "*closure*"); cell_undefined = init_symbol (g_symbol, TSPECIAL, "*undefined*");
init_symbol (cell_circular, TSPECIAL, "*circular*"); cell_unspecified = init_symbol (g_symbol, TSPECIAL, "*unspecified*");
init_symbol (cell_begin, TSPECIAL, "*begin*"); cell_closure = init_symbol (g_symbol, TSPECIAL, "*closure*");
init_symbol (cell_call_with_current_continuation, TSPECIAL, "*call/cc*"); 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*");
cell_vm_begin_eval = init_symbol (g_symbol, TSPECIAL, "*vm:begin-eval*");
cell_vm_begin_expand = init_symbol (g_symbol, TSPECIAL, "core:eval");
cell_vm_begin_expand_eval = init_symbol (g_symbol, TSPECIAL, "*vm:begin-expand-eval*");
cell_vm_begin_expand_macro = init_symbol (g_symbol, TSPECIAL, "*vm:begin-expand-macro*");
cell_vm_begin_expand_primitive_load = init_symbol (g_symbol, TSPECIAL, "*vm:core:begin-expand-primitive-load*");
cell_vm_begin_primitive_load = init_symbol (g_symbol, TSPECIAL, "*vm:core:begin-primitive-load*");
cell_vm_begin_read_input_file = init_symbol (g_symbol, TSPECIAL, "*vm-begin-read-input-file*");
cell_vm_call_with_current_continuation2 = init_symbol (g_symbol, TSPECIAL, "*vm-call-with-current-continuation2*");
cell_vm_call_with_values2 = init_symbol (g_symbol, TSPECIAL, "*vm-call-with-values2*");
cell_vm_eval = init_symbol (g_symbol, TSPECIAL, "core:eval-expanded");
cell_vm_eval2 = init_symbol (g_symbol, TSPECIAL, "*vm-eval2*");
cell_vm_eval_check_func = init_symbol (g_symbol, TSPECIAL, "*vm-eval-check-func*");
cell_vm_eval_define = init_symbol (g_symbol, TSPECIAL, "*vm-eval-define*");
cell_vm_eval_macro_expand_eval = init_symbol (g_symbol, TSPECIAL, "*vm:eval-macro-expand-eval*");
cell_vm_eval_macro_expand_expand = init_symbol (g_symbol, TSPECIAL, "*vm:eval-macro-expand-expand*");
cell_vm_eval_pmatch_car = init_symbol (g_symbol, TSPECIAL, "*vm-eval-pmatch-car*");
cell_vm_eval_pmatch_cdr = init_symbol (g_symbol, TSPECIAL, "*vm-eval-pmatch-cdr*");
cell_vm_eval_set_x = init_symbol (g_symbol, TSPECIAL, "*vm-eval-set!*");
cell_vm_evlis = init_symbol (g_symbol, TSPECIAL, "*vm-evlis*");
cell_vm_evlis2 = init_symbol (g_symbol, TSPECIAL, "*vm-evlis2*");
cell_vm_evlis3 = init_symbol (g_symbol, TSPECIAL, "*vm-evlis3*");
cell_vm_if = init_symbol (g_symbol, TSPECIAL, "*vm-if*");
cell_vm_if_expr = init_symbol (g_symbol, TSPECIAL, "*vm-if-expr*");
cell_vm_macro_expand = init_symbol (g_symbol, TSPECIAL, "core:macro-expand");
cell_vm_macro_expand_car = init_symbol (g_symbol, TSPECIAL, "*vm:core:macro-expand-car*");
cell_vm_macro_expand_cdr = init_symbol (g_symbol, TSPECIAL, "*vm:macro-expand-cdr*");
cell_vm_macro_expand_define = init_symbol (g_symbol, TSPECIAL, "*vm:core:macro-expand-define*");
cell_vm_macro_expand_define_macro = init_symbol (g_symbol, TSPECIAL, "*vm:core:macro-expand-define-macro*");
cell_vm_macro_expand_lambda = init_symbol (g_symbol, TSPECIAL, "*vm:core:macro-expand-lambda*");
cell_vm_macro_expand_set_x = init_symbol (g_symbol, TSPECIAL, "*vm:core:macro-expand-set!*");
cell_vm_return = init_symbol (g_symbol, TSPECIAL, "*vm-return*");
cell_symbol_dot = init_symbol (g_symbol, TSYMBOL, "*dot*");
cell_symbol_lambda = init_symbol (g_symbol, TSYMBOL, "lambda");
cell_symbol_begin = init_symbol (g_symbol, TSYMBOL, "begin");
cell_symbol_if = init_symbol (g_symbol, TSYMBOL, "if");
cell_symbol_quote = init_symbol (g_symbol, TSYMBOL, "quote");
cell_symbol_define = init_symbol (g_symbol, TSYMBOL, "define");
cell_symbol_define_macro = init_symbol (g_symbol, TSYMBOL, "define-macro");
cell_symbol_quasiquote = init_symbol (g_symbol, TSYMBOL, "quasiquote");
cell_symbol_unquote = init_symbol (g_symbol, TSYMBOL, "unquote");
cell_symbol_unquote_splicing = init_symbol (g_symbol, TSYMBOL, "unquote-splicing");
cell_symbol_syntax = init_symbol (g_symbol, TSYMBOL, "syntax");
cell_symbol_quasisyntax = init_symbol (g_symbol, TSYMBOL, "quasisyntax");
cell_symbol_unsyntax = init_symbol (g_symbol, TSYMBOL, "unsyntax");
cell_symbol_unsyntax_splicing = init_symbol (g_symbol, TSYMBOL, "unsyntax-splicing");
cell_symbol_set_x = init_symbol (g_symbol, TSYMBOL, "set!");
cell_symbol_sc_expand = init_symbol (g_symbol, TSYMBOL, "sc-expand");
cell_symbol_macro_expand = init_symbol (g_symbol, TSYMBOL, "macro-expand");
cell_symbol_portable_macro_expand = init_symbol (g_symbol, TSYMBOL, "portable-macro-expand");
cell_symbol_sc_expander_alist = init_symbol (g_symbol, TSYMBOL, "*sc-expander-alist*");
cell_symbol_call_with_values = init_symbol (g_symbol, TSYMBOL, "call-with-values");
cell_symbol_call_with_current_continuation = init_symbol (g_symbol, TSYMBOL, "call-with-current-continuation");
cell_symbol_boot_module = init_symbol (g_symbol, TSYMBOL, "boot-module");
cell_symbol_current_module = init_symbol (g_symbol, TSYMBOL, "current-module");
cell_symbol_primitive_load = init_symbol (g_symbol, TSYMBOL, "primitive-load");
cell_symbol_read_input_file = init_symbol (g_symbol, TSYMBOL, "read-input-file");
cell_symbol_write = init_symbol (g_symbol, TSYMBOL, "write");
cell_symbol_display = init_symbol (g_symbol, TSYMBOL, "display");
cell_symbol_car = init_symbol (g_symbol, TSYMBOL, "car");
cell_symbol_cdr = init_symbol (g_symbol, TSYMBOL, "cdr");
cell_symbol_not_a_number = init_symbol (g_symbol, TSYMBOL, "not-a-number");
cell_symbol_not_a_pair = init_symbol (g_symbol, TSYMBOL, "not-a-pair");
cell_symbol_system_error = init_symbol (g_symbol, TSYMBOL, "system-error");
cell_symbol_throw = init_symbol (g_symbol, TSYMBOL, "throw");
cell_symbol_unbound_variable = init_symbol (g_symbol, TSYMBOL, "unbound-variable");
cell_symbol_wrong_number_of_args = init_symbol (g_symbol, TSYMBOL, "wrong-number-of-args");
cell_symbol_wrong_type_arg = init_symbol (g_symbol, TSYMBOL, "wrong-type-arg");
cell_symbol_buckets = init_symbol (g_symbol, TSYMBOL, "buckets");
cell_symbol_builtin = init_symbol (g_symbol, TSYMBOL, "<builtin>");
cell_symbol_frame = init_symbol (g_symbol, TSYMBOL, "<frame>");
cell_symbol_hashq_table = init_symbol (g_symbol, TSYMBOL, "<hashq-table>");
cell_symbol_module = init_symbol (g_symbol, TSYMBOL, "<module>");
cell_symbol_procedure = init_symbol (g_symbol, TSYMBOL, "procedure");
cell_symbol_record_type = init_symbol (g_symbol, TSYMBOL, "<record-type>");
cell_symbol_size = init_symbol (g_symbol, TSYMBOL, "size");
cell_symbol_stack = init_symbol (g_symbol, TSYMBOL, "<stack>");
cell_symbol_argv = init_symbol (g_symbol, TSYMBOL, "%argv");
cell_symbol_mes_datadir = init_symbol (g_symbol, TSYMBOL, "%datadir");
cell_symbol_mes_version = init_symbol (g_symbol, TSYMBOL, "%version");
cell_symbol_internal_time_units_per_second = init_symbol (g_symbol, TSYMBOL, "internal-time-units-per-second");
cell_symbol_compiler = init_symbol (g_symbol, TSYMBOL, "%compiler");
cell_symbol_arch = init_symbol (g_symbol, TSYMBOL, "%arch");
cell_symbol_pmatch_car = init_symbol (g_symbol, TSYMBOL, "pmatch-car");
cell_symbol_pmatch_cdr = init_symbol (g_symbol, TSYMBOL, "pmatch-cdr");
cell_type_bytes = init_symbol (g_symbol, TSYMBOL, "<cell:bytes>");
cell_type_char = init_symbol (g_symbol, TSYMBOL, "<cell:char>");
cell_type_closure = init_symbol (g_symbol, TSYMBOL, "<cell:closure>");
cell_type_continuation = init_symbol (g_symbol, TSYMBOL, "<cell:continuation>");
cell_type_function = init_symbol (g_symbol, TSYMBOL, "<cell:function>");
cell_type_keyword = init_symbol (g_symbol, TSYMBOL, "<cell:keyword>");
cell_type_macro = init_symbol (g_symbol, TSYMBOL, "<cell:macro>");
cell_type_number = init_symbol (g_symbol, TSYMBOL, "<cell:number>");
cell_type_pair = init_symbol (g_symbol, TSYMBOL, "<cell:pair>");
cell_type_port = init_symbol (g_symbol, TSYMBOL, "<cell:port>");
cell_type_ref = init_symbol (g_symbol, TSYMBOL, "<cell:ref>");
cell_type_special = init_symbol (g_symbol, TSYMBOL, "<cell:special>");
cell_type_string = init_symbol (g_symbol, TSYMBOL, "<cell:string>");
cell_type_struct = init_symbol (g_symbol, TSYMBOL, "<cell:struct>");
cell_type_symbol = init_symbol (g_symbol, TSYMBOL, "<cell:symbol>");
cell_type_values = init_symbol (g_symbol, TSYMBOL, "<cell:values>");
cell_type_variable = init_symbol (g_symbol, TSYMBOL, "<cell:variable>");
cell_type_vector = init_symbol (g_symbol, TSYMBOL, "<cell:vector>");
cell_type_broken_heart = init_symbol (g_symbol, TSYMBOL, "<cell:broken-heart>");
cell_symbol_test = init_symbol (g_symbol, TSYMBOL, "%%test");
init_symbol (cell_vm_apply, TSPECIAL, "core:apply"); assert_msg (g_symbol == SYMBOL_MAX, "i == SYMBOL_MAX");
init_symbol (cell_vm_apply2, TSPECIAL, "*vm-apply2*");
init_symbol (cell_vm_begin, TSPECIAL, "*vm-begin*");
init_symbol (cell_vm_begin_eval, TSPECIAL, "*vm:begin-eval*");
init_symbol (cell_vm_begin_expand, TSPECIAL, "core:eval");
init_symbol (cell_vm_begin_expand_eval, TSPECIAL, "*vm:begin-expand-eval*");
init_symbol (cell_vm_begin_expand_macro, TSPECIAL, "*vm:begin-expand-macro*");
init_symbol (cell_vm_begin_expand_primitive_load, TSPECIAL, "*vm:core:begin-expand-primitive-load*");
init_symbol (cell_vm_begin_primitive_load, TSPECIAL, "*vm:core:begin-primitive-load*");
init_symbol (cell_vm_begin_read_input_file, TSPECIAL, "*vm-begin-read-input-file*");
init_symbol (cell_vm_call_with_current_continuation2, TSPECIAL, "*vm-call-with-current-continuation2*");
init_symbol (cell_vm_call_with_values2, TSPECIAL, "*vm-call-with-values2*");
init_symbol (cell_vm_eval, TSPECIAL, "core:eval-expanded");
init_symbol (cell_vm_eval2, TSPECIAL, "*vm-eval2*");
init_symbol (cell_vm_eval_check_func, TSPECIAL, "*vm-eval-check-func*");
init_symbol (cell_vm_eval_define, TSPECIAL, "*vm-eval-define*");
init_symbol (cell_vm_eval_macro_expand_eval, TSPECIAL, "*vm:eval-macro-expand-eval*");
init_symbol (cell_vm_eval_macro_expand_expand, TSPECIAL, "*vm:eval-macro-expand-expand*");
init_symbol (cell_vm_eval_pmatch_car, TSPECIAL, "*vm-eval-pmatch-car*");
init_symbol (cell_vm_eval_pmatch_cdr, TSPECIAL, "*vm-eval-pmatch-cdr*");
init_symbol (cell_vm_eval_set_x, TSPECIAL, "*vm-eval-set!*");
init_symbol (cell_vm_evlis, TSPECIAL, "*vm-evlis*");
init_symbol (cell_vm_evlis2, TSPECIAL, "*vm-evlis2*");
init_symbol (cell_vm_evlis3, TSPECIAL, "*vm-evlis3*");
init_symbol (cell_vm_if, TSPECIAL, "*vm-if*");
init_symbol (cell_vm_if_expr, TSPECIAL, "*vm-if-expr*");
init_symbol (cell_vm_macro_expand, TSPECIAL, "core:macro-expand");
init_symbol (cell_vm_macro_expand_car, TSPECIAL, "*vm:core:macro-expand-car*");
init_symbol (cell_vm_macro_expand_cdr, TSPECIAL, "*vm:macro-expand-cdr*");
init_symbol (cell_vm_macro_expand_define, TSPECIAL, "*vm:core:macro-expand-define*");
init_symbol (cell_vm_macro_expand_define_macro, TSPECIAL, "*vm:core:macro-expand-define-macro*");
init_symbol (cell_vm_macro_expand_lambda, TSPECIAL, "*vm:core:macro-expand-lambda*");
init_symbol (cell_vm_macro_expand_set_x, TSPECIAL, "*vm:core:macro-expand-set!*");
init_symbol (cell_vm_return, TSPECIAL, "*vm-return*");
init_symbol (cell_symbol_dot, TSYMBOL, "*dot*");
init_symbol (cell_symbol_lambda, TSYMBOL, "lambda");
init_symbol (cell_symbol_begin, TSYMBOL, "begin");
init_symbol (cell_symbol_if, TSYMBOL, "if");
init_symbol (cell_symbol_quote, TSYMBOL, "quote");
init_symbol (cell_symbol_define, TSYMBOL, "define");
init_symbol (cell_symbol_define_macro, TSYMBOL, "define-macro");
init_symbol (cell_symbol_quasiquote, TSYMBOL, "quasiquote");
init_symbol (cell_symbol_unquote, TSYMBOL, "unquote");
init_symbol (cell_symbol_unquote_splicing, TSYMBOL, "unquote-splicing");
init_symbol (cell_symbol_syntax, TSYMBOL, "syntax");
init_symbol (cell_symbol_quasisyntax, TSYMBOL, "quasisyntax");
init_symbol (cell_symbol_unsyntax, TSYMBOL, "unsyntax");
init_symbol (cell_symbol_unsyntax_splicing, TSYMBOL, "unsyntax-splicing");
init_symbol (cell_symbol_set_x, TSYMBOL, "set!");
init_symbol (cell_symbol_sc_expand, TSYMBOL, "sc-expand");
init_symbol (cell_symbol_macro_expand, TSYMBOL, "macro-expand");
init_symbol (cell_symbol_portable_macro_expand, TSYMBOL, "portable-macro-expand");
init_symbol (cell_symbol_sc_expander_alist, TSYMBOL, "*sc-expander-alist*");
init_symbol (cell_symbol_call_with_values, TSYMBOL, "call-with-values");
init_symbol (cell_symbol_call_with_current_continuation, TSYMBOL, "call-with-current-continuation");
init_symbol (cell_symbol_boot_module, TSYMBOL, "boot-module");
init_symbol (cell_symbol_current_module, TSYMBOL, "current-module");
init_symbol (cell_symbol_primitive_load, TSYMBOL, "primitive-load");
init_symbol (cell_symbol_read_input_file, TSYMBOL, "read-input-file");
init_symbol (cell_symbol_write, TSYMBOL, "write");
init_symbol (cell_symbol_display, TSYMBOL, "display");
init_symbol (cell_symbol_car, TSYMBOL, "car");
init_symbol (cell_symbol_cdr, TSYMBOL, "cdr");
init_symbol (cell_symbol_not_a_number, TSYMBOL, "not-a-number");
init_symbol (cell_symbol_not_a_pair, TSYMBOL, "not-a-pair");
init_symbol (cell_symbol_system_error, TSYMBOL, "system-error");
init_symbol (cell_symbol_throw, TSYMBOL, "throw");
init_symbol (cell_symbol_unbound_variable, TSYMBOL, "unbound-variable");
init_symbol (cell_symbol_wrong_number_of_args, TSYMBOL, "wrong-number-of-args");
init_symbol (cell_symbol_wrong_type_arg, TSYMBOL, "wrong-type-arg");
init_symbol (cell_symbol_buckets, TSYMBOL, "buckets");
init_symbol (cell_symbol_builtin, TSYMBOL, "<builtin>");
init_symbol (cell_symbol_frame, TSYMBOL, "<frame>");
init_symbol (cell_symbol_hashq_table, TSYMBOL, "<hashq-table>");
init_symbol (cell_symbol_module, TSYMBOL, "<module>");
init_symbol (cell_symbol_procedure, TSYMBOL, "procedure");
init_symbol (cell_symbol_record_type, TSYMBOL, "<record-type>");
init_symbol (cell_symbol_size, TSYMBOL, "size");
init_symbol (cell_symbol_stack, TSYMBOL, "<stack>");
init_symbol (cell_symbol_argv, TSYMBOL, "%argv");
init_symbol (cell_symbol_mes_datadir, TSYMBOL, "%datadir");
init_symbol (cell_symbol_mes_version, TSYMBOL, "%version");
init_symbol (cell_symbol_internal_time_units_per_second, TSYMBOL, "internal-time-units-per-second");
init_symbol (cell_symbol_compiler, TSYMBOL, "%compiler");
init_symbol (cell_symbol_arch, TSYMBOL, "%arch");
init_symbol (cell_symbol_pmatch_car, TSYMBOL, "pmatch-car");
init_symbol (cell_symbol_pmatch_cdr, TSYMBOL, "pmatch-cdr");
init_symbol (cell_type_bytes, TSYMBOL, "<cell:bytes>");
init_symbol (cell_type_char, TSYMBOL, "<cell:char>");
init_symbol (cell_type_closure, TSYMBOL, "<cell:closure>");
init_symbol (cell_type_continuation, TSYMBOL, "<cell:continuation>");
init_symbol (cell_type_function, TSYMBOL, "<cell:function>");
init_symbol (cell_type_keyword, TSYMBOL, "<cell:keyword>");
init_symbol (cell_type_macro, TSYMBOL, "<cell:macro>");
init_symbol (cell_type_number, TSYMBOL, "<cell:number>");
init_symbol (cell_type_pair, TSYMBOL, "<cell:pair>");
init_symbol (cell_type_port, TSYMBOL, "<cell:port>");
init_symbol (cell_type_ref, TSYMBOL, "<cell:ref>");
init_symbol (cell_type_special, TSYMBOL, "<cell:special>");
init_symbol (cell_type_string, TSYMBOL, "<cell:string>");
init_symbol (cell_type_struct, TSYMBOL, "<cell:struct>");
init_symbol (cell_type_symbol, TSYMBOL, "<cell:symbol>");
init_symbol (cell_type_values, TSYMBOL, "<cell:values>");
init_symbol (cell_type_variable, TSYMBOL, "<cell:variable>");
init_symbol (cell_type_vector, TSYMBOL, "<cell:vector>");
init_symbol (cell_type_broken_heart, TSYMBOL, "<cell:broken-heart>");
init_symbol (cell_symbol_test, TSYMBOL, "%%test");
SCM a = cell_nil; SCM a = cell_nil;
a = acons (cell_symbol_call_with_values, cell_symbol_call_with_values, a); a = acons (cell_symbol_call_with_values, cell_symbol_call_with_values, a);