Initial tricolor implementation
This commit is contained in:
+3
-4
@@ -54,7 +54,7 @@ static ALWAYS_INLINE fixnum_t XFIXNUM(LispVal *val) {
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE LispVal *MAKE_FIXNUM(fixnum_t fn) {
|
||||
return (LispVal *) ((fn << 2) | FIXNUM_TAG);
|
||||
return (LispVal *) ((((uintptr_t) fn) << 2) | FIXNUM_TAG);
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE bool LISP_FLOAT_P(LispVal *val) {
|
||||
@@ -133,9 +133,8 @@ static ALWAYS_INLINE bool OBJECT_STATIC_P(LispVal *val) {
|
||||
}
|
||||
|
||||
static inline void MARK_OBJECT_ADDED(LispVal *val, LispVal *into) {
|
||||
ObjectGCSet val_set = OBJECT_GET_GC_SET(val);
|
||||
ObjectGCSet into_set = OBJECT_GET_GC_SET(into);
|
||||
if (into_set == GC_BLACK && val_set == GC_WHITE) {
|
||||
if ((!OBJECT_GC_SET_P(into, GC_WHITE) || OBJECT_STATIC_P(into))
|
||||
&& OBJECT_GC_SET_P(val, GC_WHITE)) {
|
||||
gc_move_to_set(val, GC_GREY);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user