mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
52b081528a
@ -806,7 +806,7 @@ again:
|
|||||||
}
|
}
|
||||||
} else if (tref_isstr(idx)) {
|
} else if (tref_isstr(idx)) {
|
||||||
GCstr *name = strV(&rd->argv[1]);
|
GCstr *name = strV(&rd->argv[1]);
|
||||||
if (cd->ctypeid == CTID_CTYPEID)
|
if (cd && cd->ctypeid == CTID_CTYPEID)
|
||||||
ct = ctype_raw(cts, crec_constructor(J, cd, ptr));
|
ct = ctype_raw(cts, crec_constructor(J, cd, ptr));
|
||||||
if (ctype_isstruct(ct->info)) {
|
if (ctype_isstruct(ct->info)) {
|
||||||
CTSize fofs;
|
CTSize fofs;
|
||||||
@ -847,6 +847,7 @@ again:
|
|||||||
CType *cct = ctype_rawchild(cts, ct);
|
CType *cct = ctype_rawchild(cts, ct);
|
||||||
if (ctype_isstruct(cct->info)) {
|
if (ctype_isstruct(cct->info)) {
|
||||||
ct = cct;
|
ct = cct;
|
||||||
|
cd = NULL;
|
||||||
if (tref_isstr(idx)) goto again;
|
if (tref_isstr(idx)) goto again;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -497,13 +497,14 @@ LJFOLDF(kfold_strref_snew)
|
|||||||
} else {
|
} else {
|
||||||
/* Reassociate: strref(snew(strref(str, a), len), b) ==> strref(str, a+b) */
|
/* Reassociate: strref(snew(strref(str, a), len), b) ==> strref(str, a+b) */
|
||||||
IRIns *ir = IR(fleft->op1);
|
IRIns *ir = IR(fleft->op1);
|
||||||
IRRef1 str = ir->op1; /* IRIns * is not valid across emitir. */
|
if (ir->o == IR_STRREF) {
|
||||||
lua_assert(ir->o == IR_STRREF);
|
IRRef1 str = ir->op1; /* IRIns * is not valid across emitir. */
|
||||||
PHIBARRIER(ir);
|
PHIBARRIER(ir);
|
||||||
fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */
|
fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */
|
||||||
fins->op1 = str;
|
fins->op1 = str;
|
||||||
fins->ot = IRT(IR_STRREF, IRT_P32);
|
fins->ot = IRT(IR_STRREF, IRT_P32);
|
||||||
return RETRYFOLD;
|
return RETRYFOLD;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NEXTFOLD;
|
return NEXTFOLD;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user