Commit 97835059 authored by Axel Simon's avatar Axel Simon

fix emission of undefined record fields

parent 242dfd6f
......@@ -549,7 +549,9 @@ structure C1 = struct
| EQUAL => (f,v) :: addUndefFields (fTys, fs)
| GREATER => raise CodeGenBug
)
| addUndefFields (_, fs) = fs
| addUndefFields ((fTy,ty) :: fTys, []) =
(fTy,PRIexp (VOIDprim,VOIDvtype,[])) :: addUndefFields (fTys, [])
| addUndefFields ([], fs) = fs
fun emitAlloc (s : state) ty = emitMacro (s,ty,"alloc_","GEN_ALLOC(")
fun emitUnboxedAlloc (s : state) ty = emitMacro (s,ty,"alloc_unboxed_","GEN_ALLOC(unboxed_")
......
......@@ -210,7 +210,11 @@ static obj_t del_fields(state_t s, field_tag_t tags[], int tags_size, obj_t rec)
@alloc_funcs@
#define slice(vec_data,ofs,sz) ((vec_data >> ofs) & ((1ul << sz)-1))
#define gen_vec(vec_sz,vec_data) (vec_t){vec_sz, vec_data}
static INLINE_ATTR vec_t gen_vec(unsigned int vec_sz,vec_data_t vec_data) {
vec_t res = {vec_sz, vec_data};
return res;
}
jmp_buf*
@err_tgt@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment