diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_opt_mem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c index 09de2f05..455b0ca6 100644 --- a/src/lj_opt_mem.c +++ b/src/lj_opt_mem.c | |||
@@ -186,6 +186,7 @@ static TRef fwd_ahload(jit_State *J, IRRef xref) | |||
186 | fwd_aa_tab_clear(J, tab, tab)) { | 186 | fwd_aa_tab_clear(J, tab, tab)) { |
187 | /* A NEWREF with a number key may end up pointing to the array part. | 187 | /* A NEWREF with a number key may end up pointing to the array part. |
188 | ** But it's referenced from HSTORE and not found in the ASTORE chain. | 188 | ** But it's referenced from HSTORE and not found in the ASTORE chain. |
189 | ** Or a NEWREF may rehash the table and move unrelated number keys. | ||
189 | ** For now simply consider this a conflict without forwarding anything. | 190 | ** For now simply consider this a conflict without forwarding anything. |
190 | */ | 191 | */ |
191 | if (xr->o == IR_AREF) { | 192 | if (xr->o == IR_AREF) { |
@@ -196,6 +197,11 @@ static TRef fwd_ahload(jit_State *J, IRRef xref) | |||
196 | goto cselim; | 197 | goto cselim; |
197 | ref2 = newref->prev; | 198 | ref2 = newref->prev; |
198 | } | 199 | } |
200 | } else { | ||
201 | IRIns *key = IR(xr->op2); | ||
202 | if (key->o == IR_KSLOT) key = IR(key->op1); | ||
203 | if (irt_isnum(key->t) && J->chain[IR_NEWREF] > tab) | ||
204 | goto cselim; | ||
199 | } | 205 | } |
200 | /* NEWREF inhibits CSE for HREF, and dependent FLOADs from HREFK/AREF. | 206 | /* NEWREF inhibits CSE for HREF, and dependent FLOADs from HREFK/AREF. |
201 | ** But the above search for conflicting stores was limited by xref. | 207 | ** But the above search for conflicting stores was limited by xref. |