Fix PropertyKey::isArrayIndex
PropertyKey::asArrayIndex has a hole at UINT_MAX, so make isArrayIndex have the same hole. Change-Id: I85d0f14680c27d018644056960d75d94aee68646 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
56d6d905c2
commit
407e2769c7
|
@ -114,7 +114,7 @@ public:
|
|||
static PropertyKey fromArrayIndex(uint idx) { PropertyKey key; key.val = ArrayIndexMask | static_cast<quint64>(idx); return key; }
|
||||
bool isStringOrSymbol() const { return isManaged() && val != 0; }
|
||||
uint asArrayIndex() const { return (isManaged() || val == 0) ? std::numeric_limits<uint>::max() : static_cast<uint>(val & 0xffffffff); }
|
||||
uint isArrayIndex() const { return !isManaged() && val != 0; }
|
||||
uint isArrayIndex() const { return !isManaged() && val != 0 && static_cast<uint>(val & 0xffffffff) != std::numeric_limits<uint>::max(); }
|
||||
bool isValid() const { return val != 0; }
|
||||
static PropertyKey fromStringOrSymbol(Heap::StringOrSymbol *b)
|
||||
{ PropertyKey key; key.setM(b); return key; }
|
||||
|
|
Loading…
Reference in New Issue