Pack 'em up!

This commit is contained in:
2023-02-10 21:32:28 +00:00
parent aeb008c684
commit be4cbf1ad6
6 changed files with 59 additions and 53 deletions

View File

@@ -1254,8 +1254,8 @@ bool Toy_callLiteralFn(Toy_Interpreter* interpreter, Toy_Literal func, Toy_Liter
//init the inner interpreter manually
Toy_initLiteralArray(&inner.literalCache);
inner.scope = Toy_pushScope(func.as.function.scope);
inner.bytecode = TOY_AS_FUNCTION(func).bytecode;
inner.length = TOY_AS_FUNCTION(func).length;
inner.bytecode = TOY_AS_FUNCTION(func).inner.bytecode;
inner.length = TOY_AS_FUNCTION_BYTECODE_LENGTH(func);
inner.count = 0;
inner.codeStart = -1;
inner.depth = interpreter->depth + 1;