don't copy i32slice bytecode in compileAll
This commit is contained in:
parent
51ab5db2c8
commit
0c88263659
10
src/vm.c
10
src/vm.c
@ -453,11 +453,11 @@ Block* compileBlock(B block, Comp* comp, bool* bDone, u32* bc, usz bcIA, B allBl
|
|||||||
|
|
||||||
// consumes all; assumes arguments are valid (verifies some stuff, but definitely not everything)
|
// consumes all; assumes arguments are valid (verifies some stuff, but definitely not everything)
|
||||||
// if sc isn't NULL, this block must only be evaluated directly in that scope precisely once
|
// if sc isn't NULL, this block must only be evaluated directly in that scope precisely once
|
||||||
NOINLINE Block* compileAll(B bcq, B objs, B allBlocks, B allBodies, B indices, B tokenInfo, B src, B fullpath, Scope* sc, i32 nsResult) {
|
NOINLINE Block* compileAll(B bc_obj, B objs, B allBlocks, B allBodies, B indices, B tokenInfo, B src, B fullpath, Scope* sc, i32 nsResult) {
|
||||||
usz bIA = IA(allBlocks);
|
usz bIA = IA(allBlocks);
|
||||||
I32Arr* bca = toI32Arr(bcq);
|
bc_obj = toI32Any(bc_obj);
|
||||||
u32* bc = (u32*)bca->a;
|
u32* bc = (u32*)i32any_ptr(bc_obj);
|
||||||
usz bcIA = PIA(bca);
|
usz bcIA = IA(bc_obj);
|
||||||
Comp* comp = mm_alloc(sizeof(Comp), t_comp);
|
Comp* comp = mm_alloc(sizeof(Comp), t_comp);
|
||||||
NOGC_S;
|
NOGC_S;
|
||||||
comp->indices = indices;
|
comp->indices = indices;
|
||||||
@ -494,7 +494,7 @@ NOINLINE Block* compileAll(B bcq, B objs, B allBlocks, B allBodies, B indices, B
|
|||||||
for (usz i = 0; i < bIA; i++) bDone[i] = false;
|
for (usz i = 0; i < bIA; i++) bDone[i] = false;
|
||||||
Block* ret = compileBlock(IGetU(allBlocks, 0), comp, bDone, bc, bcIA, allBlocks, allBodies, nameList, sc, 0, 0, nsResult);
|
Block* ret = compileBlock(IGetU(allBlocks, 0), comp, bDone, bc, bcIA, allBlocks, allBodies, nameList, sc, 0, 0, nsResult);
|
||||||
TFREE(bDone);
|
TFREE(bDone);
|
||||||
ptr_dec(comp); decG(allBlocks); decG(allBodies); dec(tokenInfo); decG(taga(bca));
|
ptr_dec(comp); decG(allBlocks); decG(allBodies); dec(tokenInfo); decG(bc_obj);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user