Fix non-tail recursive inline recursive compilation
parent
77a877789a
commit
bd02eef38e
|
@ -40,7 +40,7 @@ SYMBOL: labels
|
|||
V{ } clone calls set ;
|
||||
|
||||
: generate-insns ( asm -- code )
|
||||
dup word>> [
|
||||
dup label>> [
|
||||
init-generator
|
||||
instructions>> [
|
||||
[ class insn-counts get inc-at ]
|
||||
|
|
|
@ -4,7 +4,7 @@ USING: arrays byte-arrays byte-vectors generic assocs hashtables
|
|||
io.binary kernel kernel.private math namespaces make sequences
|
||||
words quotations strings alien.accessors alien.strings layouts
|
||||
system combinators math.bitwise math.order
|
||||
accessors growable fry generalizations compiler.constants ;
|
||||
accessors growable fry compiler.constants ;
|
||||
IN: compiler.codegen.fixup
|
||||
|
||||
! Owner
|
||||
|
@ -114,8 +114,7 @@ SYMBOL: relocation-table
|
|||
init-fixup
|
||||
@
|
||||
label-table [ resolve-labels ] change
|
||||
compiling-word get
|
||||
literal-table get >array
|
||||
relocation-table get >byte-array
|
||||
label-table get
|
||||
] B{ } make 5 narray ; inline
|
||||
] B{ } make 4array ; inline
|
||||
|
|
|
@ -113,17 +113,16 @@ void factor_vm::primitive_modify_code_heap()
|
|||
case ARRAY_TYPE:
|
||||
{
|
||||
array *compiled_data = data.as<array>().untagged();
|
||||
cell owner = array_nth(compiled_data,0);
|
||||
cell literals = array_nth(compiled_data,1);
|
||||
cell relocation = array_nth(compiled_data,2);
|
||||
cell labels = array_nth(compiled_data,3);
|
||||
cell code = array_nth(compiled_data,4);
|
||||
cell literals = array_nth(compiled_data,0);
|
||||
cell relocation = array_nth(compiled_data,1);
|
||||
cell labels = array_nth(compiled_data,2);
|
||||
cell code = array_nth(compiled_data,3);
|
||||
|
||||
code_block *compiled = add_code_block(
|
||||
code_block_optimized,
|
||||
code,
|
||||
labels,
|
||||
owner,
|
||||
word.value(),
|
||||
relocation,
|
||||
literals);
|
||||
|
||||
|
|
Loading…
Reference in New Issue