|
@@ -297,7 +297,7 @@ HL_PRIM int hl_mark_size( int data_size );
|
|
HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
|
|
HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
|
|
int i, j;
|
|
int i, j;
|
|
int max_size = 0;
|
|
int max_size = 0;
|
|
- unsigned int *mark;
|
|
|
|
|
|
+ //unsigned int *mark;
|
|
for(i=0;i<et->tenum->nconstructs;i++) {
|
|
for(i=0;i<et->tenum->nconstructs;i++) {
|
|
hl_enum_construct *c = et->tenum->constructs + i;
|
|
hl_enum_construct *c = et->tenum->constructs + i;
|
|
c->hasptr = false;
|
|
c->hasptr = false;
|
|
@@ -311,6 +311,10 @@ HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
|
|
}
|
|
}
|
|
if( c->size > max_size && c->hasptr ) max_size = c->size;
|
|
if( c->size > max_size && c->hasptr ) max_size = c->size;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // mark bits will be only work here if enums are dynamic !
|
|
|
|
+
|
|
|
|
+ /*
|
|
mark = (unsigned int*)hl_zalloc(&m->alloc,hl_mark_size(max_size));
|
|
mark = (unsigned int*)hl_zalloc(&m->alloc,hl_mark_size(max_size));
|
|
for(i=0;i<et->tenum->nconstructs;i++) {
|
|
for(i=0;i<et->tenum->nconstructs;i++) {
|
|
hl_enum_construct *c = et->tenum->constructs + i;
|
|
hl_enum_construct *c = et->tenum->constructs + i;
|
|
@@ -322,6 +326,7 @@ HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
et->mark_bits = mark;
|
|
et->mark_bits = mark;
|
|
|
|
+ */
|
|
}
|
|
}
|
|
|
|
|
|
HL_PRIM varray* hl_type_enum_fields( hl_type *t ) {
|
|
HL_PRIM varray* hl_type_enum_fields( hl_type *t ) {
|