RTL: Local 0 is the procedure
authorAndy Wingo <wingo@pobox.com>
Sat, 20 Jul 2013 18:05:13 +0000 (20:05 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 21 Jul 2013 15:12:22 +0000 (17:12 +0200)
commit7396d21670f4e5182051e24a7b459712d404c276
tree4acfbe5d94a62f5dcb3cad282db75fb1d5fdcede
parent2a294c7cd3c27dd3159da840df3d004da4fc4094
RTL: Local 0 is the procedure

* libguile/vm-engine.c: Change the RTL VM to number the procedure as
  local 0, and other locals from 1.  In the future we will want the FP
  to point to local 0 instead of local 1.  In the future also we can
  elide the procedure for well-known closures (closures in which all
  references are known call sites).
  (make_closure, free_set): Instead of taking rest arguments, we add a
  new free-set! op that initializes closures.
  (free_ref): Take the closure as an argument.

* libguile/vm.c (rtl_boot_continuation_code): Remove comments, which
  were out of date.
  (rtl_apply_code, rtl_values_code): Update comments.

* module/system/vm/assembler.scm (intern-constant, emit-init-constants):
  Adapt to locals numbering change.
  (begin-kw-arity): For assert-nargs-ee purposes, nreq includes the
  procedure.

* module/system/vm/disassembler.scm (code-annotation): Adapt annotation
  for assert-nargs-ee/locals.

* test-suite/tests/rtl.test: Adapt tests.
libguile/vm-engine.c
libguile/vm.c
module/system/vm/assembler.scm
module/system/vm/disassembler.scm
test-suite/tests/rtl.test