LJ_GC64: Fix ir_khash for non-string GCobj.
Contributed by Peter Cawley.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user