Commit Graph

10 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen 0733c913a8
M2: symbol.c 2019-11-02 08:44:44 +01:00
Jan Nieuwenhuizen 4fee4e2c79
remove cell_call_with_current_continuation 2019-11-02 08:44:20 +01:00
Jan Nieuwenhuizen 7ee490892d
remove begin 2019-11-02 08:44:20 +01:00
Jan Nieuwenhuizen e08626954a
core: remove unused symbols. 2019-11-02 08:44:20 +01:00
Jan Nieuwenhuizen def115384e
boot: Add gc test.
* scaffold/boot/gc.test: New file.
* build-aux/check-boot.sh (TESTS): Add it.
* include/mes/symbols.h (cell_symbol_program): New symbol.
* src/symbol.c (init_symbols_): Initialize it.
* src/mes.c (main): Add it to environment.
2019-11-02 08:44:19 +01:00
Jan Nieuwenhuizen c32d19aa6f
core: Prepare for M2-Planet: if (foo).
Rewrite C-constructs not supported by M2-Planet

    if (foo)              -> if (foo != 0)

* src/posix.c: Rewrite C-constructs not supported by M2-Planet.
(current_input_port): Likewise.
* src/display.c (display_helper): : Likewise.
* src/eval-apply.c (expand_variable_): : Likewise.
(eval_apply): : Likewise.
* src/mes.c (open_boot): : Likewise.
* src/reader.c (reader_read_identifier_or_number): : Likewise.
* src/symbols.c (init_symbol): : Likewise.
2019-11-02 08:44:17 +01:00
Jan Nieuwenhuizen dd810c5aec
core: Prepare for pointer-based cells. WIP
* include/mes/cc.h: Prepare for pointer-based cells.
* include/mes/macros.h[POINTER_CELLS]: Alternative set of macros.
* include/mes/mes.h (struct scm)[POINTER_CELLS]: Alternative definition.
* src/gc.c (copy_cell, copy_news): New function.
* include/mes/mes.h: Declare them.
2019-11-02 08:44:13 +01:00
Jan Nieuwenhuizen 55bf150d70
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.
2019-11-02 08:40:30 +01:00
Jan Nieuwenhuizen 7c7c4d772f
core: Remove macros from cell creation: make_char .. make_string.
* src/gc.c (make_char, make_continuation, make_macro, make_number,
make_ref, make_string0, make_string_port): New function.
(make_string): Move from string.c.
* include/mes/macros.h (MAKE_CHAR, MAKE_CONTINUATION, MAKE_MACRO,
MAKE_NUMBER, MAKE_REF, MAKE_STRING0, MAKE_STRING_PORT): Remove macro.
Update users.
* include/mes/m2.h: Likewise.
2019-11-02 08:40:30 +01:00
Jan Nieuwenhuizen 05d55a1677
core: Split-out symbol.c.
* src/mes.c (init_symbol, mes_symbols): Move to ..
* src/symbol.c: New file.
* simple.make: Add it.
* src/eval.c (assert_defined): Likewise.
* include/mes/mes.h: Declare init_symbols.
2019-11-02 08:40:29 +01:00