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 27337b6373 Subrs are RTL programs
* libguile/gsubr.c: Define RTL stubs instead of stack VM stubs.
  (SUBR_STUB_CODE, get_subr_stub_code): Adapt to return a uint32_t*
  pointer instead of a SCM value.
  (create_subr): Create RTL procedures instead of stack VM procedures.
  For RTL procedures, the function pointer, name, and generic address
  pointer go inline to the procedure, as free variables.
  (scm_i_primitive_arity, scm_i_primitive_call_ip): New helpers.
  (scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic)
  (scm_c_define_gsubr_with_generic): Adapt to create_gsubr being renamed
  to create_subr.

  Remove gsubr test code.

* libguile/gsubr.h (SCM_PRIMITIVE_P, SCM_PRIMITIVE_GENERIC_P): Only RTL
  programs can be primitives now.
  (SCM_SUBRF, SCM_SUBR_NAME, SCM_SUBR_GENERIC): These fields are now in
  the RTL free variables, not the object table.

* libguile/programs.c (scm_i_rtl_program_name):
  (scm_i_rtl_program_documentation):
  (scm_i_rtl_program_properties):
  (scm_i_rtl_program_minimum_arity): Implement these appropriately for
  primitives, which lack debugging information.
  (scm_primitive_p, scm_primitive_call_ip): New helpers.

* libguile/snarf.h: Remove static allocation for subrs.  Since there is
  nothing to allocate besides the program itself, which needs runtime
  relocation, static allocation is not a win.

* system/vm/program.scm: Fix up various arity-related things for
  primitives, which don't use ELF arity info.

* test-suite/tests/eval.test ("stack involving a primitive"): Add an
  XFAIL until we get just one VM.
2013-10-18 11:39:35 +02:00
..
assembler.scm A couple of fixes when no source info is available 2013-10-10 12:22:20 +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 RTL: Compile prompts 2013-10-14 16:13:57 +02: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 Subrs are RTL programs 2013-10-18 11:39:35 +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