]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Add workaround for lj_meta_tset() newkey inconsistency.
authorMike Pall <mike>
Tue, 15 Feb 2011 00:02:08 +0000 (01:02 +0100)
committerMike Pall <mike>
Tue, 15 Feb 2011 00:02:08 +0000 (01:02 +0100)
src/lj_record.c

index 26e87ab39b1fda9889267f9f7ac81c6252e941be..6517a1b7f78ed522dd2a9a48880efc73a0bc2ea1 100644 (file)
@@ -1021,7 +1021,8 @@ TRef lj_record_idx(jit_State *J, RecordIndex *ix)
   xref = rec_idx_key(J, ix);
   xrefop = IR(tref_ref(xref))->o;
   loadop = xrefop == IR_AREF ? IR_ALOAD : IR_HLOAD;
-  oldv = ix->oldv;
+  /* NYI: workaround until lj_meta_tset() inconsistency is solved. */
+  oldv = xrefop == IR_KKPTR ? (cTValue *)ir_kptr(IR(tref_ref(xref))) : ix->oldv;
 
   if (ix->val == 0) {  /* Indexed load */
     IRType t = itype2irt(oldv);