Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 46d98c6dfb99161a41982e2d2215d017b5520419..85dec994d1b8b4973e4e85f15b5b5b0efefe00aa 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -568,17 +568,16 @@ bool Object::IsTypeFeedbackCells() { |
bool Object::IsContext() { |
- if (Object::IsHeapObject()) { |
- Map* map = HeapObject::cast(this)->map(); |
- Heap* heap = map->GetHeap(); |
- return (map == heap->function_context_map() || |
- map == heap->catch_context_map() || |
- map == heap->with_context_map() || |
- map == heap->native_context_map() || |
- map == heap->block_context_map() || |
- map == heap->module_context_map()); |
- } |
- return false; |
+ if (!Object::IsHeapObject()) return false; |
+ Map* map = HeapObject::cast(this)->map(); |
+ Heap* heap = map->GetHeap(); |
+ return (map == heap->function_context_map() || |
+ map == heap->catch_context_map() || |
+ map == heap->with_context_map() || |
+ map == heap->native_context_map() || |
+ map == heap->block_context_map() || |
+ map == heap->module_context_map() || |
+ map == heap->global_context_map()); |
} |
@@ -589,13 +588,6 @@ bool Object::IsNativeContext() { |
} |
-bool Object::IsModuleContext() { |
- return Object::IsHeapObject() && |
- HeapObject::cast(this)->map() == |
- HeapObject::cast(this)->GetHeap()->module_context_map(); |
-} |
- |
- |
bool Object::IsScopeInfo() { |
return Object::IsHeapObject() && |
HeapObject::cast(this)->map() == |