Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 3cd0553d58e1cfe90604e1cf45f1213c4e9ccd75..887fed085faa1013a26302a359cfcf44c33170ea 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1064,6 +1064,9 @@ class Object { |
STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
#undef DECLARE_STRUCT_PREDICATE |
+ INLINE(bool IsTheHole(Isolate* isolate) const); |
+ INLINE(bool IsUndefined(Isolate* isolate) const); |
+ |
// ES6, section 7.2.2 IsArray. NOT to be confused with %_IsArray. |
MUST_USE_RESULT static Maybe<bool> IsArray(Handle<Object> object); |
@@ -1560,6 +1563,9 @@ class HeapObject: public Object { |
STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
#undef DECLARE_STRUCT_PREDICATE |
+ INLINE(bool IsTheHole(Isolate* isolate) const); |
+ INLINE(bool IsUndefined(Isolate* isolate) const); |
+ |
// Converts an address to a HeapObject pointer. |
static inline HeapObject* FromAddress(Address address) { |
DCHECK_TAG_ALIGNED(address); |
@@ -3870,7 +3876,7 @@ class OrderedHashTable: public FixedArray { |
int KeyToFirstEntry(Object* key) { |
Object* hash = key->GetHash(); |
// If the object does not have an identity hash, it was never used as a key |
- if (hash->IsUndefined()) return kNotFound; |
+ if (hash->IsUndefined(GetIsolate())) return kNotFound; |
ulan
2016/06/01 19:01:44
Before it was doing 2 loads
hash->map->instance_ty
|
return HashToEntry(Smi::cast(hash)->value()); |
} |
@@ -3879,7 +3885,7 @@ class OrderedHashTable: public FixedArray { |
return Smi::cast(next_entry)->value(); |
} |
- // use KeyAt(i)->IsTheHole() to determine if this is a deleted entry. |
+ // use KeyAt(i)->IsTheHole(isolate) to determine if this is a deleted entry. |
Object* KeyAt(int entry) { |
DCHECK_LT(entry, this->UsedCapacity()); |
return get(EntryToIndex(entry)); |