summaryrefslogtreecommitdiff
path: root/libguile/programs.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-01-17 16:42:53 +0100
committerAndy Wingo <wingo@pobox.com>2009-01-17 16:42:53 +0100
commit2fda0242214e1b650b8fd3eb084e1c930a8399a5 (patch)
treecb0e118575713554b98b11e4d15c91a0605f6941 /libguile/programs.h
parenta72317988fa29377928d30c7e52b5acf63b6943a (diff)
move module and meta inside programs' object tables
* libguile/programs.h (struct scm_program): Remove the module and meta fields. * libguile/programs.c (scm_c_make_program): Add a new argument, `objs'. If it's a vector, we'll look for the module and the metadata in there, instead of having them in the scm_program structure. (scm_c_make_closure, program_mark, scm_program_meta) (scm_c_program_source, scm_program_module): Adapt to the new program representation. * libguile/objcodes.c (scm_objcode_to_program): Pass #f as the object table when making the program. * libguile/vm-engine.h (CACHE_PROGRAM): * libguile/vm-engine.c (vm_run): Rework to use the simple vector API for getting the current object table. Call the helper, vm_make_boot_program, to make the boot program. * libguile/vm-i-loader.c (load-program): Set the current module and the meta in the object vector, which we pass to scm_c_make_program. * libguile/vm-i-system.c (toplevel-ref, toplevel-set): Adapt to the new program representation. * module/language/glil/compile-objcode.scm (codegen): Clarify.
Diffstat (limited to 'libguile/programs.h')
-rw-r--r--libguile/programs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/libguile/programs.h b/libguile/programs.h
index e57f6d08a..4b5447fb8 100644
--- a/libguile/programs.h
+++ b/libguile/programs.h
@@ -57,8 +57,6 @@ struct scm_program {
unsigned char nlocs; /* the number of local variables */
unsigned char nexts; /* the number of external variables */
scm_byte_t *base; /* program base address */
- SCM module; /* resolve bindings with respect to this module */
- SCM meta; /* meta data */
SCM objs; /* constant objects */
SCM external; /* external environment */
SCM holder; /* the owner of bytecode */
@@ -70,7 +68,7 @@ extern scm_t_bits scm_tc16_program;
#define SCM_PROGRAM_DATA(x) ((struct scm_program *) SCM_SMOB_DATA (x))
#define SCM_VALIDATE_PROGRAM(p,x) SCM_MAKE_VALIDATE (p, x, PROGRAM_P)
-extern SCM scm_c_make_program (void *addr, size_t size, SCM holder);
+extern SCM scm_c_make_program (void *addr, size_t size, SCM objs, SCM holder);
extern SCM scm_c_make_closure (SCM program, SCM external);
extern SCM scm_program_p (SCM obj);