Commit Graph

3 Commits

Author SHA1 Message Date
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 25c29ecb6d core: Integrate garbage collector/jam scraper.
* mes.c (r0, r1, r2, r3, stack):  New globals.
  (gc_loop): Handle MACRO and SCM.
  (gc_copy): Handle FUNCTION, allow for pre-allocated SCM and SYMBOL.
  (assq): Flag any BROKEN_HEARTs.
  (vm_call): New function.  Enables moving C stack to GC stack.
  (evlis_env, apply_env, eval_env, expand_macro_env, begin_env,
  if_env): Use vm_call-indirection.
  (call_lambda): New function.
  (vm_apply_env): Rename from apply_env.  Remove parameters, instead
  use r1, r2 and r0.
  (vm_evlis_env, vm_eval_env, vm_expand_macro_env, vm_begin_env,
  vm_if_env): Likewise.
  (acons): New function.
  (mes_environment) [!MES_FULL, MES_MINI]: Add cpp switches to create minimally
  filled environment, for debugging.
  (main): Print free value at exit.
* define.c (define_env): Use vm_call-indirection.
  (vm_define_env): Rename from define_env.
* quasiquote.c (eval_quasiquote): Use vm_call-indirection.
  (vm_eval_quasiquote): Rename from eval_quasiquote.
* tests/gc-2.test: New test.
  tests/gc-2a.test: New test.
  tests/gc-3.test: New test.
2016-12-12 20:35:18 +01:00