Need to parenthesize "n" in SPECIAL_VALUE macro for precedence.
This was causing the type tags to overlap with fixnums.
This commit is contained in:
parent
26819cafdc
commit
dc35896174
4
gc.h
4
gc.h
|
|
@ -25,13 +25,13 @@ typedef intptr_t fixnum_t;
|
|||
|
||||
/* Special values (0 <= n < 1024) */
|
||||
/* These correspond to objects within the first page of memory */
|
||||
#define SPECIAL_VALUE(n) ((value_t)(4*n+2))
|
||||
#define SPECIAL_VALUE(n) ((value_t)(4*(n)+2))
|
||||
#define TYPE_TAG(n) SPECIAL_VALUE(768+(n))
|
||||
#define MAX_SPECIAL SPECIAL_VALUE(1023)
|
||||
|
||||
#define BROKEN_HEART SPECIAL_VALUE(0)
|
||||
#define FALSE_VALUE SPECIAL_VALUE(1)
|
||||
#define TRUE_VALUE SPECIAL_VALUE(2)
|
||||
#define TYPE_TAG(n) SPECIAL_VALUE(2+(n))
|
||||
|
||||
#define TYPE_TAG_BOX TYPE_TAG(0)
|
||||
#define TYPE_TAG_VECTOR TYPE_TAG(1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue