mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
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.
This commit is contained in:
parent
b959708114
commit
b02d1b08d7
11 changed files with 145 additions and 5 deletions
|
@ -3280,8 +3280,40 @@ VM_NAME (scm_thread *thread)
|
|||
NEXT (2);
|
||||
}
|
||||
|
||||
VM_DEFINE_OP (157, unused_157, NULL, NOP)
|
||||
VM_DEFINE_OP (158, unused_158, NULL, NOP)
|
||||
/* allocate-pointerless-words dst:12 count:12
|
||||
*
|
||||
* Allocate a fresh object consisting of COUNT words and store it into
|
||||
* DST. The result will not be traced by GC. COUNT is a u64 local.
|
||||
*/
|
||||
VM_DEFINE_OP (157, allocate_pointerless_words, "allocate-pointerless-words", DOP1 (X8_S12_S12))
|
||||
{
|
||||
uint16_t dst, size;
|
||||
|
||||
UNPACK_12_12 (op, dst, size);
|
||||
|
||||
SYNC_IP ();
|
||||
SP_SET (dst, CALL_INTRINSIC (allocate_pointerless_words,
|
||||
(thread, SP_REF_U64 (size))));
|
||||
NEXT (1);
|
||||
}
|
||||
|
||||
/* allocate-words/immediate dst:12 count:12
|
||||
*
|
||||
* Allocate a fresh object consisting of COUNT words and store it into
|
||||
* DST. The result will not be traced by GC. COUNT is an immediate.
|
||||
*/
|
||||
VM_DEFINE_OP (158, allocate_pointerless_words_immediate, "allocate-pointerless-words/immediate", DOP1 (X8_S12_C12))
|
||||
{
|
||||
uint16_t dst, size;
|
||||
|
||||
UNPACK_12_12 (op, dst, size);
|
||||
|
||||
SYNC_IP ();
|
||||
SP_SET (dst, CALL_INTRINSIC (allocate_pointerless_words, (thread, size)));
|
||||
|
||||
NEXT (1);
|
||||
}
|
||||
|
||||
VM_DEFINE_OP (159, unused_159, NULL, NOP)
|
||||
VM_DEFINE_OP (160, unused_160, NULL, NOP)
|
||||
VM_DEFINE_OP (161, unused_161, NULL, NOP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue