summaryrefslogtreecommitdiff
path: root/libguile/objcodes.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-06-22 13:35:55 +0200
committerAndy Wingo <wingo@pobox.com>2012-06-22 13:40:50 +0200
commitb8bc86bce147cf280ca2a60d36c8b6493cbf11e8 (patch)
tree510c9f80953d586f40af3b5ad0ffa5fc7c0b2ec9 /libguile/objcodes.h
parentafc74c2920d2f8f8424db9d6f554a91866cbac01 (diff)
downloadguile-b8bc86bce147cf280ca2a60d36c8b6493cbf11e8.tar.gz
instead of our custom .go format, use elf
* libguile/objcodes.c: Change to expect objcode on disk to be embedded in ELF instead of having the funky cookie. (to_native_order): Use already existing SCM_BYTE_ORDER style byte order instead of chars. (bytecode_to_objcode): No need for word_size arg. (scm_bytecode_to_objcode, scm_objcode_to_bytecode): Take optional endianness arg instead of sometimes using target-endianness. (scm_load_objcode, scm_write_objcode, scm_bytecode_to_native_objcode): Remove. * libguile/objcodes.h: Adapt. * libguile/vm.c (scm_load_compiled_with_vm): Use scm_load_thunk_from_file. (make_boot_program): Adapt to use scm_bytecode_to_objcode with endianness arg. * module/Makefile.am (OBJCODE_LANG_SOURCES): Add (language objcode elf). * module/language/objcode/elf.scm: New module, embeds objcode in ELF. * module/language/bytecode/spec.scm (compile-objcode): (decompile-objcode): Use (target-endianness). * module/language/objcode/spec.scm: use (language objcode elf) for write-objcode. * module/scripts/disassemble.scm (disassemble): * module/system/repl/command.scm (disassemble-file): Use load-thunk-from-file. * module/system/vm/objcode.scm: Remove load-objcode and write-objcode. * test-suite/tests/asm-to-bytecode.test (test-target): Adapt to the new ELF world.
Diffstat (limited to 'libguile/objcodes.h')
-rw-r--r--libguile/objcodes.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/libguile/objcodes.h b/libguile/objcodes.h
index 83ab79394..6ac333fa4 100644
--- a/libguile/objcodes.h
+++ b/libguile/objcodes.h
@@ -64,13 +64,10 @@ SCM_API SCM scm_load_thunk_from_file (SCM filename);
SCM_API SCM scm_load_thunk_from_memory (SCM bv);
SCM_API SCM scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr);
-SCM_API SCM scm_load_objcode (SCM file);
SCM_API SCM scm_objcode_p (SCM obj);
SCM_API SCM scm_objcode_meta (SCM objcode);
-SCM_API SCM scm_bytecode_to_objcode (SCM bytecode);
-SCM_INTERNAL SCM scm_bytecode_to_native_objcode (SCM bytecode);
-SCM_API SCM scm_objcode_to_bytecode (SCM objcode);
-SCM_API SCM scm_write_objcode (SCM objcode, SCM port);
+SCM_API SCM scm_bytecode_to_objcode (SCM bytecode, SCM endianness);
+SCM_API SCM scm_objcode_to_bytecode (SCM objcode, SCM endianness);
SCM_INTERNAL void scm_i_objcode_print (SCM objcode, SCM port,
scm_print_state *pstate);