1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-06 23:50:18 +02:00
guile/module/system/vm
Andy Wingo af95414f1d Various RTL VM and calling convention tweaks
* libguile/instructions.c (FOR_EACH_INSTRUCTION_WORD_TYPE): Allow for
  five-word instructions, and for new instruction word types.

* libguile/vm-engine.c (RETURN_ONE_VALUE): Instead of returning the
  value in the fixed part of the call frame, return it in the same place
  multiple-value returns go: from slot 1.
  (BR_ARITHMETIC): Allow arithmetic tests to be negated.
  (rtl_vm_engine): Change calling convention to use the same location
  for single and multiple-value returns.  Renumber all instructions.

  (halt, halt/values): Fold into a single instruction (halt).
  (call): Take the location of the procedure instead of the location of
  the call frame.  Also take the number of args, and reset the sp before
  jumping to the procedure, so as to indicate the number of arguments.
  (call/values): Remove, as the new calling convention has RA == MVRA.
  (tail-call): Require the procedure to be shuffled down already, and
  take "nlocals" as an arg instead of "nargs".
  (receive, receive-values): New instructions, for receiving returned
  values from calls.
  (return-values): Rename from return/values.  Remove "values".
  (alloc-frame): Rename from reserve-locals.
  (reset-frame): New instruction.
  (drop-locals): Remove.
  (br-if-=, br-if-<, br-if-<=): Allow these instructions to be
  negatable.
  (br-if->, br-if->=): Remove.  Probably a bad idea, given NaN.
  (box-ref): Don't bother trying to do a reverse lookup -- the
  toplevel-box, module-box, and resolve instructions should handle
  that.
  (resolve): Add arg to check that the variable is bound.
  (toplevel-box, module-box): New instructions, replacing toplevel-ref,
  toplevel-set, module-ref, and module-set.

* libguile/vm.c (rtl_boot_continuation_code, rtl_values_code): Adapt to
  instruction set changes.

* module/Makefile.am: Make the assembler and disassembler dependent on
  vm-operations.h.

* module/system/vm/assembler.scm:
* module/system/vm/disassembler.scm: Adapt to instruction changes and
  new instruction word kinds.

* test-suite/tests/rtl.test: Adapt to instruction set changes.
2013-08-11 16:45:31 +02:00
..
assembler.scm Various RTL VM and calling convention tweaks 2013-08-11 16:45:31 +02:00
coverage.scm add source:line-for-user, returning a 1-indexed line number 2010-10-01 18:15:23 +02:00
debug.scm fix rtl program arity functions 2013-07-21 17:12:21 +02:00
disassembler.scm Various RTL VM and calling convention tweaks 2013-08-11 16:45:31 +02:00
elf.scm Add runtime support for reading debug information from ELF 2013-06-09 19:50:30 +02:00
frame.scm pop-continuation abort-continuation hooks pass return vals directly 2013-05-27 07:13:13 +02:00
inspect.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
instruction.scm add new rtl vm 2013-05-31 09:48:16 -04:00
linker.scm linker string tables are stateful objects 2013-06-09 16:04:12 +02:00
objcode.scm add (find-mapped-elf-image) procedure to (system vm objcode) module 2013-05-23 14:21:06 +02:00
program.scm procedure-properties for RTL functions 2013-06-09 23:59:19 +02:00
trace.scm pop-continuation abort-continuation hooks pass return vals directly 2013-05-27 07:13:13 +02:00
trap-state.scm stepping traps use frame-next-source, not frame-source 2010-10-08 12:31:56 +02:00
traps.scm pop-continuation abort-continuation hooks pass return vals directly 2013-05-27 07:13:13 +02:00
vm.scm add call-with-vm; remove thread-vm bits; remove vm-apply; engines settable. 2010-09-27 21:12:29 +02:00