1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00
guile/module
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
..
ice-9 Merge remote-tracking branch 'origin/stable-2.0' 2013-09-13 00:24:04 -04:00
language Reify call-thunk/no-inline. 2013-10-14 16:43:42 +02:00
oop Merge remote-tracking branch 'origin/stable-2.0' 2013-01-31 11:52:42 +01:00
rnrs Merge remote-tracking branch 'origin/stable-2.0' 2013-08-11 22:46:22 -04:00
scripts ,xx for RTL images 2013-08-29 20:50:19 +02:00
srfi Merge remote-tracking branch 'origin/stable-2.0' 2013-09-13 00:24:04 -04:00
sxml Remove duplicate definitions of call/ec' and let/ec'. 2013-04-06 15:40:19 +02:00
system Subrs are RTL programs 2013-10-18 11:39:35 +02:00
texinfo texinfo plain-text: Use match' for stexi->plain-text'. 2013-03-22 22:09:05 +01:00
web Merge remote-tracking branch 'origin/stable-2.0' 2013-09-13 00:24:04 -04:00
Makefile.am add DWARF parser 2013-09-28 14:41:08 +02:00
rnrs.scm Add missing R6RS `open-file-input/output-port' procedure 2012-11-12 20:47:57 +01:00
statprof.scm Statprof works better with RTL programs 2013-10-17 23:20:32 +02:00
texinfo.scm texinfo: Recognize `@:'. 2013-03-21 18:52:29 +01:00