aboutsummaryrefslogtreecommitdiff
path: root/src/lj_opt_fold.c
diff options
context:
space:
mode:
authorMike Pall <mike>2014-05-15 17:37:38 +0200
committerMike Pall <mike>2014-05-15 17:37:38 +0200
commit52b081528a168c887566b59f4e0c5d68f41cee4b (patch)
tree33076969d25b619fc758ca1d8f5e3d1def4a2b7c /src/lj_opt_fold.c
parent159cfd63f5b72f283391e7729609daabe7707472 (diff)
parentfe288e7b836deb21fedf489c590d2e2a6ad6816b (diff)
downloadluajit-52b081528a168c887566b59f4e0c5d68f41cee4b.tar.gz
luajit-52b081528a168c887566b59f4e0c5d68f41cee4b.tar.bz2
luajit-52b081528a168c887566b59f4e0c5d68f41cee4b.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src/lj_opt_fold.c')
-rw-r--r--src/lj_opt_fold.c15
1 files changed, 8 insertions, 7 deletions
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}