فهرست منبع

LJ_GC64: Fix ir_khash for non-string GCobj.

Contributed by Peter Cawley.
Mike Pall 8 سال پیش
والد
کامیت
b4ed3219a1
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      src/lj_asm.c

+ 4 - 0
src/lj_asm.c

@@ -1017,7 +1017,11 @@ static uint32_t ir_khash(IRIns *ir)
   } else {
     lua_assert(irt_isgcv(ir->t));
     lo = u32ptr(ir_kgc(ir));
+#if LJ_GC64
+    hi = (uint32_t)(u64ptr(ir_kgc(ir)) >> 32) | (irt_toitype(ir->t) << 15);
+#else
     hi = lo + HASH_BIAS;
+#endif
   }
   return hashrot(lo, hi);
 }