Commit Graph

11 Commits

Author SHA1 Message Date
Timothy Sample f1447abeb3 tests: Fix tests to run on Guile.
* scaffold/boot/17-open-input-string.scm: Test 'current-module' to
see if we can lookup 'read-string' in a module.
* scaffold/boot/gc.scm: Skip all tests on Guile.
* tests/gc.test: Rename 'mes?' to 'mes-core?'; use 'current-module'
to check if we need to use core Mes procedures; and adjust all tests
accordingly.
* tests/scm.test (iota -1): Skip on Guile.
* tests/vector.test (make-vector): Adjust for Guile.
2022-04-26 11:22:57 -06:00
Timothy Sample a8ce580123 core: Rename the 'current-module' symbol.
This change renames 'current-module' to 'current-environment'.  This
will make way for 'current-module' to actually be a module.

* include/mes/symbols.h (cell_symbol_current_module): Rename this...
(cell_symbol_current_environment): ...to this.
* src/eval-apply.c: Adjust accordingly.
* src/symbol.c: Adjust accordingly, and update the Scheme name to
'current-environment'.
* mes/module/mes/base.mes: Adjust accordingly.
* mes/module/mes/boot-0.scm: Adjust accordingly.
* mes/module/mes/boot-00.scm: Adjust accordingly.
* mes/module/mes/boot-01.scm: Adjust accordingly.
* mes/module/mes/boot-02.scm: Adjust accordingly.
* mes/module/mes/boot-03.scm: Adjust accordingly.
* mes/module/mes/display.mes: Adjust accordingly.
* mes/module/mes/module.mes: Adjust accordingly.
* mes/module/mes/psyntax-0.mes: Adjust accordingly.
* mes/module/mes/repl.mes: Adjust accordingly.
* mes/module/mes/scm.mes: Adjust accordingly.
* mes/module/srfi/srfi-16.scm: Adjust accordingly.
* mes/module/srfi/srfi-26.scm: Adjust accordingly.
* module/mescc/compile.scm: Adjust accordingly.
* scaffold/boot/17-open-input-string.scm: Adjust accordingly.
* scaffold/boot/4c-quasiquote.scm: Adjust accordingly.
* scaffold/boot/4f-string-split.scm: Adjust accordingly.
* scaffold/boot/50-make-string.scm: Adjust accordingly.
* scaffold/boot/50-string-join.scm: Adjust accordingly.
* scaffold/boot/51-module.scm: Adjust accordingly.
* scaffold/boot/52-define-module.scm: Adjust accordingly.
* scaffold/boot/60-let-syntax-expanded.scm: Adjust accordingly.
* scaffold/boot/60-let-syntax.scm: Adjust accordingly.
* scaffold/gc.scm: Adjust accordingly.
* tests/gc.test: Adjust accordingly.
* tests/psyntax.test: Adjust accordingly.
2022-04-26 11:22:57 -06:00
Jan (janneke) Nieuwenhuizen e4d35f5915 core: Add hash-map->list.
* src/hash.c (hash_buckets): New function.
* src/builtins.c (mes_builtins): Initialize it.
* include/mes/builtins.h: Declare it.
* mes/module/mes/scm.mes (hash-map->list): New procedure.
* tests/hash.test: Add a test.
* tests/gc.test: Bump arena size to handle more built-ins.

Co-authored-by: Timothy Sample <samplet@ngyro.com>
2022-04-25 09:22:10 -06:00
Jan (janneke) Nieuwenhuizen ae9988bb3a
core: Add gc-stats.
* include/mes/mes.h (gc_start_time, gc_end_time, gc_time): New
variables.
* src/mes.c (init): Initialize them.
* src/gc.c: Use them.
* src/gc.c (gc_stats): New function.
* include/mes/builtins.h: Declare it.
* src/builtins.c (mes_builtins): Register it.
* tests/gc.test: Use it.
2020-12-31 10:34:07 +01:00
Jan (janneke) Nieuwenhuizen 49dfdb4890
tests: Add gc.test.
* tests/gc.test: New file.
* build-aux/check-mes.sh (TESTS): Add it.
* scaffold/gc-test.scm: Remove.
2020-04-25 16:39:43 +02:00
Jan Nieuwenhuizen 26539214d9 Remove gc scaffolding.
* tests/gc-0.test: Remove.
* tests/gc-1.test: Remove.
* tests/gc-2.test: Remove.
* tests/gc-2a.test: Remove.
* tests/gc-3.test: Remove.
* tests/gc-4.test: Remove.
* tests/gc-5.test: Remove.
* tests/gc-6.test: Remove.
* tests/gc.test:Remove.
2017-04-15 16:50:03 +02:00
Jan Nieuwenhuizen 30743ce141 mini-mes: Fully remove reader from core.
* scaffold/mini-mes.c (lookup_): Remove.
* mes.c: Likewise.
* reader.c (lookup_): Enable.
* mlib.c (putc): New function.
* module/mes/libc.mes (putc): New function.
2017-03-25 15:58:44 +01:00
Jan Nieuwenhuizen e460771988 test: Allow running with any mes.
* test/base.test: Run $MES if set, default to ../scripts/mes.
* tests/base.test: Likewise.
* tests/catch.test: Likewise.
* tests/closure.test: Likewise.
* tests/cwv.test: Likewise.
* tests/display.test: Likewise.
* tests/fluids.test: Likewise.
* tests/gc-0.test: Likewise.
* tests/gc-1.test: Likewise.
* tests/gc-2.test: Likewise.
* tests/gc-2a.test: Likewise.
* tests/gc-3.test: Likewise.
* tests/gc-4.test: Likewise.
* tests/gc-5.test: Likewise.
* tests/gc-6.test: Likewise.
* tests/gc.test: Likewise.
* tests/let-syntax.test: Likewise.
* tests/let.test: Likewise.
* tests/match.test: Likewise.
* tests/math.test: Likewise.
* tests/module.test: Likewise.
* tests/optargs.test: Likewise.
* tests/peg.test: Likewise.
* tests/psyntax.test: Likewise.
* tests/quasiquote.test: Likewise.
* tests/read.test: Likewise.
* tests/record.test: Likewise.
* tests/scm.test: Likewise.
* tests/srfi-1.test: Likewise.
* tests/srfi-13.test: Likewise.
* tests/srfi-14.test: Likewise.
* tests/vector.test: Likewise.
2017-03-26 21:06:19 +02:00
Jan Nieuwenhuizen 2b577eaee0 Add loadable modules.
* module/mes/base-0.mes (mes-use-module): Implement.
* module/mes: Update users.
* HACKING: Update.
* NEWS: Update.
* configure (main): Use shell expansion for prefix.
* make/install.make (install): Substitute prefix.
2016-12-12 20:35:19 +01:00
Jan Nieuwenhuizen 61e42e8527 core: Number based cells.
* mes.c (scm_t): Change car, string, ref, cdr, macro, vector into g_cell index
  [WAS]: scm_t pointer.
* define.c: Update.
* lib.c: Update.
* math.c: Update.
* posix.c: Update.
* quasiquote.c: Update.
* string.c: Update.
* type.c: Update.
* build-aux/mes-snarf.mes Update.
* tests/gc-4.test: New test.
* tests/gc-5.test: New test.
* tests/gc-6.test: New test.
2016-12-12 20:35:18 +01:00
Jan Nieuwenhuizen 2866c75907 Add mes gc test setup.
* tests/gc.test: New file.
2016-12-12 20:35:18 +01:00