diff options
author | Andy Wingo <wingo@pobox.com> | 2019-08-26 10:19:24 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-08-26 10:19:24 +0200 |
commit | b02d1b08d7d7f0eaafdd9dcfc3de3a139b25492e (patch) | |
tree | aa592b5ff98f92d9159a52cc662a4ed25c7f9f93 /module/language/cps/compile-bytecode.scm | |
parent | b959708114ad88c90cd77a08a9b9dcf6e0d4f446 (diff) | |
download | guile-b02d1b08d7d7f0eaafdd9dcfc3de3a139b25492e.tar.gz |
Compiler allocates boxed flonums in unmarked space
This fixes a bug whereby the compiler would sometimes allocate floats in
marked space.
* libguile/gc-inline.h (scm_inline_gc_malloc_pointerless_words): New
internal helper.
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS):
* libguile/intrinsics.c (allocate_pointerless_words):
(allocate_pointerless_words_with_freelist): New intrinsics.
* libguile/jit.c (compile_allocate_pointerless_words):
(compile_allocate_pointerless_words_immediate): New compilers.
* libguile/vm-engine.c (allocate_pointerless_words)
(allocate_pointerless_words_immediate): New opcodes.
* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/effects-analysis.scm (param):
* module/language/cps/reify-primitives.scm (reify-primitives):
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
* module/language/cps/types.scm (allocate-words):
(allocate-words/immediate):
* module/system/vm/assembler.scm (system): Add support for the new
opcodes.
Diffstat (limited to 'module/language/cps/compile-bytecode.scm')
-rw-r--r-- | module/language/cps/compile-bytecode.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm index ff593171b..6e7dab8ef 100644 --- a/module/language/cps/compile-bytecode.scm +++ b/module/language/cps/compile-bytecode.scm @@ -162,6 +162,12 @@ (emit-allocate-words asm (from-sp dst) (from-sp (slot nfields)))) (($ $primcall 'allocate-words/immediate (annotation . nfields)) (emit-allocate-words/immediate asm (from-sp dst) nfields)) + (($ $primcall 'allocate-pointerless-words annotation (nfields)) + (emit-allocate-pointerless-words asm (from-sp dst) + (from-sp (slot nfields)))) + (($ $primcall 'allocate-pointerless-words/immediate + (annotation . nfields)) + (emit-allocate-pointerless-words/immediate asm (from-sp dst) nfields)) (($ $primcall 'scm-ref annotation (obj idx)) (emit-scm-ref asm (from-sp dst) (from-sp (slot obj)) (from-sp (slot idx)))) |