33 POLAR_RUNTIME_OBJECT_CLASS(superclass_polar_class_table_node)->init( (
polar_runtime_object *)self );
37 self->count_references = 1;
38 self->class_target = Nil;
47 objc_atomic_exchange_pointer( (
void **)(&self->class_target), Nil );
49 polar_list_node_list_free( (
polar_list_node **)(&self->list_class_duplicates) );
51 polar_memory_free(self->array_inheritance, self->count_superclasses << OBJC_SIZE_SHIFT_POINTER);
52 self->array_inheritance = NULL;
54 self->count_references = 0;
57 return POLAR_RUNTIME_OBJECT_CLASS(superclass_polar_class_table_node)->finalize( (
polar_runtime_object *)self );
60POLAR_FUNCTION_INTERNAL
void
64 superclass_polar_class_table_node = POLAR_RUNTIME_OBJECT_CLASS(self)->class_superclass;
70 (polar_func_runtime_object_lifecycle)_polar_class_table_node_finalize;
75 .name_type =
"polar_class_table_node",
78 .type_class_init = (polar_func_runtime_object_class_lifecycle)_polar_class_table_node_class_init
83POLAR_FUNCTION_INTERNAL OBJC_FUNCTION_CONSTANT polar_internal_type
84polar_class_table_node_get_type(
void )
86 static polar_internal_type pt_polar_class_table_node = POLAR_INTERNAL_TYPE_INVALID;
88 if( pt_polar_class_table_node != POLAR_INTERNAL_TYPE_INVALID )
89 return pt_polar_class_table_node;
91 pt_polar_class_table_node = polar_internal_type_init( POLAR_TYPE_HASH_TABLE_NODE_STRING_KEY,
92 &class_polar_class_table_node, &pti_polar_class_table_node );
94 return pt_polar_class_table_node;
97POLAR_FUNCTION_INTERNAL
void
100 assert( POLAR_IS_CLASS_TABLE_NODE(self) );
101 assert( self->array_inheritance == NULL );
103 if( POLAR_IS_CLASS_TABLE_NODE(node_superclass) )
105 self->ofs_class_private_data = node_superclass->ofs_class_private_data;
107 self->count_superclasses = ( node_superclass->count_superclasses + 1 );
108 self->array_inheritance = (
struct objc_class **)
109 polar_memory_allocate( self->count_superclasses << OBJC_SIZE_SHIFT_POINTER );
111 if( node_superclass->array_inheritance != NULL )
113 assert( self->count_superclasses >= 1 );
115 objc_memcpy( &self->array_inheritance[1], &node_superclass->array_inheritance[0],
116 node_superclass->count_superclasses << OBJC_SIZE_SHIFT_POINTER );
119 self->array_inheritance[0] = node_superclass->class_target;
Definition polar-class-table-node.h:38
Definition polar-class-table-node.h:24
Definition polar-internal-type.h:34
Definition polar-list-node.h:25
Definition polar-runtime-object.h:36
Definition polar-runtime-object.h:31