Commit Graph

2009 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen 112a12e0b9
remove debugging 2019-11-17 15:08:48 +01:00
Jan Nieuwenhuizen a0f580c522
debugging: C 2019-11-17 15:08:47 +01:00
Jan Nieuwenhuizen 33e3867b7f
CONSTANT 2019-11-17 13:47:19 +01:00
Jan Nieuwenhuizen 1a922d3e5b
xx 2019-11-17 13:12:45 +01:00
Jan Nieuwenhuizen 3060bee531
cleanup 2019-11-17 13:08:39 +01:00
Jan Nieuwenhuizen 65f400a4c9
main: pair! 2019-11-17 13:08:32 +01:00
Jan Nieuwenhuizen 58392ab4a9
cleanup 2019-11-17 13:02:11 +01:00
Jan Nieuwenhuizen 353171c5c7
module cleanup 2019-11-17 13:02:11 +01:00
Jan Nieuwenhuizen 633bd3a1b6
WIP 2019-11-17 13:02:11 +01:00
Jan Nieuwenhuizen bb1aff9991
remove boo.scm 2019-11-17 13:02:11 +01:00
Jan Nieuwenhuizen accae96fa6
cleanups 2019-11-17 13:02:11 +01:00
Jan Nieuwenhuizen 2377552677
boot modules WIP 2019-11-17 13:02:10 +01:00
Jan Nieuwenhuizen 2f1c84688f
boot-module.mes: prefer loading of .mes 2019-11-17 13:02:10 +01:00
Jan Nieuwenhuizen 5256a336c9
verdor 2019-11-17 13:02:10 +01:00
Jan Nieuwenhuizen 26f73a46f8
simple-format: use core display. 2019-11-17 13:02:10 +01:00
Jan Nieuwenhuizen 03502d7844
variable: display: WIP 2019-11-17 13:02:10 +01:00
Jan Nieuwenhuizen a285782399
flat->deep variable ref: it boots! 2019-11-17 13:02:10 +01:00
Jan Nieuwenhuizen a66a5392a6
wip 2019-11-17 13:02:09 +01:00
Jan Nieuwenhuizen 063f3cd6e3
wip 2019-11-17 13:02:09 +01:00
Jan Nieuwenhuizen 2deb3d6a35
WIP 2019-11-17 13:02:09 +01:00
Jan Nieuwenhuizen 63e0996aaa
core: hashq_get_handle: FIX! 2019-11-17 13:02:09 +01:00
Jan Nieuwenhuizen 5ee49f2887
WIP 2019-11-17 13:02:09 +01:00
Jan Nieuwenhuizen 256d7397b3
WIP: module integration 2019-11-17 13:02:09 +01:00
Jan Nieuwenhuizen f61490b930
WIP: module 2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen 3cdd216714
module: raw import from guile 2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen 91b35f6ceb
WIP: current-module 2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen 3b9281194f
boot-module: primitive-load hack 2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen 0a1a53be8b
WIP: boot-module. 2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen 5ed16be84d
debugging 2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen ebce9ddc3d
Revert "core: primitive-load: Force top level."
This reverts commit 5912cbefbb.
2019-11-17 13:02:08 +01:00
Jan Nieuwenhuizen e7c6bad7ee
core: primitive-load: Force top level.
* src/eval-apply.c (eval_apply): Force toplevel for primitive load.
2019-11-17 13:02:07 +01:00
Jan Nieuwenhuizen ebccc7cc39
boot-module: first running! 2019-11-17 13:02:07 +01:00
Jan Nieuwenhuizen 7d4432a350
HACK: flat-variable. 2019-11-17 13:02:07 +01:00
Jan Nieuwenhuizen c94ccbd345
display: <var> 2019-11-17 13:02:07 +01:00
Jan Nieuwenhuizen 6c079a8fb0
core: Refactor lookup_variable.
* src/variable.c (lookup_variable, lookup_variable_, lookup_ref): Drop
lookup/env parameter.  Update users.
* src/builtins.c (mes_builtins): Update registration.
* include/mes/builtins.h: Update declarations.
* include/mes/mes.h: Likewise.
2019-11-17 13:02:07 +01:00
Jan Nieuwenhuizen c98651ab4e
core: Remove set-env! as builtin.
* src/eval-apply.c (set_x): Rename from set_env_x.  Drop environment
parameter.
* include/mes/mes.h: Declare it.
* include/mes/builtins.h (set_env_x): Remove declaration.
* src/builtins.c (mes_builtins): Remove registration.
2019-11-17 13:02:07 +01:00
Jan Nieuwenhuizen ca2db881e2
core: Replace special cell_boot_module with initial-module builtin.
* src/module.c (initial_module): New builtin.
* include/mes/builtins.h: Declare it.
* src/builtins.c (mes_builtins): Register it.
* include/mes/symbols.h (cell_boot_module): Remove.
* src/symbol.c (init_symbols_): Update.
(init_symbols): Likewise.
* src/eval-apply.c (eval_apply): Likewise.
(expand_variable_): Likewise.
* tests/macro.test (make-fluid): Likewise.
* mes/module/mes/fluids.mes (make-fluid):  Likewise.
2019-11-17 13:02:06 +01:00
Jan Nieuwenhuizen 23af952ad0
core: Remove make_module_type, module_printer, module_variable, module_ref.
* src/module.c (make_module_type, module_printer, module_variable,
module_ref): Remove.
* include/mes/builtins.h: Remove declarations.
* src/builtins.c (mes_builtins): Remove registrations.
* src/eval-apply.c (assert_defined): Remove.
(set_env_x, eval_apply): Use lookup_variable and variable_ref.
* src/core.c (error): Likewise.
* mes/module/mes/boot-01.scm (defined?): Likewise.
* mes/module/mes/boot-02.scm (defined?): Likewise.
* mes/module/mes/boot-03.scm (defined?): Likewise.
* mes/module/mes/boot-0.scm (defined?): Likewise.
* scaffold/boot/53-closure-display.scm (guile): Likewise.
* scaffold/boot/60-let-syntax-expanded.scm (defined?): Likewise.
* src/mes.c (main): Use hash_table_printer for debugging.
2019-11-17 13:02:06 +01:00
Jan Nieuwenhuizen cbc0c80568
core: Add lookup_variable_, lookup_variable, lookup_ref.
* src/variable.c (lookup_variable, lookup_ref): New builtins, and
(lookup_variable_): New function.
* include/mes/builtins.h: Declare them.
* include/mes/mes.h: Declare it.
* src/builtins.c (mes_builtins): Register them.
2019-11-17 13:02:06 +01:00
Jan Nieuwenhuizen 778be3d15d
core: Add hashq_set_handle_x.
* src/hash.c (hash_set_x_): Return handle instead of value.  Update
callers and and use it in ...
(hashq_set_handle_x): New function.
* include/mes/builtins.h: Declare it.
2019-11-17 13:02:06 +01:00
Jan Nieuwenhuizen 81972a9b2e
WIP: variable 2019-11-17 13:02:06 +01:00
Jan Nieuwenhuizen beb982b3a0
Revert "display: <var>"
This reverts commit cb28b55f886dd8ebb50b2336d8dc440a953b2897.
2019-11-17 13:02:06 +01:00
Jan Nieuwenhuizen 530746caaa
display: <var> 2019-11-17 13:02:05 +01:00
Jan Nieuwenhuizen 4af868525f
mes: Add hash-for-each.
* mes/module/mes/scm.mes (hash-for-each): New function.
2019-11-17 13:02:05 +01:00
Jan Nieuwenhuizen fb816fb7ed
core: Add hash_clear!.
* src/hash.c (hash_clear_x): New builtin.
* include/mes/builtins.h: Declare it.
* src/builtins.c (mes_builtins): Register it.
2019-11-17 13:02:05 +01:00
Jan Nieuwenhuizen 925eb14f87
core: Add hash-table?.
* include/mes/mes.h (scm_hash_table_type): New type.
* src/hash.c (make_hash_table_type): Rename from make_hash_type, and
initialize it.
* src/symbol.c (init_symbols): Add it to environment.
2019-11-17 13:02:05 +01:00
Jan Nieuwenhuizen bb514fa55a
core: Allow non-string hash keys.
This merely allows adding non-string keys to a hash table and puts them
non-string keys in bucket 0.  Efficiency is lost.  TODO: calculate a
proper hash.

* src/hash.c (hash_): Allow non-string keys in bucket 0.
2019-11-17 13:02:05 +01:00
Jan Nieuwenhuizen 3fd4ac1efa
mes: Resurrect cell:type-name.
* mes/module/mes/type-0.mes (cell:type-name): Resurrect.
2019-11-17 13:02:05 +01:00
Jan Nieuwenhuizen f60adb3e20
Revert "mes: Add hash-for-each. WIP! split me: fixup hash/make-hash table hacks."
This reverts commit ef63ad04f8.
2019-11-17 13:02:04 +01:00
Jan Nieuwenhuizen 524d6fd5ed
mes: Add hash-for-each. WIP! split me: fixup hash/make-hash table hacks.
* mes/module/mes/scm.mes (hash-for-each): New function.
* mes/module/mes/type-0.mes (cell:type-name): Resurrect.
* src/hash.c (hash_): Hack: allow non-string keys.
(make_hash_table_type): Rename from make_hash_type.  WIP
(hash_table_p): New function.
(hash_clear_x): New function.
* src/module.c (make_module_type): Rewrite.
(module_p): x
(get_pre_modules_obarray): x
2019-11-17 13:02:04 +01:00