diff --git a/Make.inc b/Make.inc index 6eec72634ccd89..7734667e412c87 100644 --- a/Make.inc +++ b/Make.inc @@ -338,6 +338,10 @@ CXX := $(CROSS_COMPILE)g++ JCFLAGS := -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 JCPPFLAGS := JCXXFLAGS := -pipe $(fPIC) -fno-rtti +ifneq ($(OS), WINNT) +# Do no enable on windows to avoid warnings from libuv. +JCXXFLAGS += -pedantic +endif DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all SHIPFLAGS := -O3 -ggdb1 -falign-functions endif @@ -347,7 +351,7 @@ CC := $(CROSS_COMPILE)clang CXX := $(CROSS_COMPILE)clang++ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 JCPPFLAGS := -JCXXFLAGS := -pipe $(fPIC) -fno-rtti +JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all SHIPFLAGS := -O3 -g ifeq ($(OS), Darwin) diff --git a/src/array.c b/src/array.c index 31e38e00b67773..32067535644fbb 100644 --- a/src/array.c +++ b/src/array.c @@ -83,7 +83,7 @@ static jl_array_t *_new_array_(jl_value_t *atype, uint32_t ndims, size_t *dims, tsz = JL_ARRAY_ALIGN(tsz, 16); // align whole object 16 a = (jl_array_t*)jl_gc_allocobj(tsz); jl_set_typeof(a, atype); - a->how = 0; + a->flags.how = 0; data = (char*)a + doffs; if (tot > 0 && !isunboxed) { memset(data, 0, tot); @@ -96,10 +96,10 @@ static jl_array_t *_new_array_(jl_value_t *atype, uint32_t ndims, size_t *dims, jl_set_typeof(a, atype); // temporarily initialize to make gc-safe a->data = NULL; - a->how = 2; + a->flags.how = 2; // Make sure the GC can correctly identify if this is pool allocated // and mark the page accordingly - a->pooled = tsz <= GC_MAX_SZCLASS; + a->flags.pooled = tsz <= GC_MAX_SZCLASS; data = jl_gc_managed_malloc(tot); jl_gc_track_malloced_array(a); @@ -107,18 +107,18 @@ static jl_array_t *_new_array_(jl_value_t *atype, uint32_t ndims, size_t *dims, memset(data, 0, tot); JL_GC_POP(); } - a->pooled = tsz <= GC_MAX_SZCLASS; + a->flags.pooled = tsz <= GC_MAX_SZCLASS; a->data = data; if (elsz == 1) ((char*)data)[tot-1] = '\0'; #ifdef STORE_ARRAY_LEN a->length = nel; #endif - a->ndims = ndims; - a->ptrarray = !isunboxed; + a->flags.ndims = ndims; + a->flags.ptrarray = !isunboxed; a->elsize = elsz; - a->isshared = 0; - a->isaligned = 1; + a->flags.isshared = 0; + a->flags.isaligned = 1; a->offset = 0; if (ndims == 1) { a->nrows = nel; @@ -160,35 +160,35 @@ JL_DLLEXPORT jl_array_t *jl_reshape_array(jl_value_t *atype, jl_array_t *data, int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t) + sizeof(void*), 16); a = (jl_array_t*)jl_gc_allocobj(tsz); jl_set_typeof(a, atype); - a->pooled = tsz <= GC_MAX_SZCLASS; - a->ndims = ndims; + a->flags.pooled = tsz <= GC_MAX_SZCLASS; + a->flags.ndims = ndims; a->offset = 0; a->data = NULL; - a->isaligned = data->isaligned; + a->flags.isaligned = data->flags.isaligned; jl_value_t *el_type = jl_tparam0(atype); if (store_unboxed(el_type)) { a->elsize = jl_datatype_size(el_type); - a->ptrarray = 0; + a->flags.ptrarray = 0; } else { a->elsize = sizeof(void*); - a->ptrarray = 1; + a->flags.ptrarray = 1; } JL_GC_PUSH1(&a); jl_array_t *owner = data; // if data is itself a shared wrapper, // owner should point back to the original array - if (owner->how == 3) { + if (owner->flags.how == 3) { owner = (jl_array_t*)jl_array_data_owner(owner); } - assert(owner->how != 3); + assert(owner->flags.how != 3); jl_array_data_owner(a) = (jl_value_t*)owner; - a->how = 3; + a->flags.how = 3; a->data = data->data; - a->isshared = 1; - data->isshared = 1; + a->flags.isshared = 1; + data->flags.isshared = 1; if (ndims == 1) { size_t l = ((size_t*)jl_data_ptr(dims))[0]; @@ -236,23 +236,23 @@ JL_DLLEXPORT jl_array_t *jl_ptr_to_array_1d(jl_value_t *atype, void *data, int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t), 16); a = (jl_array_t*)jl_gc_allocobj(tsz); jl_set_typeof(a, atype); - a->pooled = tsz <= GC_MAX_SZCLASS; + a->flags.pooled = tsz <= GC_MAX_SZCLASS; a->data = data; #ifdef STORE_ARRAY_LEN a->length = nel; #endif a->elsize = elsz; - a->ptrarray = !isunboxed; - a->ndims = 1; - a->isshared = 1; - a->isaligned = 0; // TODO: allow passing memalign'd buffers + a->flags.ptrarray = !isunboxed; + a->flags.ndims = 1; + a->flags.isshared = 1; + a->flags.isaligned = 0; // TODO: allow passing memalign'd buffers if (own_buffer) { - a->how = 2; + a->flags.how = 2; jl_gc_track_malloced_array(a); jl_gc_count_allocd(nel*elsz + (elsz == 1 ? 1 : 0)); } else { - a->how = 0; + a->flags.how = 0; } a->nrows = nel; @@ -287,24 +287,24 @@ JL_DLLEXPORT jl_array_t *jl_ptr_to_array(jl_value_t *atype, void *data, int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t), 16); a = (jl_array_t*)jl_gc_allocobj(tsz); jl_set_typeof(a, atype); - a->pooled = tsz <= GC_MAX_SZCLASS; + a->flags.pooled = tsz <= GC_MAX_SZCLASS; a->data = data; #ifdef STORE_ARRAY_LEN a->length = nel; #endif a->elsize = elsz; - a->ptrarray = !isunboxed; - a->ndims = ndims; + a->flags.ptrarray = !isunboxed; + a->flags.ndims = ndims; a->offset = 0; - a->isshared = 1; - a->isaligned = 0; + a->flags.isshared = 1; + a->flags.isaligned = 0; if (own_buffer) { - a->how = 2; + a->flags.how = 2; jl_gc_track_malloced_array(a); jl_gc_count_allocd(nel*elsz + (elsz == 1 ? 1 : 0)); } else { - a->how = 0; + a->flags.how = 0; } if (ndims == 1) { @@ -430,7 +430,7 @@ JL_DLLEXPORT jl_value_t *jl_arrayref(jl_array_t *a, size_t i) { assert(i < jl_array_len(a)); jl_value_t *elt; - if (!a->ptrarray) { + if (!a->flags.ptrarray) { jl_value_t *el_type = (jl_value_t*)jl_tparam0(jl_typeof(a)); elt = jl_new_bits(el_type, &((char*)a->data)[i*a->elsize]); } @@ -477,7 +477,7 @@ JL_CALLABLE(jl_f_arrayref) JL_DLLEXPORT int jl_array_isassigned(jl_array_t *a, size_t i) { - if (a->ptrarray) + if (a->flags.ptrarray) return ((jl_value_t**)jl_array_data(a))[i] != NULL; return 1; } @@ -506,7 +506,7 @@ int jl_array_isdefined(jl_value_t **args0, int nargs) if (i >= stride) return 0; - if (a->ptrarray) + if (a->flags.ptrarray) return ((jl_value_t**)jl_array_data(a))[i] != NULL; return 1; } @@ -519,13 +519,13 @@ JL_DLLEXPORT void jl_arrayset(jl_array_t *a, jl_value_t *rhs, size_t i) if (!jl_subtype(rhs, el_type, 1)) jl_type_error("arrayset", el_type, rhs); } - if (!a->ptrarray) { + if (!a->flags.ptrarray) { jl_assign_bits(&((char*)a->data)[i*a->elsize], rhs); } else { ((jl_value_t**)a->data)[i] = rhs; jl_value_t *owner = (jl_value_t*)a; - if (a->how == 3) { + if (a->flags.how == 3) { owner = jl_array_data_owner(a); } jl_gc_wb(owner, rhs); @@ -547,7 +547,7 @@ JL_DLLEXPORT void jl_arrayunset(jl_array_t *a, size_t i) if (i >= jl_array_len(a)) jl_bounds_error_int((jl_value_t*)a, i+1); char *ptail = (char*)a->data + i*a->elsize; - if (a->ptrarray) + if (a->flags.ptrarray) memset(ptail, 0, a->elsize); } @@ -567,12 +567,12 @@ static void array_resize_buffer(jl_array_t *a, size_t newlen, size_t oldlen, siz size_t oldoffsnb = a->offset * es; if (es == 1) nbytes++; - assert(!a->isshared || a->how==3); + assert(!a->flags.isshared || a->flags.how==3); char *newdata; - if (a->how == 2) { + if (a->flags.how == 2) { // already malloc'd - use realloc newdata = (char*)jl_gc_managed_realloc((char*)a->data - oldoffsnb, nbytes, - oldnbytes+oldoffsnb, a->isaligned, (jl_value_t*)a); + oldnbytes+oldoffsnb, a->flags.isaligned, (jl_value_t*)a); if (offs != a->offset) { memmove(&newdata[offsnb], &newdata[oldoffsnb], oldnbytes); } @@ -587,29 +587,29 @@ static void array_resize_buffer(jl_array_t *a, size_t newlen, size_t oldlen, siz ) { newdata = (char*)jl_gc_managed_malloc(nbytes); jl_gc_track_malloced_array(a); - a->how = 2; - a->isaligned = 1; + a->flags.how = 2; + a->flags.isaligned = 1; } else { newdata = (char*)allocb(nbytes); - a->how = 1; + a->flags.how = 1; } memcpy(newdata + offsnb, (char*)a->data, oldnbytes); } a->data = newdata + offsnb; - a->isshared = 0; - if (a->ptrarray || es==1) + a->flags.isshared = 0; + if (a->flags.ptrarray || es==1) memset(newdata+offsnb+oldnbytes, 0, nbytes-oldnbytes-offsnb); - if (a->how == 1) + if (a->flags.how == 1) jl_gc_wb_buf(a, newdata); a->maxsize = newlen; } static void array_try_unshare(jl_array_t *a) { - if (a->isshared) { - if (a->how != 3) + if (a->flags.isshared) { + if (a->flags.how != 3) jl_error("cannot resize array with shared data"); size_t len = jl_array_nrows(a); array_resize_buffer(a, len, len, a->offset); @@ -630,7 +630,7 @@ static size_t limit_overallocation(jl_array_t *a, size_t alen, size_t newlen, si JL_DLLEXPORT void jl_array_grow_end(jl_array_t *a, size_t inc) { - if (a->isshared && a->how!=3) jl_error("cannot resize array with shared data"); + if (a->flags.isshared && a->flags.how!=3) jl_error("cannot resize array with shared data"); // optimized for the case of only growing and shrinking at the end size_t alen = jl_array_nrows(a); if ((alen + inc) > a->maxsize - a->offset) { @@ -652,11 +652,11 @@ JL_DLLEXPORT void jl_array_del_end(jl_array_t *a, size_t dec) if (dec == 0) return; if (dec > a->nrows) jl_bounds_error_int((jl_value_t*)a, a->nrows - dec); - if (a->isshared) array_try_unshare(a); + if (a->flags.isshared) array_try_unshare(a); if (a->elsize > 0) { char *ptail = (char*)a->data + (a->nrows-dec)*a->elsize; assert(ptail < (char*)a->data + (a->length*a->elsize)); - if (a->ptrarray) + if (a->flags.ptrarray) memset(ptail, 0, dec*a->elsize); else ptail[0] = 0; @@ -683,7 +683,7 @@ JL_DLLEXPORT void jl_array_grow_beg(jl_array_t *a, size_t inc) { if (inc == 0) return; // designed to handle the case of growing and shrinking at both ends - if (a->isshared) array_try_unshare(a); + if (a->flags.isshared) array_try_unshare(a); size_t es = a->elsize; size_t incnb = inc*es; if (a->offset >= inc) { @@ -702,7 +702,7 @@ JL_DLLEXPORT void jl_array_grow_beg(jl_array_t *a, size_t inc) size_t center = (newlen - (alen + inc))/2; array_resize_buffer(a, newlen, alen, center+inc); char *newdata = (char*)a->data - (center+inc)*es; - if (a->ptrarray) { + if (a->flags.ptrarray) { memset(newdata, 0, (center+inc)*es); } a->offset = center; @@ -727,7 +727,7 @@ JL_DLLEXPORT void jl_array_del_beg(jl_array_t *a, size_t dec) if (dec == 0) return; if (dec > a->nrows) jl_bounds_error_int((jl_value_t*)a, dec); - if (a->isshared) array_try_unshare(a); + if (a->flags.isshared) array_try_unshare(a); size_t es = a->elsize; size_t nb = dec*es; memset(a->data, 0, nb); diff --git a/src/builtins.c b/src/builtins.c index fd6abee555d395..a53a1125072b53 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -501,7 +501,7 @@ JL_CALLABLE(jl_f_apply) assert(jl_is_array(ai)); jl_array_t *aai = (jl_array_t*)ai; size_t al = jl_array_len(aai); - if (aai->ptrarray) { + if (aai->flags.ptrarray) { for (j = 0; j < al; j++) { jl_value_t *arg = jl_cellref(aai, j); // apply with array splatting may have embedded NULL value @@ -1550,7 +1550,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v, jl_array_t *av = (jl_array_t*)v; jl_datatype_t *el_type = (jl_datatype_t*)jl_tparam0(vt); for (j = 0; j < tlen; j++) { - if (av->ptrarray) { + if (av->flags.ptrarray) { n += jl_static_show_x(out, jl_cellref(v, j), depth); } else { char *ptr = ((char*)av->data) + j * av->elsize; diff --git a/src/cgutils.cpp b/src/cgutils.cpp index e2be189bb5b93a..c3f08937ddf807 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1786,11 +1786,17 @@ static Value *emit_arrayflags(const jl_cgval_t &tinfo, jl_codectx_t *ctx) { assert(tinfo.isboxed); Value *t = tinfo.V; +#ifdef STORE_ARRAY_LEN + int arrayflag_field = 2; +#else + int arrayflag_field = 1; +#endif Value *addr = builder.CreateStructGEP( #ifdef LLVM37 nullptr, #endif - builder.CreateBitCast(t, jl_parray_llvmt), 2); + builder.CreateBitCast(t, jl_parray_llvmt), + arrayflag_field); return builder.CreateLoad(addr); // TODO: tbaa } diff --git a/src/codegen.cpp b/src/codegen.cpp index 46fa9691f12103..4e7bce6ef3fbf2 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -127,6 +127,10 @@ using namespace llvm::legacy; #define AddrSpaceCastInst BitCastInst #endif +#if !defined(_COMPILER_MICROSOFT_) && __cplusplus < 201103L +# define static_assert(...) +#endif + extern "C" { #include "builtin_proto.h" @@ -5653,6 +5657,8 @@ static void init_julia_llvm_env(Module *m) #endif , T_int16 }; + static_assert(sizeof(jl_array_flags_t) == sizeof(int16_t), + "Size of jl_array_flags_t is not the same as int16_t"); Type* jl_array_llvmt = StructType::create(jl_LLVMContext, ArrayRef(vaelts,sizeof(vaelts)/sizeof(vaelts[0])), diff --git a/src/dump.c b/src/dump.c index 92031152b5064f..ebf2a17f9b981f 100644 --- a/src/dump.c +++ b/src/dump.c @@ -727,19 +727,19 @@ static void jl_serialize_value_(ios_t *s, jl_value_t *v) } else if (jl_is_array(v)) { jl_array_t *ar = (jl_array_t*)v; - if (ar->ndims == 1 && ar->elsize < 128) { + if (ar->flags.ndims == 1 && ar->elsize < 128) { writetag(s, (jl_value_t*)Array1d_tag); - write_uint8(s, (ar->ptrarray<<7) | (ar->elsize & 0x7f)); + write_uint8(s, (ar->flags.ptrarray<<7) | (ar->elsize & 0x7f)); } else { writetag(s, (jl_value_t*)jl_array_type); - write_uint16(s, ar->ndims); - write_uint16(s, (ar->ptrarray<<15) | (ar->elsize & 0x7fff)); + write_uint16(s, ar->flags.ndims); + write_uint16(s, (ar->flags.ptrarray<<15) | (ar->elsize & 0x7fff)); } - for (i=0; i < ar->ndims; i++) + for (i=0; i < ar->flags.ndims; i++) jl_serialize_value(s, jl_box_long(jl_array_dim(ar,i))); jl_serialize_value(s, jl_typeof(ar)); - if (!ar->ptrarray) { + if (!ar->flags.ptrarray) { size_t tot = jl_array_len(ar) * ar->elsize; ios_write(s, (char*)jl_array_data(ar), tot); } @@ -1290,7 +1290,7 @@ static jl_value_t *jl_deserialize_value_(ios_t *s, jl_value_t *vtag, jl_value_t backref_list.items[pos] = a; jl_value_t *aty = jl_deserialize_value(s, &jl_astaggedvalue(a)->type); jl_set_typeof(a, aty); - if (!a->ptrarray) { + if (!a->flags.ptrarray) { size_t tot = jl_array_len(a) * a->elsize; ios_read(s, (char*)jl_array_data(a), tot); } diff --git a/src/gc.c b/src/gc.c index bea7b6e973d324..119503ed6b6595 100644 --- a/src/gc.c +++ b/src/gc.c @@ -1136,9 +1136,9 @@ static size_t array_nbytes(jl_array_t *a) static void jl_gc_free_array(jl_array_t *a) { - if (a->how == 2) { + if (a->flags.how == 2) { char *d = (char*)a->data - a->offset*a->elsize; - if (a->isaligned) + if (a->flags.isaligned) free_a16(d); else free(d); @@ -1162,7 +1162,7 @@ static void sweep_malloced_arrays(void) } else { *pma = nxt; - assert(ma->a->how == 2); + assert(ma->a->flags.how == 2); jl_gc_free_array(ma->a); ma->next = mafreelist; mafreelist = ma; @@ -1837,7 +1837,7 @@ static int push_root(jl_value_t *v, int d, int bits) jl_array_t *a = (jl_array_t*)v; jl_taggedvalue_t *o = jl_astaggedvalue(v); int todo = !(bits & GC_MARKED); - if (a->pooled) + if (a->flags.pooled) #ifdef MEMDEBUG #define _gc_setmark_pool gc_setmark_big #else @@ -1845,7 +1845,7 @@ static int push_root(jl_value_t *v, int d, int bits) #endif MARK(a, bits = _gc_setmark_pool(o, GC_MARKED_NOESC); - if (a->how == 2 && todo) { + if (a->flags.how == 2 && todo) { objprofile_count(MATY, gc_bits(o) == GC_MARKED, array_nbytes(a)); if (gc_bits(o) == GC_MARKED) perm_scanned_bytes += array_nbytes(a); @@ -1855,26 +1855,26 @@ static int push_root(jl_value_t *v, int d, int bits) else MARK(a, bits = gc_setmark_big(o, GC_MARKED_NOESC); - if (a->how == 2 && todo) { + if (a->flags.how == 2 && todo) { objprofile_count(MATY, gc_bits(o) == GC_MARKED, array_nbytes(a)); if (gc_bits(o) == GC_MARKED) perm_scanned_bytes += array_nbytes(a); else scanned_bytes += array_nbytes(a); }); - if (a->how == 3) { + if (a->flags.how == 3) { jl_value_t *owner = jl_array_data_owner(a); refyoung |= gc_push_root(owner, d); goto ret; } - else if (a->how == 1) { + else if (a->flags.how == 1) { #ifdef GC_VERIFY void* val_buf = gc_val_buf((char*)a->data - a->offset*a->elsize); verify_parent1("array", v, &val_buf, "buffer ('loc' addr is meaningless)"); #endif gc_setmark_buf((char*)a->data - a->offset*a->elsize, gc_bits(o)); } - if (a->ptrarray && a->data!=NULL) { + if (a->flags.ptrarray && a->data!=NULL) { size_t l = jl_array_len(a); if (l > 100000 && d > MAX_MARK_DEPTH-10) { // don't mark long arrays at high depth, to try to avoid diff --git a/src/gf.c b/src/gf.c index e8fe34d1d1988f..037b115700373b 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1796,7 +1796,7 @@ static void _compile_all_enq(jl_value_t *v, htable_t *h, jl_array_t *found, jl_f } else if (jl_is_array(v)) { jl_array_t *a = (jl_array_t*)v; - if (a->ptrarray) { + if (a->flags.ptrarray) { size_t i, l = jl_array_len(a); for (i = 0; i < l; i++) { _compile_all_enq(jl_cellref(a, i), h, found, in_gf); diff --git a/src/julia.h b/src/julia.h index d6cc39f12a7c4f..53333586601b6c 100644 --- a/src/julia.h +++ b/src/julia.h @@ -231,30 +231,29 @@ typedef struct { // jl_value_t *data[]; } jl_svec_t; +typedef struct { + /* + how - allocation style + 0 = data is inlined, or a foreign pointer we don't manage + 1 = julia-allocated buffer that needs to be marked + 2 = malloc-allocated pointer this array object manages + 3 = has a pointer to the Array that owns the data + */ + uint16_t how:2; + uint16_t ndims:10; + uint16_t pooled:1; + uint16_t ptrarray:1; // representation is pointer array + uint16_t isshared:1; // data is shared by multiple Arrays + uint16_t isaligned:1; // data allocated with memalign +} jl_array_flags_t; + typedef struct { JL_DATA_TYPE void *data; #ifdef STORE_ARRAY_LEN size_t length; #endif - union { - struct { - /* - how - allocation style - 0 = data is inlined, or a foreign pointer we don't manage - 1 = julia-allocated buffer that needs to be marked - 2 = malloc-allocated pointer this array object manages - 3 = has a pointer to the Array that owns the data - */ - unsigned short how:2; - unsigned short ndims:10; - unsigned short pooled:1; - unsigned short ptrarray:1; // representation is pointer array - unsigned short isshared:1; // data is shared by multiple Arrays - unsigned short isaligned:1; // data allocated with memalign - }; - unsigned short flags; - }; + jl_array_flags_t flags; uint16_t elsize; uint32_t offset; // for 1-d only. does not need to get big. size_t nrows; @@ -736,7 +735,7 @@ JL_DLLEXPORT size_t jl_array_len_(jl_array_t *a); #define jl_array_dim(a,i) ((&((jl_array_t*)(a))->nrows)[i]) #define jl_array_dim0(a) (((jl_array_t*)(a))->nrows) #define jl_array_nrows(a) (((jl_array_t*)(a))->nrows) -#define jl_array_ndims(a) ((int32_t)(((jl_array_t*)a)->ndims)) +#define jl_array_ndims(a) ((int32_t)(((jl_array_t*)a)->flags.ndims)) #define jl_array_data_owner_offset(ndims) (offsetof(jl_array_t,ncols) + sizeof(size_t)*(1+jl_array_ndimwords(ndims))) // in bytes #define jl_array_data_owner(a) (*((jl_value_t**)((char*)a + jl_array_data_owner_offset(jl_array_ndims(a))))) @@ -750,7 +749,7 @@ STATIC_INLINE jl_value_t *jl_cellset(void *a, size_t i, void *x) assert(i < jl_array_len(a)); ((jl_value_t**)(jl_array_data(a)))[i] = (jl_value_t*)x; if (x) { - if (((jl_array_t*)a)->how == 3) { + if (((jl_array_t*)a)->flags.how == 3) { a = jl_array_data_owner(a); } jl_gc_wb(a, x); diff --git a/src/julia_internal.h b/src/julia_internal.h index 0b1c6d24ddddb3..54f20823454a81 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -168,7 +168,6 @@ void jl_add_method(jl_function_t *gf, jl_tupletype_t *types, jl_function_t *meth jl_function_t *jl_module_call_func(jl_module_t *m); int jl_is_submodule(jl_module_t *child, jl_module_t *parent); -typedef struct _jl_ast_context_t jl_ast_context_t; jl_value_t *jl_toplevel_eval_flex(jl_value_t *e, int fast); jl_lambda_info_t *jl_wrap_expr(jl_value_t *expr);