fix f size crash
parent
43348dd4c4
commit
96964fd084
|
@ -29,3 +29,5 @@ prettyprint sequences strings test vectors words ;
|
||||||
full-gc
|
full-gc
|
||||||
full-gc
|
full-gc
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [ f size ] unit-test
|
||||||
|
|
|
@ -25,7 +25,10 @@ CELL object_size(CELL pointer)
|
||||||
size = sizeof(F_CONS);
|
size = sizeof(F_CONS);
|
||||||
break;
|
break;
|
||||||
case OBJECT_TYPE:
|
case OBJECT_TYPE:
|
||||||
size = untagged_object_size(UNTAG(pointer));
|
if(pointer == F)
|
||||||
|
size = 0;
|
||||||
|
else
|
||||||
|
size = untagged_object_size(UNTAG(pointer));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
critical_error("Cannot determine object_size",pointer);
|
critical_error("Cannot determine object_size",pointer);
|
||||||
|
@ -40,9 +43,6 @@ CELL untagged_object_size(CELL pointer)
|
||||||
{
|
{
|
||||||
CELL size;
|
CELL size;
|
||||||
|
|
||||||
if(pointer == F)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
switch(untag_header(get(pointer)))
|
switch(untag_header(get(pointer)))
|
||||||
{
|
{
|
||||||
case WORD_TYPE:
|
case WORD_TYPE:
|
||||||
|
|
Loading…
Reference in New Issue