diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-01 10:50:45 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-01 10:50:45 +0100 |
commit | ac47d5f6399c54bcb39a01bb0ade83a614d625b4 (patch) | |
tree | 218be79c6771477492f78ffdaebec67a6f43afec /libguile/vm-i-loader.c | |
parent | 1f1ec13b5c459717b22030565e591f1f713ee39d (diff) | |
download | guile-ac47d5f6399c54bcb39a01bb0ade83a614d625b4.tar.gz |
avoid 8 words of allocation per lambda, whoooo
* libguile/objcodes.c (scm_bytecode_to_objcode): Check that the length of
the vector matches the length embedded in the bytecode.
* libguile/programs.c (scm_program_meta): Call through to
scm_objcode_meta, instead of looking in the object table. Avoids
consing up a program+objcode slice for the meta until the meta is
actually called.
* libguile/vm-i-loader.c (load-program): Step past the metadata too.
* module/language/glil/compile-assembly.scm (make-meta): Just return the
load-program form, or #f.
(assoc-ref-or-acons, object-index-and-alist, make-object-table): Don't
write the meta into the object table.
(glil->assembly): Instead write the meta into the load-program form.
Diffstat (limited to 'libguile/vm-i-loader.c')
-rw-r--r-- | libguile/vm-i-loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/vm-i-loader.c b/libguile/vm-i-loader.c index 2919638bc..5b086808b 100644 --- a/libguile/vm-i-loader.c +++ b/libguile/vm-i-loader.c @@ -92,7 +92,7 @@ VM_DEFINE_LOADER (65, load_program, "load-program") scm_c_vector_set_x (objs, 0, scm_current_module ()); objcode = scm_c_make_objcode_slice (SCM_PROGRAM_OBJCODE (fp[-1]), ip); - len = sizeof (struct scm_objcode) + SCM_OBJCODE_LEN (objcode); + len = sizeof (struct scm_objcode) + SCM_OBJCODE_TOTAL_LEN (objcode); PUSH (scm_make_program (objcode, objs, SCM_EOL)); |