public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milan Bouchet-Valat <nalimilan@club.fr>
To: git-commits@fedoraproject.org
Subject: [rpms/julia] epel10: Backport patch to fix build with GCC 6.0
Date: Tue, 01 Dec 2026 21:38:28 GMT [thread overview]
Message-ID: <179616110882.1.12678200687072387554.rpms-julia-5a55b810d1fa@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/julia
Branch : epel10
Commit : 5a55b810d1fafec89133bc9de13f18de1f8ff976
Author : Milan Bouchet-Valat <nalimilan@club.fr>
Date : 2016-01-28T15:21:51+01:00
Stats : +1599/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/julia/c/5a55b810d1fafec89133bc9de13f18de1f8ff976?branch=epel10
Log:
Backport patch to fix build with GCC 6.0
---
diff --git a/0001-Remove-0-size-and-variable-size-array-members-from-p.patch b/0001-Remove-0-size-and-variable-size-array-members-from-p.patch
new file mode 100644
index 0000000..7025e54
--- /dev/null
+++ b/0001-Remove-0-size-and-variable-size-array-members-from-p.patch
@@ -0,0 +1,1597 @@
+From 4c8559785288aacda0e513b277957380f3dc4136 Mon Sep 17 00:00:00 2001
+From: Milan Bouchet-Valat <nalimilan@club.fr>
+Date: Thu, 28 Jan 2016 14:46:35 +0100
+Subject: [PATCH] Remove 0-size and variable size array members from public
+
+Backport of 63f3edf300e9fea39a1932ee2e8f1655c845361f.
+---
+ src/alloc.c | 23 ++++++------
+ src/ast.c | 2 +-
+ src/builtins.c | 46 ++++++++++++-----------
+ src/ccall.cpp | 7 ++--
+ src/cgutils.cpp | 23 ++++++------
+ src/codegen.cpp | 110 ++++++++++++++++++++++++++++++------------------------
+ src/dump.c | 31 ++++++++-------
+ src/gc.c | 7 ++--
+ src/gf.c | 24 +++++++-----
+ src/interpreter.c | 14 ++++---
+ src/jlapi.c | 17 +++++----
+ src/jltypes.c | 14 +++----
+ src/julia.h | 78 ++++++++++++++++++++++----------------
+ src/module.c | 55 +++++++++++++++++----------
+ src/toplevel.c | 53 ++++++++++++++++----------
+ 15 files changed, 287 insertions(+), 217 deletions(-)
+
+diff --git a/src/alloc.c b/src/alloc.c
+index 7fcc5ad..dd91874 100644
+--- a/src/alloc.c
++++ b/src/alloc.c
+@@ -222,7 +222,8 @@ int jl_field_index(jl_datatype_t *t, jl_sym_t *fld, int err)
+ }
+ }
+ if (err)
+- jl_errorf("type %s has no field %s", t->name->name->name, fld->name);
++ jl_errorf("type %s has no field %s", jl_symbol_name(t->name->name),
++ jl_symbol_name(fld));
+ return -1;
+ }
+
+@@ -384,7 +385,7 @@ static uptrint_t hash_symbol(const char *str, size_t len)
+
+ static size_t symbol_nbytes(size_t len)
+ {
+- return (sizeof_jl_taggedvalue_t+sizeof(jl_sym_t)+len+1+7)&-8;
++ return (sizeof_jl_taggedvalue_t + sizeof(jl_sym_t) + len + 1 + 7) & -8;
+ }
+
+ static jl_sym_t *mk_symbol(const char *str, size_t len)
+@@ -401,20 +402,20 @@ static jl_sym_t *mk_symbol(const char *str, size_t len)
+ }
+
+ #ifdef MEMDEBUG
+- sym = (jl_sym_t*)&((jl_taggedvalue_t*)malloc(nb))->value;
++ sym = (jl_sym_t*)jl_valueof(malloc(nb));
+ #else
+ if (sym_pool == NULL || pool_ptr+nb > sym_pool+SYM_POOL_SIZE) {
+ sym_pool = (char*)malloc(SYM_POOL_SIZE);
+ pool_ptr = sym_pool;
+ }
+- sym = (jl_sym_t*)&((jl_taggedvalue_t*)pool_ptr)->value;
++ sym = (jl_sym_t*)jl_valueof(pool_ptr);
+ pool_ptr += nb;
+ #endif
+ jl_set_typeof(sym, jl_sym_type);
+ sym->left = sym->right = NULL;
+ sym->hash = hash_symbol(str, len);
+- memcpy(&sym->name[0], str, len);
+- sym->name[len] = 0;
++ memcpy(jl_symbol_name(sym), str, len);
++ jl_symbol_name(sym)[len] = 0;
+ return sym;
+ }
+
+@@ -439,8 +440,8 @@ static jl_sym_t **symtab_lookup(jl_sym_t **ptree, const char *str, size_t len, j
+ while (*ptree != NULL) {
+ x = (int)(h-(*ptree)->hash);
+ if (x == 0) {
+- x = strncmp(str, (*ptree)->name, len);
+- if (x == 0 && (*ptree)->name[len] == 0)
++ x = strncmp(str, jl_symbol_name(*ptree), len);
++ if (x == 0 && jl_symbol_name(*ptree)[len] == 0)
+ return ptree;
+ }
+ if (parent != NULL) *parent = *ptree;
+@@ -626,11 +627,11 @@ jl_datatype_t *jl_new_datatype(jl_sym_t *name, jl_datatype_t *super,
+ if (!jl_boot_file_loaded && jl_is_symbol(name)) {
+ // hack to avoid making two versions of basic types needed
+ // during bootstrapping
+- if (!strcmp(((jl_sym_t*)name)->name, "Int32"))
++ if (!strcmp(jl_symbol_name((jl_sym_t*)name), "Int32"))
+ t = jl_int32_type;
+- else if (!strcmp(((jl_sym_t*)name)->name, "Int64"))
++ else if (!strcmp(jl_symbol_name((jl_sym_t*)name), "Int64"))
+ t = jl_int64_type;
+- else if (!strcmp(((jl_sym_t*)name)->name, "Bool"))
++ else if (!strcmp(jl_symbol_name((jl_sym_t*)name), "Bool"))
+ t = jl_bool_type;
+ }
+ if (t == NULL)
+diff --git a/src/ast.c b/src/ast.c
+index b813093..6dab715 100644
+--- a/src/ast.c
++++ b/src/ast.c
+@@ -451,7 +451,7 @@ static value_t julia_to_list2(jl_value_t *a, jl_value_t *b)
+ static value_t julia_to_scm_(jl_value_t *v)
+ {
+ if (jl_is_symbol(v))
+- return symbol(((jl_sym_t*)v)->name);
++ return symbol(jl_symbol_name((jl_sym_t*)v));
+ if (jl_is_gensym(v)) {
+ size_t idx = ((jl_gensym_t*)v)->id;
+ size_t i;
+diff --git a/src/builtins.c b/src/builtins.c
+index 8495f02..aebdd10 100644
+--- a/src/builtins.c
++++ b/src/builtins.c
+@@ -116,9 +116,9 @@ void NORETURN jl_type_error(const char *fname, jl_value_t *expected, jl_value_t
+
+ DLLEXPORT void NORETURN jl_undefined_var_error(jl_sym_t *var)
+ {
+- if (var->name[0] == '#') {
++ if (jl_symbol_name(var)[0] == '#') {
+ // convention for renamed variables: #...#original_name
+- char *nxt = strchr(var->name+1, '#');
++ char *nxt = strchr(jl_symbol_name(var) + 1, '#');
+ if (nxt)
+ var = jl_symbol(nxt+1);
+ }
+@@ -525,7 +525,7 @@ JL_CALLABLE(jl_f_kwcall)
+ jl_function_t *sorter = ((jl_methtable_t*)f->env)->kwsorter;
+ if (sorter == NULL) {
+ jl_exceptionf(jl_argumenterror_type, "function %s does not accept keyword arguments",
+- jl_gf_name(f)->name);
++ jl_symbol_name(jl_gf_name(f)));
+ }
+
+ for(size_t i=0; i < nkeys*2; i+=2) {
+@@ -563,12 +563,13 @@ DLLEXPORT jl_value_t *jl_toplevel_eval_in(jl_module_t *m, jl_value_t *ex, int de
+ jl_module_t *task_last_m = jl_current_task->current_module;
+ if (!delay_warn && jl_options.incremental && jl_generating_output()) {
+ if (m != last_m) {
+- jl_printf(JL_STDERR, "WARNING: eval from module %s to %s: \n", m->name->name, last_m->name->name);
++ jl_printf(JL_STDERR, "WARNING: eval from module %s to %s: \n",
++ jl_symbol_name(m->name), jl_symbol_name(last_m->name));
+ jl_static_show(JL_STDERR, ex);
+ jl_printf(JL_STDERR, "\n ** incremental compilation may be broken for this module **\n\n");
+ }
+ else if (jl_warn_on_eval) {
+- jl_printf(JL_STDERR, "WARNING: eval from staged function in module %s: \n", m->name->name);
++ jl_printf(JL_STDERR, "WARNING: eval from staged function in module %s: \n", jl_symbol_name(m->name));
+ jl_static_show(JL_STDERR, ex);
+ jl_printf(JL_STDERR, "\n ** incremental compilation may be broken for these modules **\n\n");
+ }
+@@ -731,7 +732,7 @@ JL_CALLABLE(jl_f_set_field)
+ jl_type_error("setfield!", (jl_value_t*)jl_datatype_type, v);
+ jl_datatype_t *st = (jl_datatype_t*)vt;
+ if (!st->mutabl)
+- jl_errorf("type %s is immutable", st->name->name->name);
++ jl_errorf("type %s is immutable", jl_symbol_name(st->name->name));
+ size_t idx;
+ if (jl_is_long(args[1])) {
+ idx = jl_unbox_long(args[1])-1;
+@@ -782,9 +783,9 @@ JL_CALLABLE(jl_f_nfields)
+
+ // conversion -----------------------------------------------------------------
+
+-DLLEXPORT void *jl_symbol_name(jl_sym_t *s)
++DLLEXPORT void *(jl_symbol_name)(jl_sym_t *s)
+ {
+- return s->name;
++ return jl_symbol_name(s);
+ }
+
+ //WARNING: THIS FUNCTION IS NEVER CALLED BUT INLINE BY CCALL
+@@ -958,7 +959,7 @@ void jl_show(jl_value_t *stream, jl_value_t *v)
+ }
+ if (jl_show_gf==NULL || stream==NULL) {
+ jl_printf(JL_STDERR, " could not show value of type %s",
+- ((jl_datatype_t*)jl_typeof(v))->name->name->name);
++ jl_symbol_name(((jl_datatype_t*)jl_typeof(v))->name->name));
+ return;
+ }
+ jl_value_t *args[2] = {stream,v};
+@@ -1060,7 +1061,7 @@ DLLEXPORT jl_value_t *jl_new_type_constructor(jl_svec_t *p, jl_value_t *t)
+ static void jl_check_type_tuple(jl_value_t *t, jl_sym_t *name, const char *ctx)
+ {
+ if (!jl_is_tuple_type(t))
+- jl_type_error_rt(name->name, ctx, (jl_value_t*)jl_type_type, t);
++ jl_type_error_rt(jl_symbol_name(name), ctx, (jl_value_t*)jl_type_type, t);
+ }
+
+ JL_CALLABLE(jl_f_methodexists)
+@@ -1357,10 +1358,10 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ if (li->specTypes) {
+ n += jl_printf(out, ".");
+ n += jl_show_svec(out, li->specTypes->parameters,
+- li->name->name, "(", ")");
++ jl_symbol_name(li->name), "(", ")");
+ }
+ else {
+- n += jl_printf(out, ".%s(?)", li->name->name);
++ n += jl_printf(out, ".%s(?)", jl_symbol_name(li->name));
+ }
+ // The following is nice for debugging, but allocates memory and generates a lot of output
+ // so it may not be a good idea to to have it active
+@@ -1376,7 +1377,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ n += jl_static_show_x(out, (jl_value_t*)dv->name->module, depth);
+ n += jl_printf(out, ".");
+ }
+- n += jl_printf(out, "%s", dv->name->name->name);
++ n += jl_printf(out, "%s", jl_symbol_name(dv->name->name));
+ if (dv->parameters && (jl_value_t*)dv != dv->name->primary &&
+ !jl_types_equal((jl_value_t*)dv, (jl_value_t*)jl_tuple_type)) {
+ size_t j, tlen = jl_nparams(dv);
+@@ -1397,7 +1398,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ }
+ else if (vt == jl_function_type) {
+ if (jl_is_gf(v)) {
+- n += jl_printf(out, "%s", jl_gf_name(v)->name);
++ n += jl_printf(out, "%s", jl_symbol_name(jl_gf_name(v)));
+ }
+ else {
+ n += jl_printf(out, "#<function>");
+@@ -1464,7 +1465,8 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ n += jl_static_show(out, ((jl_tvar_t*)v)->lb);
+ n += jl_printf(out, "<:");
+ }
+- n += jl_printf(out, "%s%s<:", (((jl_tvar_t*)v)->bound)?"#":"", ((jl_tvar_t*)v)->name->name);
++ n += jl_printf(out, "%s%s<:", (((jl_tvar_t*)v)->bound)?"#":"",
++ jl_symbol_name(((jl_tvar_t*)v)->name));
+ n += jl_static_show(out, ((jl_tvar_t*)v)->ub);
+ }
+ else if (vt == jl_module_type) {
+@@ -1473,22 +1475,22 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ n += jl_static_show_x(out, (jl_value_t*)m->parent, depth);
+ n += jl_printf(out, ".");
+ }
+- n += jl_printf(out, "%s", m->name->name);
++ n += jl_printf(out, "%s", jl_symbol_name(m->name));
+ }
+ else if (vt == jl_sym_type) {
+- n += jl_printf(out, ":%s", ((jl_sym_t*)v)->name);
++ n += jl_printf(out, ":%s", jl_symbol_name((jl_sym_t*)v));
+ }
+ else if (vt == jl_gensym_type) {
+ n += jl_printf(out, "GenSym(%" PRIuPTR ")",
+ (uintptr_t)((jl_gensym_t*)v)->id);
+ }
+ else if (vt == jl_symbolnode_type) {
+- n += jl_printf(out, "%s::", jl_symbolnode_sym(v)->name);
++ n += jl_printf(out, "%s::", jl_symbol_name(jl_symbolnode_sym(v)));
+ n += jl_static_show_x(out, jl_symbolnode_type(v), depth);
+ }
+ else if (vt == jl_globalref_type) {
+ n += jl_static_show_x(out, (jl_value_t*)jl_globalref_mod(v), depth);
+- n += jl_printf(out, ".%s", jl_globalref_name(v)->name);
++ n += jl_printf(out, ".%s", jl_symbol_name(jl_globalref_name(v)));
+ }
+ else if (vt == jl_labelnode_type) {
+ n += jl_printf(out, "%" PRIuPTR ":", jl_labelnode_label(v));
+@@ -1518,7 +1520,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ }
+ else if (vt == jl_linenumbernode_type) {
+ n += jl_printf(out, "# line %" PRIuPTR " %s",
+- jl_linenode_line(v), jl_linenode_file(v)->name);
++ jl_linenode_line(v), jl_symbol_name(jl_linenode_file(v)));
+ }
+ else if (vt == jl_expr_type) {
+ jl_expr_t *e = (jl_expr_t*)v;
+@@ -1531,7 +1533,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ char sep = ' ';
+ if (e->head == body_sym)
+ sep = '\n';
+- n += jl_printf(out, "Expr(:%s", e->head->name);
++ n += jl_printf(out, "Expr(:%s", jl_symbol_name(e->head));
+ size_t i, len = jl_array_len(e->args);
+ for (i = 0; i < len; i++) {
+ n += jl_printf(out, ",%c", sep);
+@@ -1590,7 +1592,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v,
+ else {
+ for (size_t i = 0; i < tlen; i++) {
+ if (!istuple) {
+- n += jl_printf(out, "%s", ((jl_sym_t*)jl_svecref(vt->name->names, i))->name);
++ n += jl_printf(out, "%s", jl_symbol_name((jl_sym_t*)jl_svecref(vt->name->names, i)));
+ //jl_fielddesc_t f = t->fields[i];
+ n += jl_printf(out, "=");
+ }
+diff --git a/src/ccall.cpp b/src/ccall.cpp
+index 7a4a986..6989432 100644
+--- a/src/ccall.cpp
++++ b/src/ccall.cpp
+@@ -512,7 +512,7 @@ static native_sym_arg_t interpret_symbol_arg(jl_value_t *arg, jl_codectx_t *ctx,
+ ptr = jl_fieldref(ptr,0);
+ }
+ if (jl_is_symbol(ptr))
+- f_name = ((jl_sym_t*)ptr)->name;
++ f_name = jl_symbol_name((jl_sym_t*)ptr);
+ else if (jl_is_byte_string(ptr))
+ f_name = jl_string_data(ptr);
+ if (f_name != NULL) {
+@@ -529,13 +529,13 @@ static native_sym_arg_t interpret_symbol_arg(jl_value_t *arg, jl_codectx_t *ctx,
+ jl_value_t *t0 = jl_fieldref(ptr,0);
+ jl_value_t *t1 = jl_fieldref(ptr,1);
+ if (jl_is_symbol(t0))
+- f_name = ((jl_sym_t*)t0)->name;
++ f_name = jl_symbol_name((jl_sym_t*)t0);
+ else if (jl_is_byte_string(t0))
+ f_name = jl_string_data(t0);
+ else
+ JL_TYPECHKS(fname, symbol, t0);
+ if (jl_is_symbol(t1))
+- f_lib = ((jl_sym_t*)t1)->name;
++ f_lib = jl_symbol_name((jl_sym_t*)t1);
+ else if (jl_is_byte_string(t1))
+ f_lib = jl_string_data(t1);
+ else
+@@ -1458,7 +1458,6 @@ static Value *emit_ccall(jl_value_t **args, size_t nargs, jl_codectx_t *ctx)
+ if (lrt == T_void)
+ result = literal_pointer_val((jl_value_t*)jl_nothing);
+ else if (lrt->isStructTy()) {
+- //fprintf(stderr, "ccall rt: %s -> %s\n", f_name, ((jl_tag_type_t*)rt)->name->name->name);
+ assert(jl_is_structtype(rt));
+ Value *newst = emit_new_struct(rt,1,NULL,ctx);
+ assert(newst != NULL && "Type was not concrete");
+diff --git a/src/cgutils.cpp b/src/cgutils.cpp
+index e9225a1..2ee9515 100644
+--- a/src/cgutils.cpp
++++ b/src/cgutils.cpp
+@@ -311,11 +311,11 @@ static DIType julia_type_to_di(jl_value_t *jt, DIBuilder *dbuilder, bool isboxed
+ }
+ if (jl_is_bitstype(jt)) {
+ #ifdef LLVM37
+- llvm::DIType *t = dbuilder->createBasicType(jdt->name->name->name,jdt->size,jdt->alignment,llvm::dwarf::DW_ATE_unsigned);
++ llvm::DIType *t = dbuilder->createBasicType(jl_symbol_name(jdt->name->name),jdt->size,jdt->alignment,llvm::dwarf::DW_ATE_unsigned);
+ jdt->ditype = t;
+ return t;
+ #else
+- DIType t = dbuilder->createBasicType(jdt->name->name->name,jdt->size,jdt->alignment,llvm::dwarf::DW_ATE_unsigned);
++ DIType t = dbuilder->createBasicType(jl_symbol_name(jdt->name->name),jdt->size,jdt->alignment,llvm::dwarf::DW_ATE_unsigned);
+ MDNode *M = t;
+ jdt->ditype = M;
+ return t;
+@@ -560,22 +560,22 @@ static Value *julia_gv(const char *prefix, jl_sym_t *name, jl_module_t *mod, voi
+ {
+ // emit a GlobalVariable for a jl_value_t, using the prefix, name, and module to
+ // to create a readable name of the form prefixModA.ModB.name
+- size_t len = strlen(name->name)+strlen(prefix)+1;
++ size_t len = strlen(jl_symbol_name(name))+strlen(prefix)+1;
+ jl_module_t *parent = mod, *prev = NULL;
+ while (parent != NULL && parent != prev) {
+- len += strlen(parent->name->name)+1;
++ len += strlen(jl_symbol_name(parent->name))+1;
+ prev = parent;
+ parent = parent->parent;
+ }
+ char *fullname = (char*)alloca(len);
+ strcpy(fullname, prefix);
+- len -= strlen(name->name)+1;
+- strcpy(fullname+len,name->name);
++ len -= strlen(jl_symbol_name(name))+1;
++ strcpy(fullname + len, jl_symbol_name(name));
+ parent = mod;
+ prev = NULL;
+ while (parent != NULL && parent != prev) {
+- size_t part = strlen(parent->name->name)+1;
+- strcpy(fullname+len-part,parent->name->name);
++ size_t part = strlen(jl_symbol_name(parent->name))+1;
++ strcpy(fullname+len-part,jl_symbol_name(parent->name));
+ fullname[len-1] = '.';
+ len -= part;
+ prev = parent;
+@@ -726,7 +726,7 @@ static Type *julia_struct_to_llvm(jl_value_t *jt)
+ return T_void;
+ StructType *structdecl;
+ if (!isTuple) {
+- structdecl = StructType::create(jl_LLVMContext, jst->name->name->name);
++ structdecl = StructType::create(jl_LLVMContext, jl_symbol_name(jst->name->name));
+ jst->struct_decl = structdecl;
+ }
+ std::vector<Type*> latypes(0);
+@@ -976,8 +976,9 @@ static Value *emit_nthptr_recast(Value *v, Value *idx, MDNode *tbaa, Type *ptype
+
+ static Value *emit_typeptr_addr(Value *p)
+ {
+- ssize_t offset = (offsetof(jl_taggedvalue_t,value) - offsetof(jl_taggedvalue_t,type)) / sizeof(jl_value_t*);
+- return emit_nthptr_addr(p, -offset);
++ ssize_t offset = (sizeof(jl_taggedvalue_t) -
++ offsetof(jl_taggedvalue_t, type)) / sizeof(jl_value_t*);
++ return emit_nthptr_addr(p, -offset);
+ }
+
+ static Value *emit_typeof(Value *p)
+diff --git a/src/codegen.cpp b/src/codegen.cpp
+index 3b3ebc2..6f2e760 100644
+--- a/src/codegen.cpp
++++ b/src/codegen.cpp
+@@ -479,11 +479,17 @@ typedef struct {
+ } jl_codectx_t;
+
+ typedef struct {
++ int64_t isref;
++ Function *f;
++} cFunction_t;
++
++typedef struct {
+ size_t len;
+- struct {
+- int64_t isref;
+- Function *f;
+- } data[];
++ // cFunction_t data[];
++ cFunction_t *data()
++ {
++ return (cFunction_t*)((char*)this + sizeof(*this));
++ }
+ } cFunctionList_t;
+
+ static Value *emit_expr(jl_value_t *expr, jl_codectx_t *ctx, bool boxed=true, bool valuepos=true);
+@@ -578,7 +584,7 @@ static Value *alloc_local(jl_sym_t *s, jl_codectx_t *ctx)
+ assert(vtype != jl_pvalue_llvmt);
+ if (!type_is_ghost(vtype)) {
+ // CreateAlloca is OK here because alloc_local is only called during prologue setup
+- lv = builder.CreateAlloca(vtype, 0, s->name);
++ lv = builder.CreateAlloca(vtype, 0, jl_symbol_name(s));
+ if (vtype != jl_pvalue_llvmt)
+ lv = mark_julia_type(lv, jt);
+ vi.isGhost = false;
+@@ -653,7 +659,7 @@ static Function *to_function(jl_lambda_info_t *li)
+ builder.SetCurrentDebugLocation(olddl);
+ }
+ JL_SIGATOMIC_END();
+- jl_rethrow_with_add("error compiling %s", li->name->name);
++ jl_rethrow_with_add("error compiling %s", jl_symbol_name(li->name));
+ }
+ assert(f != NULL);
+ #ifdef JL_DEBUG_BUILD
+@@ -674,9 +680,9 @@ static Function *to_function(jl_lambda_info_t *li)
+ FPM->run(*f);
+ //n_compile++;
+ // print out the function's LLVM code
+- //jl_static_show(JL_STDERR, (jl_value_t*)li);
+- //jl_printf(JL_STDERR, "%s:%d\n",
+- // ((jl_sym_t*)li->file)->name, li->line);
++ // jl_static_show(JL_STDERR, (jl_value_t*)li);
++ // jl_printf(JL_STDERR, "%s:%d\n",
++ // jl_symbol_name((jl_sym_t*)li->file), li->line);
+ //f->dump();
+ //if (verifyFunction(*f,PrintMessageAction)) {
+ // f->dump();
+@@ -751,7 +757,7 @@ extern "C" void jl_generate_fptr(jl_function_t *f)
+ size_t i;
+ cFunctionList_t *list = (cFunctionList_t*)li->cFunctionList;
+ for (i = 0; i < list->len; i++) {
+- list->data[i].f = mover.CloneFunction(list->data[i].f);
++ list->data()[i].f = mover.CloneFunction(list->data()[i].f);
+ }
+ }
+ }
+@@ -774,13 +780,13 @@ extern "C" void jl_generate_fptr(jl_function_t *f)
+ cFunctionList_t *list = (cFunctionList_t*)li->cFunctionList;
+ for (i = 0; i < list->len; i++) {
+ #ifdef USE_MCJIT
+- (void)jl_ExecutionEngine->getFunctionAddress(list->data[i].f->getName());
++ (void)jl_ExecutionEngine->getFunctionAddress(list->data()[i].f->getName());
+ #else
+- (void)jl_ExecutionEngine->getPointerToFunction(list->data[i].f);
++ (void)jl_ExecutionEngine->getPointerToFunction(list->data()[i].f);
+ #endif
+ #ifndef KEEP_BODIES
+ if (!imaging_mode) {
+- list->data[i].f->deleteBody();
++ list->data()[i].f->deleteBody();
+ }
+ #endif
+ }
+@@ -869,19 +875,20 @@ static Function *jl_cfunction_object(jl_function_t *f, jl_value_t *rt, jl_tuplet
+ jl_lambda_info_t *li = ff->linfo;
+ if (!jl_types_equal((jl_value_t*)li->specTypes, sigt)) {
+ jl_errorf("cfunction: type signature of %s does not match specification",
+- li->name->name);
++ jl_symbol_name(li->name));
+ }
+ jl_value_t *astrt = jl_ast_rettype(li, li->ast);
+ if (rt != NULL) {
+ if (astrt == (jl_value_t*)jl_bottom_type) {
+ if (rt != (jl_value_t*)jl_void_type) {
+ // a function that doesn't return can be passed to C as void
+- jl_errorf("cfunction: %s does not return", li->name->name);
++ jl_errorf("cfunction: %s does not return",
++ jl_symbol_name(li->name));
+ }
+ }
+ else if (!jl_subtype(astrt, rt, 0)) {
+ jl_errorf("cfunction: return type of %s does not match",
+- li->name->name);
++ jl_symbol_name(li->name));
+ }
+ }
+ JL_GC_POP(); // kill list: sigt
+@@ -1272,7 +1279,8 @@ extern "C" void jl_write_malloc_log(void)
+ static void show_source_loc(JL_STREAM *out, jl_codectx_t *ctx)
+ {
+ if (ctx == NULL) return;
+- jl_printf(out, "in %s at %s:%d", ctx->linfo->name->name, ctx->linfo->file->name, ctx->lineno);
++ jl_printf(out, "in %s at %s:%d", jl_symbol_name(ctx->linfo->name),
++ jl_symbol_name(ctx->linfo->file), ctx->lineno);
+ }
+
+ extern "C" void jl_binding_deprecation_warning(jl_binding_t *b);
+@@ -3461,7 +3469,7 @@ static Value *emit_expr(jl_value_t *expr, jl_codectx_t *ctx, bool isboxed, bool
+ return literal_pointer_val((jl_value_t*)jl_nothing); // will change as new metadata gets added
+ }
+ else {
+- if (!strcmp(head->name, "$"))
++ if (!strcmp(jl_symbol_name(head), "$"))
+ jl_error("syntax: prefix \"$\" in non-quoted expression");
+ if (jl_is_toplevel_only_expr(expr) &&
+ ctx->linfo->name == anonymous_sym && ctx->vars.empty() &&
+@@ -3483,7 +3491,8 @@ static Value *emit_expr(jl_value_t *expr, jl_codectx_t *ctx, bool isboxed, bool
+ }
+ else {
+ jl_errorf("unsupported or misplaced expression \"%s\" in function %s",
+- head->name, ctx->linfo->name->name);
++ jl_symbol_name(head),
++ jl_symbol_name(ctx->linfo->name));
+ }
+ }
+ }
+@@ -3585,8 +3594,8 @@ static Function *gen_cfun_wrapper(jl_function_t *ff, jl_value_t *jlrettype, jl_t
+ if (list != NULL) {
+ size_t i;
+ for (i = 0; i < list->len; i++) {
+- if (list->data[i].isref == isref) {
+- return list->data[i].f;
++ if (list->data()[i].isref == isref) {
++ return list->data()[i].f;
+ }
+ }
+ }
+@@ -3620,11 +3629,12 @@ static Function *gen_cfun_wrapper(jl_function_t *ff, jl_value_t *jlrettype, jl_t
+
+ jl_compile(ff);
+ if (!lam->functionObject) {
+- jl_errorf("error compiling %s while creating cfunction", lam->name->name);
++ jl_errorf("error compiling %s while creating cfunction",
++ jl_symbol_name(lam->name));
+ }
+
+ std::stringstream funcName;
+- funcName << "jlcapi_" << lam->name->name << "_" << globalUnique++;
++ funcName << "jlcapi_" << jl_symbol_name(lam->name) << "_" << globalUnique++;
+
+ // Backup the info for the nested compile
+ JL_SIGATOMIC_BEGIN(); // no errors expected beyond this point
+@@ -3665,12 +3675,12 @@ static Function *gen_cfun_wrapper(jl_function_t *ff, jl_value_t *jlrettype, jl_t
+
+ // Save the Function object reference
+ int len = (list ? list->len : 0) + 1;
+- cFunctionList_t *list2 = (cFunctionList_t*)realloc(list, sizeof(*list)+sizeof(list->data[0])*len);
++ cFunctionList_t *list2 = (cFunctionList_t*)realloc(list, sizeof(cFunctionList_t)+sizeof(list->data()[0])*len);
+ if (!list2)
+ jl_throw(jl_memory_exception);
+ list2->len = len;
+- list2->data[len-1].isref = isref;
+- list2->data[len-1].f = cw;
++ list2->data()[len-1].isref = isref;
++ list2->data()[len-1].f = cw;
+ lam->cFunctionList = list2;
+
+ // See whether this function is specsig or jlcall
+@@ -3973,7 +3983,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ ctx.ast = ast;
+ ctx.sp = sparams;
+ ctx.linfo = lam;
+- ctx.funcName = lam->name->name;
++ ctx.funcName = jl_symbol_name(lam->name);
+ ctx.vaName = NULL;
+ ctx.vaStack = false;
+ ctx.boundsCheck.push_back(true);
+@@ -4074,7 +4084,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+
+ std::stringstream funcName;
+ // try to avoid conflicts in the global symbol table
+- funcName << "julia_" << lam->name->name;
++ funcName << "julia_" << jl_symbol_name(lam->name);
+
+ Module *m;
+ #ifdef USE_MCJIT
+@@ -4164,12 +4174,12 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ bool do_malloc_log = jl_options.malloc_log == JL_LOG_ALL || (jl_options.malloc_log == JL_LOG_USER && in_user_code);
+ jl_value_t *stmt = skip_meta(stmts);
+ std::string filename = "no file";
+- char *dbgFuncName = lam->name->name;
++ char *dbgFuncName = jl_symbol_name(lam->name);
+ int lno = -1;
+ // look for initial (line num filename [funcname]) node, [funcname] for kwarg methods.
+ if (jl_is_linenode(stmt)) {
+ lno = jl_linenode_line(stmt);
+- filename = jl_linenode_file(stmt)->name;
++ filename = jl_symbol_name(jl_linenode_file(stmt));
+ }
+ else if (jl_is_expr(stmt) && ((jl_expr_t*)stmt)->head == line_sym &&
+ jl_array_dim0(((jl_expr_t*)stmt)->args) > 0) {
+@@ -4179,11 +4189,11 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ if (jl_array_dim0(((jl_expr_t*)stmt)->args) > 1) {
+ a1 = jl_exprarg(stmt,1);
+ if (jl_is_symbol(a1))
+- filename = ((jl_sym_t*)a1)->name;
++ filename = jl_symbol_name((jl_sym_t*)a1);
+ if (jl_array_dim0(((jl_expr_t*)stmt)->args) > 2) {
+ a1 = jl_exprarg(stmt,2);
+ if (jl_is_symbol(a1))
+- dbgFuncName = ((jl_sym_t*)a1)->name;
++ dbgFuncName = jl_symbol_name((jl_sym_t*)a1);
+ }
+ }
+ }
+@@ -4203,8 +4213,8 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ BasicBlock *b0 = BasicBlock::Create(jl_LLVMContext, "top", f);
+ builder.SetInsertPoint(b0);
+
+- //jl_printf(JL_STDERR, "\n*** compiling %s at %s:%d\n\n",
+- // lam->name->name, filename.c_str(), lno);
++ // jl_printf(JL_STDERR, "\n*** compiling %s at %s:%d\n\n",
++ // jl_symbol_name(lam->name), filename.c_str(), lno);
+
+ DebugLoc noDbg;
+ ctx.debug_enabled = true;
+@@ -4296,7 +4306,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ #ifdef LLVM38
+ varinfo.dinfo = ctx.dbuilder->createParameterVariable(
+ SP, // Scope (current function will be fill in later)
+- argname->name, // Variable name
++ jl_symbol_name(argname), // Variable name
+ ctx.sret + i + 1, // Argument number (1-based)
+ topfile, // File
+ ctx.lineno == -1 ? 0 : ctx.lineno, // Line
+@@ -4306,7 +4316,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ varinfo.dinfo = ctx.dbuilder->createLocalVariable(
+ llvm::dwarf::DW_TAG_arg_variable, // Tag
+ SP, // Scope (current function will be fill in later)
+- argname->name, // Variable name
++ jl_symbol_name(argname), // Variable name
+ topfile, // File
+ ctx.lineno == -1 ? 0 : ctx.lineno, // Line (for now, use lineno of the function)
+ julia_type_to_di(varinfo.declType,ctx.dbuilder,specsig), // Variable type
+@@ -4319,7 +4329,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ #ifdef LLVM38
+ ctx.vars[ctx.vaName].dinfo = ctx.dbuilder->createParameterVariable(
+ SP, // Scope (current function will be fill in later)
+- ctx.vaName->name, // Variable name
++ jl_symbol_name(ctx.vaName), // Variable name
+ ctx.sret + nreq + 1, // Argument number (1-based)
+ topfile, // File
+ ctx.lineno == -1 ? 0 : ctx.lineno, // Line (for now, use lineno of the function)
+@@ -4328,8 +4338,8 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ ctx.vars[ctx.vaName].dinfo = ctx.dbuilder->createLocalVariable(
+ llvm::dwarf::DW_TAG_arg_variable, // Tag
+ SP, // Scope (current function will be fill in later)
+- ctx.vaName->name, // Variable name
+- topfile, // File
++ jl_symbol_name(ctx.vaName), // Variable name
++ topfile, // File
+ ctx.lineno == -1 ? 0 : ctx.lineno, // Line (for now, use lineno of the function)
+ julia_type_to_di(ctx.vars[ctx.vaName].declType,ctx.dbuilder,false), // Variable type
+ false, // May be optimized out
+@@ -4349,7 +4359,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ llvm::dwarf::DW_TAG_auto_variable, // Tag
+ #endif
+ SP, // Scope (current function will be fill in later)
+- s->name, // Variable name
++ jl_symbol_name(s), // Variable name
+ topfile, // File
+ ctx.lineno == -1 ? 0 : ctx.lineno, // Line (for now, use lineno of the function)
+ julia_type_to_di(varinfo.declType,ctx.dbuilder,specsig), // Variable type
+@@ -4373,7 +4383,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ llvm::dwarf::DW_TAG_auto_variable, // Tag
+ #endif
+ SP, // Scope (current function will be filled in later)
+- vname->name, // Variable name
++ jl_symbol_name(vname), // Variable name
+ topfile, // File
+ ctx.lineno == -1 ? 0 : ctx.lineno, // Line (for now, use lineno of the function)
+ julia_type_to_di(varinfo.declType,ctx.dbuilder,specsig), // Variable type
+@@ -4714,7 +4724,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ }
+ }
+ }
+- assert(file->name);
++ assert(jl_symbol_name(file));
+
+ # ifdef LLVM37
+ DIFile *dfil = NULL;
+@@ -4723,7 +4733,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ # endif
+
+ // If the string is not empty
+- if (*file->name != '\0') {
++ if (*jl_symbol_name(file) != '\0') {
+ # ifdef LLVM37
+ std::map<jl_sym_t *, DIFile *>::iterator it = filescopes.find(file);
+ # else
+@@ -4733,9 +4743,11 @@ static Function *emit_function(jl_lambda_info_t *lam)
+ dfil = it->second;
+ } else {
+ # ifdef LLVM37
+- dfil = (DIFile*)dbuilder.createFile(file->name, ".");
++ dfil = (DIFile*)dbuilder.createFile(jl_symbol_name(file),
++ ".");
+ # else
+- dfil = (MDNode*)dbuilder.createFile(file->name, ".");
++ dfil = (MDNode*)dbuilder.createFile(jl_symbol_name(file),
++ ".");
+ # endif
+ }
+ }
+@@ -4890,7 +4902,7 @@ extern "C" void jl_fptr_to_llvm(void *fptr, jl_lambda_info_t *lam, int specsig)
+ }
+ else {
+ // this assigns a function pointer (from loading the system image), to the function object
+- std::string funcName = lam->name->name;
++ std::string funcName = jl_symbol_name(lam->name);
+ funcName = "julia_" + funcName;
+ if (specsig) { // assumes !va
+ std::vector<Type*> fsig(0);
+@@ -4938,7 +4950,7 @@ extern "C" DLLEXPORT jl_value_t *jl_new_box(jl_value_t *v)
+ jl_value_t *box = (jl_value_t*)jl_gc_alloc_1w();
+ jl_set_typeof(box, jl_box_any_type);
+ // if (v) jl_gc_wb(box, v); // write block not needed: box was just allocated
+- box->fieldptr[0] = v;
++ *(jl_value_t**)box = v;
+ return box;
+ }
+
+@@ -5008,8 +5020,8 @@ static void init_julia_llvm_env(Module *m)
+ "jl_value_t",
+ julia_h,
+ 71, // At the time of this writing. Not sure if it's worth it to keep this in sync
+- sizeof(jl_value_t)*8,
+- __alignof__(jl_value_t)*8,
++ 0 * 8, // sizeof(jl_value_t) * 8,
++ __alignof__(void*) * 8, // __alignof__(jl_value_t) * 8,
+ 0, // Flags
+ #ifdef LLVM37
+ nullptr, // Derived from
+diff --git a/src/dump.c b/src/dump.c
+index f3ee0e9..c2e212d 100644
+--- a/src/dump.c
++++ b/src/dump.c
+@@ -527,7 +527,7 @@ static void jl_serialize_datatype(ios_t *s, jl_datatype_t *dt)
+ write_int32(s, dt->alignment);
+ write_int8(s, dt->haspadding);
+ size_t fieldsize = jl_fielddesc_size(dt->fielddesc_type);
+- ios_write(s, (char*)dt->fields, nf * fieldsize);
++ ios_write(s, jl_datatype_fields(dt), nf * fieldsize);
+ jl_serialize_value(s, dt->types);
+ }
+
+@@ -694,7 +694,7 @@ static void jl_serialize_value_(ios_t *s, jl_value_t *v)
+ }
+ }
+ else if (jl_is_symbol(v)) {
+- size_t l = strlen(((jl_sym_t*)v)->name);
++ size_t l = strlen(jl_symbol_name((jl_sym_t*)v));
+ if (l <= 255) {
+ writetag(s, jl_symbol_type);
+ write_uint8(s, (uint8_t)l);
+@@ -703,7 +703,7 @@ static void jl_serialize_value_(ios_t *s, jl_value_t *v)
+ writetag(s, (jl_value_t*)LongSymbol_tag);
+ write_int32(s, l);
+ }
+- ios_write(s, ((jl_sym_t*)v)->name, l);
++ ios_write(s, jl_symbol_name((jl_sym_t*)v), l);
+ }
+ else if (jl_is_globalref(v)) {
+ if (mode == MODE_AST && jl_globalref_mod(v) == tree_enclosing_module) {
+@@ -981,9 +981,9 @@ void jl_serialize_mod_list(ios_t *s)
+ jl_module_t *child = (jl_module_t*)b->value;
+ if (child->name == b->name) {
+ // this is the original/primary binding for the submodule
+- size_t l = strlen(child->name->name);
++ size_t l = strlen(jl_symbol_name(child->name));
+ write_int32(s, l);
+- ios_write(s, child->name->name, l);
++ ios_write(s, jl_symbol_name(child->name), l);
+ write_uint64(s, child->uuid);
+ }
+ }
+@@ -1002,7 +1002,8 @@ static void jl_serialize_header(ios_t *s)
+ write_uint16(s, JI_FORMAT_VERSION);
+ ios_write(s, (char *) &BOM, 2);
+ write_uint8(s, sizeof(void*));
+- const char *OS_NAME = jl_get_OS_NAME()->name, *ARCH = jl_get_ARCH()->name;
++ const char *OS_NAME = jl_symbol_name(jl_get_OS_NAME());
++ const char *ARCH = jl_symbol_name(jl_get_ARCH());
+ ios_write(s, OS_NAME, strlen(OS_NAME)+1);
+ ios_write(s, ARCH, strlen(ARCH)+1);
+ ios_write(s, JULIA_VERSION_STRING, strlen(JULIA_VERSION_STRING)+1);
+@@ -1129,7 +1130,7 @@ static jl_value_t *jl_deserialize_datatype(ios_t *s, int pos, jl_value_t **loc)
+ dt->alignment = read_int32(s);
+ dt->haspadding = read_int8(s);
+ size_t fieldsize = jl_fielddesc_size(fielddesc_type);
+- ios_read(s, (char*)dt->fields, nf * fieldsize);
++ ios_read(s, jl_datatype_fields(dt), nf * fieldsize);
+ dt->types = (jl_svec_t*)jl_deserialize_value(s, (jl_value_t**)&dt->types);
+ jl_gc_wb(dt, dt->types);
+ }
+@@ -1223,7 +1224,7 @@ static jl_value_t *jl_deserialize_value_(ios_t *s, jl_value_t *vtag, jl_value_t
+ jl_svec_t *sv = jl_alloc_svec_uninit(len);
+ if (usetable)
+ arraylist_push(&backref_list, (jl_value_t*)sv);
+- jl_value_t **data = sv->data;
++ jl_value_t **data = jl_svec_data(sv);
+ for(i=0; i < len; i++) {
+ data[i] = jl_deserialize_value(s, &data[i]);
+ }
+@@ -1651,8 +1652,8 @@ DLLEXPORT int jl_deserialize_verify_header(ios_t *s)
+ read_uint16(s) == JI_FORMAT_VERSION &&
+ ios_read(s, (char *) &bom, 2) == 2 && bom == BOM &&
+ read_uint8(s) == sizeof(void*) &&
+- readstr_verify(s, jl_get_OS_NAME()->name) && !read_uint8(s) &&
+- readstr_verify(s, jl_get_ARCH()->name) && !read_uint8(s) &&
++ readstr_verify(s, jl_symbol_name(jl_get_OS_NAME())) && !read_uint8(s) &&
++ readstr_verify(s, jl_symbol_name(jl_get_ARCH())) && !read_uint8(s) &&
+ readstr_verify(s, JULIA_VERSION_STRING) && !read_uint8(s) &&
+ readstr_verify(s, jl_git_branch()) && !read_uint8(s) &&
+ readstr_verify(s, jl_git_commit()) && !read_uint8(s));
+@@ -1686,7 +1687,7 @@ static void jl_reinit_item(ios_t *f, jl_value_t *v, int how) {
+ JL_TRY {
+ switch (how) {
+ case 1: { // rehash ObjectIdDict
+- jl_array_t **a = (jl_array_t**)&v->fieldptr[0];
++ jl_array_t **a = (jl_array_t**)v;
+ jl_idtable_rehash(a, jl_array_len(*a));
+ jl_gc_wb(v, *a);
+ break;
+@@ -1697,12 +1698,14 @@ static void jl_reinit_item(ios_t *f, jl_value_t *v, int how) {
+ jl_declare_constant(b); // this can throw
+ if (b->value != NULL) {
+ if (!jl_is_module(b->value)) {
+- jl_errorf("invalid redefinition of constant %s", mod->name->name); // this also throws
++ jl_errorf("invalid redefinition of constant %s",
++ jl_symbol_name(mod->name)); // this also throws
+ }
+ if (jl_generating_output() && jl_options.incremental) {
+- jl_errorf("cannot replace module %s during incremental precompile", mod->name->name);
++ jl_errorf("cannot replace module %s during incremental precompile", jl_symbol_name(mod->name));
+ }
+- jl_printf(JL_STDERR, "WARNING: replacing module %s\n", mod->name->name);
++ jl_printf(JL_STDERR, "WARNING: replacing module %s\n",
++ jl_symbol_name(mod->name));
+ }
+ b->value = v;
+ jl_gc_wb_binding(b, v);
+diff --git a/src/gc.c b/src/gc.c
+index 32b6b70..e133034 100644
+--- a/src/gc.c
++++ b/src/gc.c
+@@ -39,8 +39,6 @@ extern "C" {
+ #define GC_QUEUED 2 // if it is reachable it will be marked as old
+ #define GC_MARKED_NOESC (GC_MARKED | GC_QUEUED) // reachable and young
+
+-#define jl_valueof(v) (&((jl_taggedvalue_t*)(v))->value)
+-
+ // This struct must be kept in sync with the Julia type of the same name in base/util.jl
+ typedef struct {
+ int64_t allocd;
+@@ -1643,8 +1641,9 @@ static int push_root(jl_value_t *v, int d, int bits)
+ // some values have special representations
+ if (vt == (jl_value_t*)jl_simplevector_type) {
+ size_t l = jl_svec_len(v);
+- MARK(v, bits = gc_setmark(v, l*sizeof(void*) + sizeof(jl_svec_t), GC_MARKED_NOESC));
+- jl_value_t **data = ((jl_svec_t*)v)->data;
++ MARK(v, bits = gc_setmark(v, l * sizeof(void*) +
++ sizeof(jl_svec_t), GC_MARKED_NOESC));
++ jl_value_t **data = jl_svec_data(v);
+ nptr += l;
+ for(size_t i=0; i < l; i++) {
+ jl_value_t *elt = data[i];
+diff --git a/src/gf.c b/src/gf.c
+index 5b88689..022411f 100644
+--- a/src/gf.c
++++ b/src/gf.c
+@@ -230,7 +230,8 @@ static jl_function_t *jl_method_table_assoc_exact_by_type(jl_methtable_t *mt, jl
+ ml = mt->cache;
+ mt_assoc_bt_lkup:
+ while (ml != (void*)jl_nothing) {
+- if (cache_match_by_type(jl_svec_data(types->parameters), jl_datatype_nfields(types),
++ if (cache_match_by_type(jl_svec_data(types->parameters),
++ jl_datatype_nfields(types),
+ ml->sig, ml->va)) {
+ return ml->func;
+ }
+@@ -415,7 +416,7 @@ void jl_type_infer(jl_lambda_info_t *li, jl_tupletype_t *argtypes, jl_lambda_inf
+ fargs[2] = (jl_value_t*)jl_emptysvec;
+ fargs[3] = (jl_value_t*)def;
+ #ifdef TRACE_INFERENCE
+- jl_printf(JL_STDERR,"inference on %s", li->name->name);
++ jl_printf(JL_STDERR,"inference on %s", jl_symbol_name(li->name));
+ jl_static_show_func_sig(JL_STDERR, (jl_value_t*)argtypes);
+ jl_printf(JL_STDERR, "\n");
+ #endif
+@@ -705,7 +706,7 @@ static jl_function_t *cache_method(jl_methtable_t *mt, jl_tupletype_t *type,
+ if (jl_svec_len(sparams) > 0) {
+ lastdeclt = (jl_value_t*)
+ jl_instantiate_type_with((jl_value_t*)lastdeclt,
+- sparams->data,
++ jl_svec_data(sparams),
+ jl_svec_len(sparams)/2);
+ }
+ jl_svecset(limited, i, lastdeclt);
+@@ -780,7 +781,7 @@ static jl_function_t *cache_method(jl_methtable_t *mt, jl_tupletype_t *type,
+ else {
+ if (jl_options.compile_enabled == JL_OPTIONS_COMPILE_OFF) {
+ if (method->linfo->unspecialized == NULL) {
+- jl_printf(JL_STDERR,"code missing for %s", method->linfo->name->name);
++ jl_printf(JL_STDERR,"code missing for %s", jl_symbol_name(method->linfo->name));
+ jl_static_show_func_sig(JL_STDERR, (jl_value_t*)type);
+ jl_printf(JL_STDERR, " sysimg may not have been built with --compile=all\n");
+ exit(1);
+@@ -903,7 +904,7 @@ static jl_value_t *lookup_match(jl_value_t *a, jl_value_t *b, jl_svec_t **penv,
+ }
+ if (n != l) {
+ jl_svec_t *en = jl_alloc_svec_uninit(n);
+- memcpy(en->data, ee, n*sizeof(void*));
++ memcpy(jl_svec_data(en), ee, n*sizeof(void*));
+ *penv = en;
+ }
+ JL_GC_POP();
+@@ -1157,7 +1158,7 @@ static void check_ambiguous(jl_methlist_t *ml, jl_tupletype_t *type,
+ goto done_chk_amb; // ok, intersection is covered
+ l = l->next;
+ }
+- n = fname->name;
++ n = jl_symbol_name(fname);
+ s = JL_STDERR;
+ jl_printf(s, "WARNING: New definition \n %s", n);
+ jl_static_show_func_sig(s, (jl_value_t*)type);
+@@ -1202,11 +1203,14 @@ jl_methlist_t *jl_method_list_insert(jl_methlist_t **pml, jl_tupletype_t *type,
+ (l->func->linfo->module != method->linfo->module)) {
+ jl_module_t *newmod = method->linfo->module;
+ JL_STREAM *s = JL_STDERR;
+- jl_printf(s, "WARNING: Method definition %s", method->linfo->name->name);
++ jl_printf(s, "WARNING: Method definition %s",
++ jl_symbol_name(method->linfo->name));
+ jl_static_show_func_sig(s, (jl_value_t*)type);
+- jl_printf(s, " in module %s", l->func->linfo->module->name->name);
++ jl_printf(s, " in module %s",
++ jl_symbol_name(l->func->linfo->module->name));
+ print_func_loc(s, l->func->linfo);
+- jl_printf(s, " overwritten in module %s", newmod->name->name);
++ jl_printf(s, " overwritten in module %s",
++ jl_symbol_name(newmod->name));
+ print_func_loc(s, method->linfo);
+ jl_printf(s, ".\n");
+ }
+@@ -1822,7 +1826,7 @@ void print_func_loc(JL_STREAM *s, jl_lambda_info_t *li)
+ {
+ long lno = li->line;
+ if (lno > 0) {
+- char *fname = ((jl_sym_t*)li->file)->name;
++ char *fname = jl_symbol_name((jl_sym_t*)li->file);
+ jl_printf(s, " at %s:%ld", fname, lno);
+ }
+ }
+diff --git a/src/interpreter.c b/src/interpreter.c
+index df6da97..3f3d964 100644
+--- a/src/interpreter.c
++++ b/src/interpreter.c
+@@ -102,7 +102,8 @@ static int equiv_type(jl_datatype_t *dta, jl_datatype_t *dtb)
+ static void check_can_assign_type(jl_binding_t *b)
+ {
+ if (b->constp && b->value != NULL && !jl_is_datatype(b->value))
+- jl_errorf("invalid redefinition of constant %s", b->name->name);
++ jl_errorf("invalid redefinition of constant %s",
++ jl_symbol_name(b->name));
+ }
+
+ static jl_value_t *eval(jl_value_t *e, jl_value_t **locals, size_t nl, size_t ngensym)
+@@ -371,11 +372,12 @@ static jl_value_t *eval(jl_value_t *e, jl_value_t **locals, size_t nl, size_t ng
+ assert(jl_is_svec(para));
+ vnb = eval(args[2], locals, nl, ngensym);
+ if (!jl_is_long(vnb))
+- jl_errorf("invalid declaration of bits type %s", ((jl_sym_t*)name)->name);
++ jl_errorf("invalid declaration of bits type %s",
++ jl_symbol_name((jl_sym_t*)name));
+ ssize_t nb = jl_unbox_long(vnb);
+ if (nb < 1 || nb>=(1<<23) || (nb&7) != 0)
+ jl_errorf("invalid number of bits in type %s",
+- ((jl_sym_t*)name)->name);
++ jl_symbol_name((jl_sym_t*)name));
+ dt = jl_new_bitstype(name, jl_any_type, (jl_svec_t*)para, nb);
+ jl_binding_t *b = jl_get_binding_wr(jl_current_module, (jl_sym_t*)name);
+ temp = b->value;
+@@ -421,7 +423,9 @@ static jl_value_t *eval(jl_value_t *e, jl_value_t **locals, size_t nl, size_t ng
+ for(size_t i=0; i < jl_svec_len(dt->types); i++) {
+ jl_value_t *elt = jl_svecref(dt->types, i);
+ if (!jl_is_type(elt) && !jl_is_typevar(elt))
+- jl_type_error_rt(dt->name->name->name, "type definition", (jl_value_t*)jl_type_type, elt);
++ jl_type_error_rt(jl_symbol_name(dt->name->name),
++ "type definition",
++ (jl_value_t*)jl_type_type, elt);
+ }
+ super = eval(args[3], locals, nl, ngensym);
+ jl_set_datatype_super(dt, super);
+@@ -493,7 +497,7 @@ static jl_value_t *eval(jl_value_t *e, jl_value_t **locals, size_t nl, size_t ng
+ else if (ex->head == meta_sym) {
+ return (jl_value_t*)jl_nothing;
+ }
+- jl_errorf("unsupported or misplaced expression %s", ex->head->name);
++ jl_errorf("unsupported or misplaced expression %s", jl_symbol_name(ex->head));
+ return (jl_value_t*)jl_nothing;
+ }
+
+diff --git a/src/jlapi.c b/src/jlapi.c
+index a654d74..7b92254 100644
+--- a/src/jlapi.c
++++ b/src/jlapi.c
+@@ -82,7 +82,7 @@ DLLEXPORT const char *jl_typename_str(jl_value_t *v)
+ {
+ if (!jl_is_datatype(v))
+ return NULL;
+- return ((jl_datatype_t*)v)->name->name->name;
++ return jl_symbol_name(((jl_datatype_t*)v)->name->name);
+ }
+
+ // get the name of typeof(v) as a string
+@@ -304,16 +304,19 @@ DLLEXPORT const char *jl_git_commit()
+ }
+
+ // Create function versions of some useful macros
+-#undef jl_astaggedvalue
+-DLLEXPORT jl_taggedvalue_t *jl_astaggedvalue(jl_value_t *v)
++DLLEXPORT jl_taggedvalue_t *(jl_astaggedvalue)(jl_value_t *v)
+ {
+- return jl_astaggedvalue__MACRO(v);
++ return jl_astaggedvalue(v);
+ }
+
+-#undef jl_typeof
+-DLLEXPORT jl_value_t *jl_typeof(jl_value_t *v)
++DLLEXPORT jl_value_t *(jl_valueof)(jl_taggedvalue_t *v)
+ {
+- return jl_typeof__MACRO(v);
++ return jl_valueof(v);
++}
++
++DLLEXPORT jl_value_t *(jl_typeof)(jl_value_t *v)
++{
++ return jl_typeof(v);
+ }
+
+ #ifdef __cplusplus
+diff --git a/src/jltypes.c b/src/jltypes.c
+index ad3e5df..178c92a 100644
+--- a/src/jltypes.c
++++ b/src/jltypes.c
+@@ -277,7 +277,7 @@ static jl_svec_t *jl_compute_type_union(jl_value_t **types, size_t ntypes)
+ // sort Union components by specificity, so "complex" type Unions work as
+ // long as there are no ambiguities (see e.g. issue #126).
+ // TODO: maybe warn about ambiguities
+- qsort(result->data, j, sizeof(jl_value_t*), union_elt_morespecific);
++ qsort(jl_svec_data(result), j, sizeof(jl_value_t*), union_elt_morespecific);
+ JL_GC_POP();
+ return result;
+ }
+@@ -1267,7 +1267,7 @@ void print_env(cenv_t *soln)
+ for(int i=0; i < soln->n; i+=2) {
+ jl_value_t *T, *S;
+ T = soln->data[i]; S = soln->data[i+1];
+- jl_printf(JL_STDOUT, "%s@%x=", ((jl_tvar_t*)T)->name->name, T);
++ jl_printf(JL_STDOUT, "%s@%x=", jl_symbol_name(((jl_tvar_t*)T)->name), T);
+ jl_static_show(JL_STDOUT, S);
+ jl_printf(JL_STDOUT, " ");
+ }
+@@ -1714,7 +1714,7 @@ jl_value_t *jl_apply_type_(jl_value_t *tc, jl_value_t **params, size_t n)
+ else {
+ assert(jl_is_datatype(tc));
+ tp = ((jl_datatype_t*)tc)->parameters;
+- tname = ((jl_datatype_t*)tc)->name->name->name;
++ tname = jl_symbol_name(((jl_datatype_t*)tc)->name->name);
+ stprimary = (jl_datatype_t*)((jl_datatype_t*)tc)->name->primary;
+ }
+ for(i=0; i < n; i++) {
+@@ -1989,7 +1989,7 @@ jl_value_t *jl_cache_type_(jl_datatype_t *type)
+ {
+ if (is_cacheable(type)) {
+ int ord = is_typekey_ordered(jl_svec_data(type->parameters), jl_svec_len(type->parameters));
+- ssize_t idx = lookup_type_idx(type->name, type->parameters->data,
++ ssize_t idx = lookup_type_idx(type->name, jl_svec_data(type->parameters),
+ jl_svec_len(type->parameters), ord);
+ if (idx >= 0)
+ return jl_svecref(ord ? type->name->cache : type->name->linearcache, idx);
+@@ -2250,7 +2250,7 @@ static jl_value_t *inst_type_w_(jl_value_t *t, jl_value_t **env, size_t n,
+ jl_value_t *val = env[i*2+1];
+ if (check && !jl_is_typevar(val) && !jl_subtype(val, t, 0)) {
+ jl_type_error_rt("type parameter",
+- ((jl_tvar_t*)t)->name->name,
++ jl_symbol_name(((jl_tvar_t*)t)->name),
+ t, val);
+ }
+ return val;
+@@ -2294,8 +2294,8 @@ static jl_value_t *inst_type_w_(jl_value_t *t, jl_value_t **env, size_t n,
+ iparams[i] = (jl_value_t*)inst_type_w_(elt, env, n, stack, elt != tv);
+ if (jl_is_typevar(tv) && !jl_is_typevar(iparams[i])) {
+ if (!jl_subtype(iparams[i], tv, 0)) {
+- jl_type_error_rt(tt->name->name->name,
+- ((jl_tvar_t*)tv)->name->name,
++ jl_type_error_rt(jl_symbol_name(tt->name->name),
++ jl_symbol_name(((jl_tvar_t*)tv)->name),
+ tv, iparams[i]);
+ }
+ }
+diff --git a/src/julia.h b/src/julia.h
+index 29407e9..d92cc34 100644
+--- a/src/julia.h
++++ b/src/julia.h
+@@ -75,33 +75,30 @@ extern "C" {
+
+ // core data types ------------------------------------------------------------
+
+-#ifndef _COMPILER_MICROSOFT_
+-#define JL_DATA_TYPE \
+- struct _jl_value_t *fieldptr0[0];
+-#else
+ #define JL_DATA_TYPE
+-#endif
+
+-typedef struct _jl_value_t {
+- JL_DATA_TYPE
+- struct _jl_value_t *fieldptr[];
+-} jl_value_t;
++typedef struct _jl_value_t jl_value_t;
++
++// typedef struct _jl_value_t {
++// JL_DATA_TYPE
++// struct _jl_value_t *fieldptr[];
++// } jl_value_t;
+
+ typedef struct {
+ union {
+ jl_value_t *type; // 16-bytes aligned
+ uintptr_t type_bits;
+- struct {
+- uintptr_t gc_bits:2;
+- };
++ uintptr_t gc_bits:2;
+ };
+- jl_value_t value;
++ // jl_value_t value;
+ } jl_taggedvalue_t;
+
+-#define jl_astaggedvalue__MACRO(v) container_of((v),jl_taggedvalue_t,value)
+-#define jl_typeof__MACRO(v) ((jl_value_t*)(jl_astaggedvalue__MACRO(v)->type_bits&~(uintptr_t)15))
+-#define jl_astaggedvalue jl_astaggedvalue__MACRO
+-#define jl_typeof jl_typeof__MACRO
++#define jl_astaggedvalue(v) \
++ ((jl_taggedvalue_t*)((char*)(v) - sizeof(jl_taggedvalue_t)))
++#define jl_valueof(v) \
++ ((jl_value_t*)((char*)(v) + sizeof(jl_taggedvalue_t)))
++#define jl_typeof(v) \
++ ((jl_value_t*)(jl_astaggedvalue(v)->type_bits & ~(uintptr_t)15))
+ static inline void jl_set_typeof(void *v, void *t)
+ {
+ jl_taggedvalue_t *tag = jl_astaggedvalue(v);
+@@ -114,7 +111,7 @@ typedef struct _jl_sym_t {
+ struct _jl_sym_t *left;
+ struct _jl_sym_t *right;
+ uptrint_t hash; // precomputed hash value
+- JL_ATTRIBUTE_ALIGN_PTRSIZE(char name[]);
++ // JL_ATTRIBUTE_ALIGN_PTRSIZE(char name[]);
+ } jl_sym_t;
+
+ typedef struct _jl_gensym_t {
+@@ -125,7 +122,8 @@ typedef struct _jl_gensym_t {
+ typedef struct {
+ JL_DATA_TYPE
+ size_t length;
+- jl_value_t *data[];
++ // pointer size aligned
++ // jl_value_t *data[];
+ } jl_svec_t;
+
+ typedef struct {
+@@ -286,7 +284,12 @@ typedef struct _jl_datatype_t {
+ uint32_t uid;
+ void *struct_decl; //llvm::Value*
+ void *ditype; // llvm::MDNode* to be used as llvm::DIType(ditype)
+- size_t fields[];
++ // Last field needs to be pointer size aligned
++ // union {
++ // jl_fielddesc8_t field8[];
++ // jl_fielddesc16_t field16[];
++ // jl_fielddesc32_t field32[];
++ // };
+ } jl_datatype_t;
+
+ typedef struct {
+@@ -619,7 +622,7 @@ DLLEXPORT void *jl_gc_managed_realloc(void *d, size_t sz, size_t oldsz, int isal
+
+ #define jl_svec_len(t) (((jl_svec_t*)(t))->length)
+ #define jl_svec_set_len_unsafe(t,n) (((jl_svec_t*)(t))->length=(n))
+-#define jl_svec_data(t) (((jl_svec_t*)(t))->data)
++#define jl_svec_data(t) ((jl_value_t**)((char*)(t) + sizeof(jl_svec_t)))
+
+ STATIC_INLINE jl_value_t *jl_svecref(void *t, size_t i)
+ {
+@@ -690,47 +693,56 @@ STATIC_INLINE jl_value_t *jl_cellset(void *a, size_t i, void *x)
+ #define jl_tparam1(t) jl_svecref(((jl_datatype_t*)(t))->parameters, 1)
+ #define jl_tparam(t,i) jl_svecref(((jl_datatype_t*)(t))->parameters, i)
+
++// get a pointer to the data in a datatype
++#define jl_data_ptr(v) ((jl_value_t**)v)
++
+ #define jl_cell_data(a) ((jl_value_t**)((jl_array_t*)a)->data)
+-#define jl_string_data(s) ((char*)((jl_array_t*)(s)->fieldptr[0])->data)
+-#define jl_string_len(s) (jl_array_len(((jl_array_t*)(s)->fieldptr[0])))
+-#define jl_iostr_data(s) ((char*)((jl_array_t*)(s)->fieldptr[0])->data)
++#define jl_string_data(s) ((char*)((jl_array_t*)jl_data_ptr(s)[0])->data)
++#define jl_string_len(s) (jl_array_len((jl_array_t*)(jl_data_ptr(s)[0])))
++#define jl_iostr_data(s) ((char*)((jl_array_t*)jl_data_ptr(s)[0])->data)
+
+ #define jl_gf_mtable(f) ((jl_methtable_t*)((jl_function_t*)(f))->env)
+ #define jl_gf_name(f) (jl_gf_mtable(f)->name)
+
+-// get a pointer to the data in a datatype
+-#define jl_data_ptr(v) (((jl_value_t*)v)->fieldptr)
+-
+ // struct type info
+ #define jl_field_name(st,i) (jl_sym_t*)jl_svecref(((jl_datatype_t*)st)->name->names, (i))
+ #define jl_field_type(st,i) jl_svecref(((jl_datatype_t*)st)->types, (i))
+ #define jl_datatype_size(t) (((jl_datatype_t*)t)->size)
+ #define jl_datatype_nfields(t) (((jl_datatype_t*)(t))->nfields)
+
++// inline version with strong type check to detect typos in a `->name` chain
++STATIC_INLINE char *jl_symbol_name_(jl_sym_t *s)
++{
++ return (char*)s + LLT_ALIGN(sizeof(jl_sym_t), sizeof(void*));
++}
++#define jl_symbol_name(s) jl_symbol_name_(s)
++
++#define jl_datatype_fields(d) ((char*)(d) + sizeof(jl_datatype_t))
++
+ #define DEFINE_FIELD_ACCESSORS(f) \
+ static inline uint32_t jl_field_##f(jl_datatype_t *st, int i) \
+ { \
+ if (st->fielddesc_type == 0) { \
+- return ((jl_fielddesc8_t*)st->fields)[i].f; \
++ return ((jl_fielddesc8_t*)jl_datatype_fields(st))[i].f; \
+ } \
+ else if (st->fielddesc_type == 1) { \
+- return ((jl_fielddesc16_t*)st->fields)[i].f; \
++ return ((jl_fielddesc16_t*)jl_datatype_fields(st))[i].f; \
+ } \
+ else { \
+- return ((jl_fielddesc32_t*)st->fields)[i].f; \
++ return ((jl_fielddesc32_t*)jl_datatype_fields(st))[i].f; \
+ } \
+ } \
+ static inline void jl_field_set##f(jl_datatype_t *st, int i, \
+ uint32_t val) \
+ { \
+ if (st->fielddesc_type == 0) { \
+- ((jl_fielddesc8_t*)st->fields)[i].f = val; \
++ ((jl_fielddesc8_t*)jl_datatype_fields(st))[i].f = val; \
+ } \
+ else if (st->fielddesc_type == 1) { \
+- ((jl_fielddesc16_t*)st->fields)[i].f = val; \
++ ((jl_fielddesc16_t*)jl_datatype_fields(st))[i].f = val; \
+ } \
+ else { \
+- ((jl_fielddesc32_t*)st->fields)[i].f = val; \
++ ((jl_fielddesc32_t*)jl_datatype_fields(st))[i].f = val; \
+ } \
+ }
+
+diff --git a/src/module.c b/src/module.c
+index 44bff90..ab4b0e5 100644
+--- a/src/module.c
++++ b/src/module.c
+@@ -94,7 +94,7 @@ DLLEXPORT jl_binding_t *jl_get_binding_wr(jl_module_t *m, jl_sym_t *var)
+ else if ((*bp)->owner != m) {
+ // TODO: change this to an error soon
+ jl_printf(JL_STDERR,
+- "WARNING: imported binding for %s overwritten in module %s\n", var->name, m->name->name);
++ "WARNING: imported binding for %s overwritten in module %s\n", jl_symbol_name(var), jl_symbol_name(m->name));
+ }
+ else {
+ return *bp;
+@@ -127,7 +127,8 @@ DLLEXPORT jl_binding_t *jl_get_binding_for_method_def(jl_module_t *m, jl_sym_t *
+ if (opmod != NULL && jl_defines_or_exports_p(opmod, var)) {
+ jl_printf(JL_STDERR,
+ "WARNING: module %s should explicitly import %s from %s\n",
+- m->name->name, var->name, jl_base_module->name->name);
++ jl_symbol_name(m->name), jl_symbol_name(var),
++ jl_symbol_name(jl_base_module->name));
+ jl_module_import(m, opmod, var);
+ }
+ }
+@@ -139,10 +140,10 @@ DLLEXPORT jl_binding_t *jl_get_binding_for_method_def(jl_module_t *m, jl_sym_t *
+ if (b->owner != m && b->owner != NULL) {
+ jl_binding_t *b2 = jl_get_binding(b->owner, var);
+ if (b2 == NULL)
+- jl_errorf("invalid method definition: imported function %s.%s does not exist", b->owner->name->name, var->name);
++ jl_errorf("invalid method definition: imported function %s.%s does not exist", jl_symbol_name(b->owner->name), jl_symbol_name(var));
+ if (!b->imported && (b2->value==NULL || jl_is_function(b2->value))) {
+ if (b2->value && !jl_is_gf(b2->value)) {
+- jl_errorf("error in method definition: %s.%s cannot be extended", b->owner->name->name, var->name);
++ jl_errorf("error in method definition: %s.%s cannot be extended", jl_symbol_name(b->owner->name), jl_symbol_name(var));
+ }
+ else {
+ if (jl_base_module && m->std_imports && b->owner == jl_base_module) {
+@@ -150,11 +151,14 @@ DLLEXPORT jl_binding_t *jl_get_binding_for_method_def(jl_module_t *m, jl_sym_t *
+ if (opmod != NULL && jl_defines_or_exports_p(opmod, var)) {
+ jl_printf(JL_STDERR,
+ "WARNING: module %s should explicitly import %s from %s\n",
+- m->name->name, var->name, b->owner->name->name);
++ jl_symbol_name(m->name),
++ jl_symbol_name(var),
++ jl_symbol_name(b->owner->name));
+ return b2;
+ }
+ }
+- jl_errorf("error in method definition: function %s.%s must be explicitly imported to be extended", b->owner->name->name, var->name);
++ jl_errorf("error in method definition: function %s.%s must be explicitly imported to be extended", jl_symbol_name(b->owner->name),
++ jl_symbol_name(var));
+ }
+ }
+ return b2;
+@@ -205,7 +209,9 @@ static jl_binding_t *jl_get_binding_(jl_module_t *m, jl_sym_t *var, modstack_t *
+ !(tempb->constp && tempb->value && b->constp && b->value == tempb->value)) {
+ jl_printf(JL_STDERR,
+ "WARNING: both %s and %s export \"%s\"; uses of it in module %s must be qualified\n",
+- owner->name->name, imp->name->name, var->name, m->name->name);
++ jl_symbol_name(owner->name),
++ jl_symbol_name(imp->name), jl_symbol_name(var),
++ jl_symbol_name(m->name));
+ // mark this binding resolved, to avoid repeating the warning
+ (void)jl_get_binding_wr(m, var);
+ return NULL;
+@@ -284,7 +290,8 @@ static void module_import_(jl_module_t *to, jl_module_t *from, jl_sym_t *s,
+ if (b == NULL) {
+ jl_printf(JL_STDERR,
+ "WARNING: could not import %s.%s into %s\n",
+- from->name->name, s->name, to->name->name);
++ jl_symbol_name(from->name), jl_symbol_name(s),
++ jl_symbol_name(to->name));
+ }
+ else {
+ jl_binding_t **bp = (jl_binding_t**)ptrhash_bp(&to->bindings, s);
+@@ -307,7 +314,8 @@ static void module_import_(jl_module_t *to, jl_module_t *from, jl_sym_t *s,
+ }
+ jl_printf(JL_STDERR,
+ "WARNING: ignoring conflicting import of %s.%s into %s\n",
+- from->name->name, s->name, to->name->name);
++ jl_symbol_name(from->name), jl_symbol_name(s),
++ jl_symbol_name(to->name));
+ }
+ else if (bto->constp || bto->value) {
+ // conflict with name owned by destination module
+@@ -318,7 +326,8 @@ static void module_import_(jl_module_t *to, jl_module_t *from, jl_sym_t *s,
+ }
+ jl_printf(JL_STDERR,
+ "WARNING: import of %s.%s into %s conflicts with an existing identifier; ignored.\n",
+- from->name->name, s->name, to->name->name);
++ jl_symbol_name(from->name), jl_symbol_name(s),
++ jl_symbol_name(to->name));
+ }
+ else {
+ bto->owner = b->owner;
+@@ -383,7 +392,8 @@ void jl_module_using(jl_module_t *to, jl_module_t *from)
+ !eq_bindings(jl_get_binding(to,var), b)) {
+ jl_printf(JL_STDERR,
+ "WARNING: using %s.%s in module %s conflicts with an existing identifier.\n",
+- from->name->name, var->name, to->name->name);
++ jl_symbol_name(from->name), jl_symbol_name(var),
++ jl_symbol_name(to->name));
+ }
+ }
+ }
+@@ -488,14 +498,15 @@ void jl_binding_deprecation_warning(jl_binding_t *b)
+ if (jl_options.depwarn != JL_OPTIONS_DEPWARN_ERROR)
+ jl_printf(JL_STDERR, "WARNING: ");
+ if (b->owner)
+- jl_printf(JL_STDERR, "%s.%s is deprecated", b->owner->name->name, b->name->name);
++ jl_printf(JL_STDERR, "%s.%s is deprecated",
++ jl_symbol_name(b->owner->name), jl_symbol_name(b->name));
+ else
+- jl_printf(JL_STDERR, "%s is deprecated", b->name->name);
++ jl_printf(JL_STDERR, "%s is deprecated", jl_symbol_name(b->name));
+ jl_value_t *v = b->value;
+ if (v && (jl_is_type(v) || (jl_is_function(v) && jl_is_gf(v)))) {
+ jl_printf(JL_STDERR, ", use ");
+- if (b->owner && strcmp(b->owner->name->name, "Base") == 0 &&
+- strcmp(b->name->name, "Uint") == 0) {
++ if (b->owner && strcmp(jl_symbol_name(b->owner->name), "Base") == 0 &&
++ strcmp(jl_symbol_name(b->name), "Uint") == 0) {
+ // TODO: Suggesting type b->value is wrong for typealiases.
+ // Uncommon in Base, hardcoded here for now, see #13221
+ jl_printf(JL_STDERR, "UInt");
+@@ -512,9 +523,11 @@ void jl_binding_deprecation_warning(jl_binding_t *b)
+
+ if (jl_options.depwarn == JL_OPTIONS_DEPWARN_ERROR) {
+ if (b->owner)
+- jl_errorf("deprecated binding: %s.%s", b->owner->name->name, b->name->name);
++ jl_errorf("deprecated binding: %s.%s",
++ jl_symbol_name(b->owner->name),
++ jl_symbol_name(b->name));
+ else
+- jl_errorf("deprecated binding: %s", b->name->name);
++ jl_errorf("deprecated binding: %s", jl_symbol_name(b->name));
+ }
+ }
+ }
+@@ -525,9 +538,11 @@ DLLEXPORT void jl_checked_assignment(jl_binding_t *b, jl_value_t *rhs)
+ if (!jl_egal(rhs, b->value)) {
+ if (jl_typeof(rhs) != jl_typeof(b->value) ||
+ jl_is_type(rhs) || jl_is_function(rhs) || jl_is_module(rhs)) {
+- jl_errorf("invalid redefinition of constant %s", b->name->name);
++ jl_errorf("invalid redefinition of constant %s",
++ jl_symbol_name(b->name));
+ }
+- jl_printf(JL_STDERR,"WARNING: redefining constant %s\n",b->name->name);
++ jl_printf(JL_STDERR, "WARNING: redefining constant %s\n",
++ jl_symbol_name(b->name));
+ }
+ }
+ b->value = rhs;
+@@ -538,7 +553,7 @@ DLLEXPORT void jl_declare_constant(jl_binding_t *b)
+ {
+ if (b->value != NULL && !b->constp) {
+ jl_errorf("cannot declare %s constant; it already has a value",
+- b->name->name);
++ jl_symbol_name(b->name));
+ }
+ b->constp = 1;
+ }
+diff --git a/src/toplevel.c b/src/toplevel.c
+index 1e5f34a..f991096 100644
+--- a/src/toplevel.c
++++ b/src/toplevel.c
+@@ -115,14 +115,17 @@ jl_value_t *jl_eval_module_expr(jl_expr_t *ex)
+ jl_declare_constant(b);
+ if (b->value != NULL) {
+ if (!jl_is_module(b->value)) {
+- jl_errorf("invalid redefinition of constant %s", name->name);
++ jl_errorf("invalid redefinition of constant %s",
++ jl_symbol_name(name));
+ }
+ if (jl_generating_output() && jl_options.incremental) {
+- jl_errorf("cannot replace module %s during incremental compile", name->name);
++ jl_errorf("cannot replace module %s during incremental compile",
++ jl_symbol_name(name));
+ }
+ if (!jl_generating_output()) {
+ // suppress warning "replacing module Core.Inference" during bootstrapping
+- jl_printf(JL_STDERR, "WARNING: replacing module %s\n", name->name);
++ jl_printf(JL_STDERR, "WARNING: replacing module %s\n",
++ jl_symbol_name(name));
+ }
+ }
+ jl_module_t *newm = jl_new_module(name);
+@@ -190,13 +193,14 @@ jl_value_t *jl_eval_module_expr(jl_expr_t *ex)
+ if (table[i] != HT_NOTFOUND) {
+ jl_binding_t *b = (jl_binding_t*)table[i];
+ // remove non-exported macros
+- if (b->name->name[0]=='@' && !b->exportp && b->owner==newm)
++ if (jl_symbol_name(b->name)[0]=='@' &&
++ !b->exportp && b->owner == newm)
+ b->value = NULL;
+ // error for unassigned exports
+ /*
+ if (b->exportp && b->owner==newm && b->value==NULL)
+ jl_errorf("identifier %s exported from %s is not initialized",
+- b->name->name, newm->name->name);
++ jl_symbol_name(b->name), jl_symbol_name(newm->name));
+ */
+ }
+ }
+@@ -349,7 +353,8 @@ static jl_module_t *eval_import_path_(jl_array_t *args, int retrying)
+ m = (jl_module_t*)mb->value;
+ if ((mb->owner == m0 && m != NULL && !jl_is_module(m)) ||
+ (isimp && (m == NULL || !jl_is_module(m))))
+- jl_errorf("invalid module path (%s does not name a module)", var->name);
++ jl_errorf("invalid module path (%s does not name a module)",
++ jl_symbol_name(var));
+ // If the binding has been resolved but is (1) undefined, and (2) owned
+ // by the module we're importing into, then allow the import into the
+ // undefined variable (by setting m back to m0).
+@@ -370,11 +375,12 @@ static jl_module_t *eval_import_path_(jl_array_t *args, int retrying)
+ }
+ }
+ if (retrying && require_func) {
+- jl_printf(JL_STDERR, "WARNING: requiring \"%s\" in module \"%s\" did not define a corresponding module.\n", var->name, jl_current_module->name->name);
++ jl_printf(JL_STDERR, "WARNING: requiring \"%s\" in module \"%s\" did not define a corresponding module.\n", jl_symbol_name(var),
++ jl_symbol_name(jl_current_module->name));
+ return NULL;
+ }
+ else {
+- jl_errorf("in module path: %s not defined", var->name);
++ jl_errorf("in module path: %s not defined", jl_symbol_name(var));
+ }
+ }
+
+@@ -432,7 +438,7 @@ jl_value_t *jl_toplevel_eval_flex(jl_value_t *e, int fast)
+ jl_error("syntax: malformed \"importall\" statement");
+ m = (jl_module_t*)jl_eval_global_var(m, name);
+ if (!jl_is_module(m))
+- jl_errorf("invalid %s statement: name exists but does not refer to a module", ex->head->name);
++ jl_errorf("invalid %s statement: name exists but does not refer to a module", jl_symbol_name(ex->head));
+ jl_module_importall(jl_current_module, m);
+ return jl_nothing;
+ }
+@@ -636,7 +642,8 @@ void jl_set_datatype_super(jl_datatype_t *tt, jl_value_t *super)
+ jl_subtype(super,(jl_value_t*)jl_vararg_type,0) ||
+ jl_is_tuple_type(super) ||
+ jl_subtype(super,(jl_value_t*)jl_type_type,0)) {
+- jl_errorf("invalid subtyping in definition of %s",tt->name->name->name);
++ jl_errorf("invalid subtyping in definition of %s",
++ jl_symbol_name(tt->name->name));
+ }
+ tt->super = (jl_datatype_t*)super;
+ jl_gc_wb(tt, tt->super);
+@@ -684,11 +691,13 @@ DLLEXPORT jl_value_t *jl_generic_function_def(jl_sym_t *name, jl_value_t **bp, j
+ jl_value_t *gf=NULL;
+
+ if (bnd && bnd->value != NULL && !bnd->constp)
+- jl_errorf("cannot define function %s; it already has a value", bnd->name->name);
++ jl_errorf("cannot define function %s; it already has a value",
++ jl_symbol_name(bnd->name));
+ if (*bp != NULL) {
+ gf = *bp;
+ if (!jl_is_gf(gf))
+- jl_errorf("cannot define function %s; it already has a value", name->name);
++ jl_errorf("cannot define function %s; it already has a value",
++ jl_symbol_name(name));
+ }
+ if (bnd)
+ bnd->constp = 1;
+@@ -731,7 +740,8 @@ DLLEXPORT jl_value_t *jl_method_def(jl_sym_t *name, jl_value_t **bp, jl_value_t
+ JL_GC_PUSH4(&gf, &tvars, &argtypes, &f);
+
+ if (bnd && bnd->value != NULL && !bnd->constp) {
+- jl_errorf("cannot define function %s; it already has a value", bnd->name->name);
++ jl_errorf("cannot define function %s; it already has a value",
++ jl_symbol_name(bnd->name));
+ }
+
+ if (*bp != NULL) {
+@@ -791,7 +801,8 @@ DLLEXPORT jl_value_t *jl_method_def(jl_sym_t *name, jl_value_t **bp, jl_value_t
+ }
+ }
+ if (!jl_is_gf(gf)) {
+- jl_errorf("cannot define function %s; it already has a value", name->name);
++ jl_errorf("cannot define function %s; it already has a value",
++ jl_symbol_name(name));
+ }
+ }
+ if (iskw) {
+@@ -811,18 +822,21 @@ DLLEXPORT jl_value_t *jl_method_def(jl_sym_t *name, jl_value_t **bp, jl_value_t
+ if (!jl_is_type(elt) && !jl_is_typevar(elt)) {
+ jl_lambda_info_t *li = f->linfo;
+ jl_exceptionf(jl_argumenterror_type, "invalid type for argument %s in method definition for %s at %s:%d",
+- jl_lam_argname(li,i)->name, name->name, li->file->name, li->line);
++ jl_symbol_name(jl_lam_argname(li,i)),
++ jl_symbol_name(name), jl_symbol_name(li->file),
++ li->line);
+ }
+ }
+
+- int ishidden = !!strchr(name->name, '#');
++ int ishidden = !!strchr(jl_symbol_name(name), '#');
+ for(size_t i=0; i < jl_svec_len(tvars); i++) {
+ jl_value_t *tv = jl_svecref(tvars,i);
+ if (!jl_is_typevar(tv))
+- jl_type_error_rt(name->name, "method definition", (jl_value_t*)jl_tvar_type, tv);
++ jl_type_error_rt(jl_symbol_name(name), "method definition", (jl_value_t*)jl_tvar_type, tv);
+ if (!ishidden && !type_contains((jl_value_t*)argtypes, tv)) {
+ jl_printf(JL_STDERR, "WARNING: static parameter %s does not occur in signature for %s",
+- ((jl_tvar_t*)tv)->name->name, name->name);
++ jl_symbol_name(((jl_tvar_t*)tv)->name),
++ jl_symbol_name(name));
+ print_func_loc(JL_STDERR, f->linfo);
+ jl_printf(JL_STDERR, ".\nThe method will not be callable.\n");
+ }
+@@ -867,7 +881,8 @@ void jl_check_static_parameter_conflicts(jl_lambda_info_t *li, jl_svec_t *t, jl_
+ ((jl_tvar_t*)tv)->name) {
+ jl_printf(JL_STDERR,
+ "WARNING: local variable %s conflicts with a static parameter in %s",
+- ((jl_tvar_t*)tv)->name->name, fname->name);
++ jl_symbol_name(((jl_tvar_t*)tv)->name),
++ jl_symbol_name(fname));
+ print_func_loc(JL_STDERR, li);
+ jl_printf(JL_STDERR, ".\n");
+ }
+--
+2.5.0
+
diff --git a/julia.spec b/julia.spec
index aae507c..76816c6 100644
--- a/julia.spec
+++ b/julia.spec
@@ -22,6 +22,7 @@ Source0: https://github.com/JuliaLang/julia/releases/download/v%{version}
Source1: https://api.github.com/repos/JuliaLang/libuv/tarball/%{uvcommit}#/libuv-%{uvcommit}.tar.gz
# Julia currently uses a custom version of Rmath, called Rmath-julia, with a custom RNG system (temporary)
Source2: https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v%{Rmathjuliaversion}#/Rmath-julia-%{Rmathjuliaversion}.tar.gz
+Patch0: 0001-Remove-0-size-and-variable-size-array-members-from-p.patch
Provides: bundled(libuv) = %{uvversion}
Provides: bundled(Rmath) = %{Rmathversion}
BuildRequires: arpack-devel
@@ -119,6 +120,7 @@ Julia into external programs or debugging Julia itself.
%prep
%setup -qn %{name}-%{version}
+%patch0 -p1
pushd deps
# Julia downloads tarballs for external dependencies even when the folder is present:
reply other threads:[~2026-12-01 21:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179616110882.1.12678200687072387554.rpms-julia-5a55b810d1fa@fedoraproject.org \
--to=nalimilan@club.fr \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox