1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-09 07:00:23 +02:00
guile/module/language
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
..
assembly Merge remote-tracking branch 'origin/stable-2.0' 2013-01-31 11:52:42 +01:00
brainfuck rename <application> to <call> 2011-06-02 13:42:55 +02:00
bytecode Merge remote-tracking branch 'origin/stable-2.0' 2013-01-31 11:52:42 +01:00
cps VM has "builtins": primitives addressable by emitted RTL code 2013-10-27 20:09:01 +01:00
ecmascript Adapt ecmascript compiler to tree-il prompt changes, again. 2013-08-11 17:18:09 -04:00
elisp compile-file adds #:to-disk? #t to opts 2013-08-24 15:27:57 +02:00
glil remove language/glil/decompile-assembly.scm 2013-02-24 15:50:09 +01:00
objcode linker string tables are stateful objects 2013-06-09 16:04:12 +02:00
rtl RTL language 2013-08-31 09:40:56 +02:00
scheme Merge remote-tracking branch 'origin/stable-2.0' 2013-08-11 22:46:22 -04:00
tree-il VM has "builtins": primitives addressable by emitted RTL code 2013-10-27 20:09:01 +01:00
value Add 'for-humans?' flag to <language> specifications. 2013-01-27 10:16:40 -05:00
assembly.scm silly "optimization" in (language assembly) 2011-05-05 11:43:12 +02:00
cps.scm Add CPS language 2013-08-31 09:40:56 +02:00
glil.scm prompt handlers are always inline 2010-02-19 15:30:34 +01:00
objcode.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
rtl.scm VM has "builtins": primitives addressable by emitted RTL code 2013-10-27 20:09:01 +01:00
tree-il.scm <prompt> body and handler are lambdas; add escape-only? field 2013-07-06 20:27:21 +09:00