1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 18:20:22 +02:00
guile/module/system/vm
Andy Wingo 486013d67c VM has "builtins": primitives addressable by emitted RTL code
* libguile/Makefile.am:
* libguile/vm-builtins.h: New header, declaring stubs needed by the
  compiler like values, apply, and abort-to-prompt.

* libguile/vm.c: Adapt the apply and values stubs to conform to a
  standard interface.  Add an abort-to-prompt stub.  Add call/cc and
  call-with-values stubs.
  (scm_vm_builtin_ref): New helper, for the builtin-ref opcode.
  (scm_vm_builtin_name_to_index)
  (scm_vm_builtin_index_to_name): New helpers, for the compiler and
  disassembler, respectively.
  (scm_init_vm_builtins, scm_bootstrap_vm): Allow the compiler helpers
  to be loaded later into a module.
* module/language/rtl.scm: Export builtin-index->name and
  builtin-name->index.

* libguile/vm-engine.c (RETURN_VALUE_LIST): Update to use new names of
  "apply" and "values".
  (tail-call/shuffle): New opcode.
  (abort): Update to be a tail VM op, and reorder and renumber other
  ops.
  (builtin-ref): New opcode.

* libguile/continuations.h:
* libguile/continuations.c (scm_i_call_with_current_continuation):
  Move this to vm.[ch], implemented as a builtin.

* module/language/tree-il/compile-cps.scm (convert): Convert to
  'abort-to-prompt calls, possibly with 'apply, effectively undoing the
  tree-il transformation.

* module/language/cps/reify-primitives.scm (builtin-ref): New helper.
  (reify-primitives): Convert builtin primitives to builtin-ref.

* module/language/cps/dfg.scm (constant-needs-allocation?):
* module/language/cps/compile-rtl.scm (emit-rtl-sequence): Add support
  for compiling builtin-ref.

* module/system/vm/disassembler.scm (code-annotation): Add annotation
  for builtin-ref.
2013-10-27 20:09:01 +01:00
..
assembler.scm RTL compiler: Compile TC7 branches. 2013-10-26 15:16:09 +02:00
coverage.scm (system vm coverage) works with RTL programs 2013-10-17 23:20:32 +02:00
debug.scm (system vm debug): implement arity-low-pc, arity-high-pc 2013-10-18 11:39:35 +02:00
disassembler.scm VM has "builtins": primitives addressable by emitted RTL code 2013-10-27 20:09:01 +01:00
dwarf.scm A couple of fixes when no source info is available 2013-10-10 12:22:20 +02:00
elf.scm Add runtime support for reading debug information from ELF 2013-06-09 19:50:30 +02:00
frame.scm better RTL debugging 2013-10-04 19:55:12 +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 (language tree-il analyze) works better with RTL programs 2013-10-18 18:41:59 +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 Procedure traps work with RTL programs. 2013-10-17 23:20:32 +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