summaryrefslogtreecommitdiff
path: root/module/language/glil/compile-objcode.scm
AgeCommit message (Collapse)AuthorFilesLines
2009-01-30remove glil->objcode path in favor of passing through assembly; refactorings.Andy Wingo1-412/+0
* module/language/assembly.scm: Refactor a bit; remove the name "code" from the API, as it's too generic, and replace with "assembly". * module/language/assembly/compile-bytecode.scm: Get byte lengths via, well, byte-length. * module/language/glil/Makefile.am: * module/language/glil/spec.scm: * module/language/glil/compile-objcode.scm: Remove compile-objcode, as we just go through bytecode now. * module/language/glil/compile-assembly.scm (glil->assembly) (dump-object): s/object->code/object->assembly/.
2009-01-17move module and meta inside programs' object tablesAndy Wingo1-2/+3
* 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.
2009-01-17placeholder for meta and module in a program's object tableAndy Wingo1-22/+22
* module/language/glil/compile-objcode.scm (codegen): If the generated objcode will have a meta or it has objects, prepend two cells to the object table: one for the meta, and one for the module. This is a placeholder for future work.
2009-01-12fix typo when compiling receive formsAndy Wingo1-1/+1
* module/language/glil/compile-objcode.scm (codegen): Fix an embarassing typo, introduced in c2c82b62f40242a4212528c3d3e882038b48f0a2
2009-01-11rename <glil-asm> to <glil-program>Andy Wingo1-2/+2
* module/language/glil.scm (<glil-program>): Rename from <glil-asm>. * module/language/ghil/compile-glil.scm (codegen): * module/language/glil.scm (parse-glil, unparse-glil): * module/language/glil/compile-objcode.scm (preprocess, codegen): Adapt to naming change.
2009-01-11remove useless <glil-vars> helper type, serialize GHIL more strictlyAndy Wingo1-35/+34
* module/language/ghil.scm (parse-ghil, unparse-ghil): Rework to make the parse format correspond more closely with the object representation, so that I only have to document it once in the manual. The salient change is that no expression is self-quoting, and that variable references should go through `(ref FOO)'. Rename `set!' to `set'. * module/language/ghil/compile-glil.scm: Add a couple of compilers for unquote and unquote-splicing, that just raise an error. This way I can document unquote and unquote-splicing as normal ghil expressions, except that it's the compiler that catches them if they're outside a quasiquote. (codegen): Adapt to change in <glil-asm>. * module/language/ghil/spec.scm (parse): Fix parser typo bug. * module/language/glil.scm (<glil-asm>): Remove useless <glil-vars> structure, which also had a confusing name. Just put the nargs, nrest, nlocs, and nexts in the <glil-asm> directly. (parse-glil, unparse-glil): Serialize `asm' more straightforwardly. * module/language/glil/compile-objcode.scm (<bytespec>): Remove <glil-vars>, as with <glil-asm>. (preprocess, make-meta, codegen, dump-object!): Adapt to change in <glil-asm>.
2009-01-08(language ghil def) becomes (language ghil)Andy Wingo1-1/+1
* module/language/Makefile.am: * module/language/ghil/Makefile.am: * module/language/ghil.scm: * module/language/ghil/compile-glil.scm: * module/language/ghil/spec.scm: * module/language/glil/Makefile.am: * module/language/glil.scm: * module/language/glil/compile-objcode.scm: * module/language/glil/spec.scm: * module/language/scheme/inline.scm: * module/language/scheme/translate.scm: * module/oop/goops.scm: Rename (language ghil def) and (language glil def) to not have the "def". They're nicer names.
2009-01-08move lang-specific modules, e.g. (system il compile) to (language ghil ↵Andy Wingo1-0/+412
compile-glil) * configure.in: Remove module/system/il directory. * module/language/ghil/Makefile.am (SOURCES): * module/language/ghil/compile-glil.scm (system): * module/language/ghil/def.scm (language): * module/language/ghil/spec.scm (language, ghil): * module/language/glil/Makefile.am (SOURCES): * module/language/glil/compile-objcode.scm (language): * module/language/glil/def.scm (language): * module/language/glil/spec.scm (language, compile): * module/language/scheme/Makefile.am (SOURCES): * module/language/scheme/inline.scm (system, define-inline): * module/language/scheme/translate.scm (language): Move files, renaming the modules. * module/oop/goops.scm (load-toplevel): Unfortunately the GHIL name leaked here. Patch it up. * module/system/vm/Makefile.am (SOURCES): Remove assemble.scm.