added support for NaN boxing (8 byte CValues!)

This commit is contained in:
2020-12-04 00:04:14 -06:00
parent 495f1d7272
commit b936827cc6
8 changed files with 148 additions and 83 deletions

View File

@@ -98,7 +98,7 @@ int disasmInstr(CChunk *chunk, int offset, int indent) {
int index = readu16Chunk(chunk, offset + 1);
printf("%-16s [%05d] - ", "OP_CLOSURE", index);
CValue val = chunk->constants.values[index];
CObjFunction *cobjFunc = (CObjFunction*)val.val.obj;
CObjFunction *cobjFunc = (CObjFunction*)cosmoV_readObj(val);
offset += 3; // we consumed the opcode + u16
printValue(val);