Merge pull request #51 from dcurrie/type-artype-overconstrained
Eliminated caching of over-constrained array types for cvalues
This commit is contained in:
commit
44f7d8fd25
8
types.c
8
types.c
|
@ -48,7 +48,7 @@ fltype_t *get_type(value_t t)
|
||||||
ft->elsz = eltype->size;
|
ft->elsz = eltype->size;
|
||||||
ft->eltype = eltype;
|
ft->eltype = eltype;
|
||||||
ft->init = &cvalue_array_init;
|
ft->init = &cvalue_array_init;
|
||||||
eltype->artype = ft;
|
//eltype->artype = ft; -- this is a bad idea since some types carry array sizes
|
||||||
}
|
}
|
||||||
else if (car_(t) == enumsym) {
|
else if (car_(t) == enumsym) {
|
||||||
ft->numtype = T_INT32;
|
ft->numtype = T_INT32;
|
||||||
|
@ -62,9 +62,9 @@ fltype_t *get_type(value_t t)
|
||||||
fltype_t *get_array_type(value_t eltype)
|
fltype_t *get_array_type(value_t eltype)
|
||||||
{
|
{
|
||||||
fltype_t *et = get_type(eltype);
|
fltype_t *et = get_type(eltype);
|
||||||
if (et->artype != NULL)
|
if (et->artype == NULL)
|
||||||
return et->artype;
|
et->artype = get_type(fl_list2(arraysym, eltype));
|
||||||
return get_type(fl_list2(arraysym, eltype));
|
return et->artype;
|
||||||
}
|
}
|
||||||
|
|
||||||
fltype_t *define_opaque_type(value_t sym, size_t sz, cvtable_t *vtab,
|
fltype_t *define_opaque_type(value_t sym, size_t sz, cvtable_t *vtab,
|
||||||
|
|
Loading…
Reference in New Issue