core: Rewrite eval_apply in continuation passing style.
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 28 Dec 2016 20:55:42 +0000 (21:55 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 28 Dec 2016 20:55:42 +0000 (21:55 +0100)
commitb66cd8627cc64e090f6b9d1614f791a2f3539cd4
tree48033327c86fb40c1f197b90836620a96b38eae6
parentb83d5837558b2a07d57ab78dc68639bb181373dd
core: Rewrite eval_apply in continuation passing style.

* mes.c (scm_vm_evlis, scm_vm_evlis2, scm_vm_evlis3, scm_vm_apply,
  scm_vm_apply2, scm_vm_eval, scm_vm_eval_set_x, scm_vm_eval_macro,
  scm_vm_eval2, scm_vm_macro_expand, scm_vm_begin,
  scm_vm_begin_read_input_file, scm_vm_begin2, scm_vm_if,
  scm_vm_if_expr, scm_vm_call_with_values, scm_vm_call_with_values2,
  scm_vm_return): New specials.
  (scm_vm_eval_car, scm_vm_eval_cdr, scm_vm_eval_cons,
  scm_vm_eval_null_p)[PRIMITIVE-EVAL]: New specials.
  (eval_apply_t, g_target): Remove.
  (push_cc): New function.
  (eval_apply): Rewrite.
  (vm_call, eval_env, apply_env, eval_env, macro_expand_env, begin_env,
  call_with_values_env): Remove.
* posix.c (stderr_): Update.
* reader.c (read_input_file_env): Update.
* module/mes/base-0.mes: Update.
lib.c
mes.c
module/mes/base-0.mes
module/mes/fluids.mes
module/mes/psyntax-0.mes
module/mes/psyntax-1.mes
module/mes/read-0.mes
module/mes/repl.mes
posix.c
reader.c