Skip to content

Commit

Permalink
Do not cache the type before we finish constructing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Jun 6, 2015
1 parent 6b94780 commit 432c6f4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/jltypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2008,8 +2008,6 @@ static jl_value_t *inst_datatype(jl_datatype_t *dt, jl_svec_t *p, jl_value_t **i
ndt->size = 0;
ndt->alignment = 1;

if (cacheable) jl_cache_type_(ndt);

if (istuple)
ndt->super = jl_any_type;
else
Expand Down Expand Up @@ -2047,6 +2045,7 @@ static jl_value_t *inst_datatype(jl_datatype_t *dt, jl_svec_t *p, jl_value_t **i
ndt->ninitialized = ntp;
else
ndt->ninitialized = dt->ninitialized;
if (cacheable) jl_cache_type_(ndt);
JL_GC_POP();
return (jl_value_t*)ndt;
}
Expand Down

0 comments on commit 432c6f4

Please sign in to comment.