 Chromium Code Reviews
 Chromium Code Reviews Issue 7003058:
  A collection of context-related refactoring changes.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 7003058:
  A collection of context-related refactoring changes.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: src/objects-inl.h | 
| diff --git a/src/objects-inl.h b/src/objects-inl.h | 
| index 72dca225900ae5815fb92b106d86351aaa01b069..b5718ddaf9c660869168a0fb2b16b2357e6ca9c1 100644 | 
| --- a/src/objects-inl.h | 
| +++ b/src/objects-inl.h | 
| @@ -523,22 +523,17 @@ bool Object::IsDeoptimizationOutputData() { | 
| bool Object::IsContext() { | 
| if (Object::IsHeapObject()) { | 
| - Heap* heap = HeapObject::cast(this)->GetHeap(); | 
| - return (HeapObject::cast(this)->map() == heap->context_map() || | 
| - HeapObject::cast(this)->map() == heap->catch_context_map() || | 
| - HeapObject::cast(this)->map() == heap->global_context_map()); | 
| + 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->global_context_map()); | 
| } | 
| return false; | 
| } | 
| -bool Object::IsCatchContext() { | 
| 
Kevin Millikin (Chromium)
2011/06/08 16:35:52
We only ever ask this of Contexts, so I just moved
 | 
| - return Object::IsHeapObject() && | 
| - HeapObject::cast(this)->map() == | 
| - HeapObject::cast(this)->GetHeap()->catch_context_map(); | 
| -} | 
| - | 
| - | 
| bool Object::IsGlobalContext() { | 
| return Object::IsHeapObject() && | 
| HeapObject::cast(this)->map() == |