diff options
author | Andy Wingo <wingo@pobox.com> | 2013-11-10 19:27:19 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-11-10 19:27:19 +0100 |
commit | 4c906ad5a5e0404e8b488b525f6b62f405b4d560 (patch) | |
tree | 3d2f69e6931b4c52811df729f3528d92cec26f7d /libguile/objcodes.c | |
parent | 863dd873628a971176556a1da1bf2ab3f0ff5e55 (diff) | |
download | guile-4c906ad5a5e0404e8b488b525f6b62f405b4d560.tar.gz |
Add specialize-primcalls pass; bump objcode version.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
* libguile/objcodes.c (process_dynamic_segment): Expect the minor
version to be present and, while we are still banging on the VM,
exactly equal to SCM_OBJCODE_MINOR_VERSION.
* libguile/vm-engine.c: Renumber ops. Remove the general make-vector.
Rename constant-FOO to FOO/immediate. Remove struct-ref and
struct-set!, replace with struct-ref/immediate and
struct-set!/immediate.
* module/Makefile.am:
* module/language/cps/specialize-primcalls.scm: New pass, inlines FOO to
FOO/immediate -- e.g. vector-ref to vector-ref/immediate.
* module/language/cps/arities.scm: Remove struct-set! case, now that
there is no struct-set! opcode.
* module/language/cps/compile-rtl.scm (compile-fun): Remove dispatch to
constant-FOO versus FOO here -- that decision is made by
specialize-primcalls.
(optimize): Add specialize-primcalls pass.
* module/language/cps/dfg.scm (constant-needs-allocation?): Adapt to
name changes.
* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
(*primitive-constructors*): Add allocate-struct.
* module/system/vm/assembler.scm (*bytecode-major-version*):
(*bytecode-minor-version*, link-dynamic-section): Write minor version
into resulting image.
Diffstat (limited to 'libguile/objcodes.c')
-rw-r--r-- | libguile/objcodes.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libguile/objcodes.c b/libguile/objcodes.c index 358a1e77a..0515a7cb5 100644 --- a/libguile/objcodes.c +++ b/libguile/objcodes.c @@ -290,7 +290,12 @@ process_dynamic_segment (char *base, Elf_Phdr *dyn_phdr, { case 0x0202: bytecode_kind = BYTECODE_KIND_GUILE_2_2; - if (minor) + /* As we get closer to 2.2, we will allow for backwards + compatibility and we can change this test to ">" + instead of "!=". However until then, to deal with VM + churn it's best to keep these things in + lock-step. */ + if (minor != SCM_OBJCODE_MINOR_VERSION) return "incompatible bytecode version"; break; default: |