added IStrings, added __index functionality

This commit is contained in:
2020-11-16 19:58:16 -06:00
parent c7be39a5d4
commit 204bec3d0a
8 changed files with 68 additions and 37 deletions

View File

@@ -211,8 +211,8 @@ void markRoots(CState *state) {
markTable(state, &state->globals);
// mark all internal strings
for (int i = 0; i < INTERNALSTRING_MAX; i++)
markObject(state, (CObj*)state->internalStrings[i]);
for (int i = 0; i < ISTRING_MAX; i++)
markObject(state, (CObj*)state->iStrings[i]);
// mark our proto object
markObject(state, (CObj*)state->protoObj);