diff options
| author | Mike Pall <mike> | 2014-05-15 17:37:38 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2014-05-15 17:37:38 +0200 |
| commit | 52b081528a168c887566b59f4e0c5d68f41cee4b (patch) | |
| tree | 33076969d25b619fc758ca1d8f5e3d1def4a2b7c /src | |
| parent | 159cfd63f5b72f283391e7729609daabe7707472 (diff) | |
| parent | fe288e7b836deb21fedf489c590d2e2a6ad6816b (diff) | |
| download | luajit-52b081528a168c887566b59f4e0c5d68f41cee4b.tar.gz luajit-52b081528a168c887566b59f4e0c5d68f41cee4b.tar.bz2 luajit-52b081528a168c887566b59f4e0c5d68f41cee4b.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_crecord.c | 3 | ||||
| -rw-r--r-- | src/lj_opt_fold.c | 15 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index c0a468fc..4119533f 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
| @@ -806,7 +806,7 @@ again: | |||
| 806 | } | 806 | } |
| 807 | } else if (tref_isstr(idx)) { | 807 | } else if (tref_isstr(idx)) { |
| 808 | GCstr *name = strV(&rd->argv[1]); | 808 | GCstr *name = strV(&rd->argv[1]); |
| 809 | if (cd->ctypeid == CTID_CTYPEID) | 809 | if (cd && cd->ctypeid == CTID_CTYPEID) |
| 810 | ct = ctype_raw(cts, crec_constructor(J, cd, ptr)); | 810 | ct = ctype_raw(cts, crec_constructor(J, cd, ptr)); |
| 811 | if (ctype_isstruct(ct->info)) { | 811 | if (ctype_isstruct(ct->info)) { |
| 812 | CTSize fofs; | 812 | CTSize fofs; |
| @@ -847,6 +847,7 @@ again: | |||
| 847 | CType *cct = ctype_rawchild(cts, ct); | 847 | CType *cct = ctype_rawchild(cts, ct); |
| 848 | if (ctype_isstruct(cct->info)) { | 848 | if (ctype_isstruct(cct->info)) { |
| 849 | ct = cct; | 849 | ct = cct; |
| 850 | cd = NULL; | ||
| 850 | if (tref_isstr(idx)) goto again; | 851 | if (tref_isstr(idx)) goto again; |
| 851 | } | 852 | } |
| 852 | } | 853 | } |
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index ab963ed4..77293fb5 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c | |||
| @@ -497,13 +497,14 @@ LJFOLDF(kfold_strref_snew) | |||
| 497 | } else { | 497 | } else { |
| 498 | /* Reassociate: strref(snew(strref(str, a), len), b) ==> strref(str, a+b) */ | 498 | /* Reassociate: strref(snew(strref(str, a), len), b) ==> strref(str, a+b) */ |
| 499 | IRIns *ir = IR(fleft->op1); | 499 | IRIns *ir = IR(fleft->op1); |
| 500 | IRRef1 str = ir->op1; /* IRIns * is not valid across emitir. */ | 500 | if (ir->o == IR_STRREF) { |
| 501 | lua_assert(ir->o == IR_STRREF); | 501 | IRRef1 str = ir->op1; /* IRIns * is not valid across emitir. */ |
| 502 | PHIBARRIER(ir); | 502 | PHIBARRIER(ir); |
| 503 | fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */ | 503 | fins->op2 = emitir(IRTI(IR_ADD), ir->op2, fins->op2); /* Clobbers fins! */ |
| 504 | fins->op1 = str; | 504 | fins->op1 = str; |
| 505 | fins->ot = IRT(IR_STRREF, IRT_P32); | 505 | fins->ot = IRT(IR_STRREF, IRT_P32); |
| 506 | return RETRYFOLD; | 506 | return RETRYFOLD; |
| 507 | } | ||
| 507 | } | 508 | } |
| 508 | return NEXTFOLD; | 509 | return NEXTFOLD; |
| 509 | } | 510 | } |
