|
|
|
@@ -53,14 +53,14 @@ namespace Memory { |
|
|
|
|
|
|
|
inline proc get_type(Lisp_Object* node) -> Lisp_Object_Type { |
|
|
|
// the type is in the bits 0 to 5 (including) |
|
|
|
return (Lisp_Object_Type) ((u64)node->flags & (u64)0xffffff); |
|
|
|
return (Lisp_Object_Type) ((u64)node->flags & (u64)0b11111); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline proc set_type(Lisp_Object* node, Lisp_Object_Type type) { |
|
|
|
// the type is in the bits 0 to 5 (including) |
|
|
|
u64 bitmask = (u64)-1; |
|
|
|
bitmask -= 0xffffff; |
|
|
|
bitmask -= 0b11111; |
|
|
|
bitmask += (u64) type; |
|
|
|
node->flags = (u64)(node->flags) | bitmask; |
|
|
|
} |
|
|
|
@@ -132,6 +132,7 @@ namespace Memory { |
|
|
|
index = free_spots_in_object_memory->data[free_spots_in_object_memory->next_index--]; |
|
|
|
} |
|
|
|
Lisp_Object* object = object_memory+index; |
|
|
|
object->flags = 0; |
|
|
|
object->sourceCodeLocation = nullptr; |
|
|
|
object->userType = nullptr; |
|
|
|
return object; |
|
|
|
|