mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
LJ_GC64: Fix ir_khash for non-string GCobj.
Contributed by Peter Cawley.
This commit is contained in:
parent
6a2d8b0b4d
commit
b4ed3219a1
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user