mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Resolved #14
This commit is contained in:
@@ -144,7 +144,14 @@ static int writeLiteralTypeToCache(LiteralArray* literalCache, Literal literal)
|
||||
//push the store to the cache, tweaking the type
|
||||
Literal lit = TO_ARRAY_LITERAL(store);
|
||||
lit.type = LITERAL_TYPE_INTERMEDIATE; //NOTE: tweaking the type usually isn't a good idea
|
||||
return pushLiteralArray(literalCache, lit);
|
||||
|
||||
//BUGFIX: check if exactly this literal array exists
|
||||
int index = findLiteralIndex(literalCache, lit);
|
||||
if (index < 0) {
|
||||
index = pushLiteralArray(literalCache, lit);
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static int writeLiteralToCompiler(Compiler* compiler, Literal literal) {
|
||||
|
||||
Reference in New Issue
Block a user