Fixed array/dictionary confusion

This commit is contained in:
2022-08-13 16:31:11 +01:00
parent 3098d75d01
commit 74e2907f09

View File

@@ -88,7 +88,7 @@ static int writeNodeCompoundToCache(Compiler* compiler, Node* node) {
} }
//push the store to the cache, with instructions about how pack it //push the store to the cache, with instructions about how pack it
index = pushLiteralArray(&compiler->literalCache, TO_ARRAY_LITERAL(store)); //WARNING: pushed as a dictionary, so below can recognize it index = pushLiteralArray(&compiler->literalCache, TO_DICTIONARY_LITERAL(store)); //WARNING: pushed as a dictionary, so below can recognize it
} }
else if (node->compound.literalType == LITERAL_ARRAY) { else if (node->compound.literalType == LITERAL_ARRAY) {
//ensure each literal value is in the cache, individually //ensure each literal value is in the cache, individually
@@ -439,6 +439,7 @@ unsigned char* collateCompiler(Compiler* compiler, int* size) {
} }
freeLiteralArray(ptr); freeLiteralArray(ptr);
FREE(LiteralArray, ptr);
} }
break; break;