Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/objects-inl.h

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Changes from review Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 return true; 780 return true;
781 } 781 }
782 782
783 bool HeapObject::IsContext() const { 783 bool HeapObject::IsContext() const {
784 Map* map = this->map(); 784 Map* map = this->map();
785 Heap* heap = GetHeap(); 785 Heap* heap = GetHeap();
786 return ( 786 return (
787 map == heap->function_context_map() || map == heap->catch_context_map() || 787 map == heap->function_context_map() || map == heap->catch_context_map() ||
788 map == heap->with_context_map() || map == heap->native_context_map() || 788 map == heap->with_context_map() || map == heap->native_context_map() ||
789 map == heap->block_context_map() || map == heap->module_context_map() || 789 map == heap->block_context_map() || map == heap->module_context_map() ||
790 map == heap->script_context_map() || 790 map == heap->eval_context_map() || map == heap->script_context_map() ||
791 map == heap->debug_evaluate_context_map()); 791 map == heap->debug_evaluate_context_map());
792 } 792 }
793 793
794 bool HeapObject::IsNativeContext() const { 794 bool HeapObject::IsNativeContext() const {
795 return map() == GetHeap()->native_context_map(); 795 return map() == GetHeap()->native_context_map();
796 } 796 }
797 797
798 bool HeapObject::IsScriptContextTable() const { 798 bool HeapObject::IsScriptContextTable() const {
799 return map() == GetHeap()->script_context_table_map(); 799 return map() == GetHeap()->script_context_table_map();
800 } 800 }
(...skipping 7681 matching lines...) Expand 10 before | Expand all | Expand 10 after
8482 #undef WRITE_INT64_FIELD 8482 #undef WRITE_INT64_FIELD
8483 #undef READ_BYTE_FIELD 8483 #undef READ_BYTE_FIELD
8484 #undef WRITE_BYTE_FIELD 8484 #undef WRITE_BYTE_FIELD
8485 #undef NOBARRIER_READ_BYTE_FIELD 8485 #undef NOBARRIER_READ_BYTE_FIELD
8486 #undef NOBARRIER_WRITE_BYTE_FIELD 8486 #undef NOBARRIER_WRITE_BYTE_FIELD
8487 8487
8488 } // namespace internal 8488 } // namespace internal
8489 } // namespace v8 8489 } // namespace v8
8490 8490
8491 #endif // V8_OBJECTS_INL_H_ 8491 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698