diff --git a/bigint/build/bin/testbip b/bigint/build/bin/testbip index fe1abeb..c0c5747 100755 Binary files a/bigint/build/bin/testbip and b/bigint/build/bin/testbip differ diff --git a/bigint/build/lib/libbigint.a b/bigint/build/lib/libbigint.a index c0a84ef..9f6db6c 100644 Binary files a/bigint/build/lib/libbigint.a and b/bigint/build/lib/libbigint.a differ diff --git a/bigint/src/libbigint.a b/bigint/src/libbigint.a index c0a84ef..9f6db6c 100644 Binary files a/bigint/src/libbigint.a and b/bigint/src/libbigint.a differ diff --git a/bigint/tst/testbip b/bigint/tst/testbip index fe1abeb..c0c5747 100755 Binary files a/bigint/tst/testbip and b/bigint/tst/testbip differ diff --git a/njvm.c b/njvm.c index 1c7654d..3e58ea7 100644 --- a/njvm.c +++ b/njvm.c @@ -51,7 +51,7 @@ void execute(struct program program) { ObjRef tempObj2; int tempInt; for (i = 0; i < *program.size; ++i) { - if (debug == 1 || bp == i) debugMenu(fp, stack, &debug, i, &bp); +// if (debug == 1 || bp == i) debugMenu(fp, stack, &debug, i, &bp); if (debug == 1) printf("(%i)", i); switch (program.program[i] >> 24) { case HALT: @@ -360,7 +360,6 @@ ObjRef relocate(ObjRef orig) { printf("%s%d\n","Size in relocate ", GET_SIZE(orig)); } */ - ObjRef copy; if (orig == NULL) { /* relocate(nil) = nil */ diff --git a/njvm.o b/njvm.o index 52d9611..702c0e0 100644 Binary files a/njvm.o and b/njvm.o differ diff --git a/record.c b/record.c index 130b910..b47feac 100644 --- a/record.c +++ b/record.c @@ -23,6 +23,7 @@ ObjRef newRecord(int size){ } int getSize(ObjRef arr){ if(arr == NULL) return 0; + if(IS_PRIMITIVE(arr)) perror("Record is a primitive"); return GET_ELEMENT_COUNT(arr); } ObjRef getField(ObjRef arr, int point){ @@ -30,6 +31,7 @@ ObjRef getField(ObjRef arr, int point){ if(0 > point || point > getSize(arr)){ printf("Index %i out of bounds for length %i\n",point, getSize(arr)); } + return *(ObjRef *)GET_REFS_PTR(arr)[point]->data; } void setField(ObjRef arr, int point, ObjRef value){