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

Side by Side Diff: src/objects.h

Issue 1480873003: Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix zapping Created 5 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/heap/objects-visiting-inl.h ('k') | src/objects.cc » ('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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 V(TYPE_FEEDBACK_INFO_TYPE) \ 405 V(TYPE_FEEDBACK_INFO_TYPE) \
406 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ 406 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \
407 V(BOX_TYPE) \ 407 V(BOX_TYPE) \
408 V(PROTOTYPE_INFO_TYPE) \ 408 V(PROTOTYPE_INFO_TYPE) \
409 V(SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE) \ 409 V(SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE) \
410 \ 410 \
411 V(FIXED_ARRAY_TYPE) \ 411 V(FIXED_ARRAY_TYPE) \
412 V(FIXED_DOUBLE_ARRAY_TYPE) \ 412 V(FIXED_DOUBLE_ARRAY_TYPE) \
413 V(SHARED_FUNCTION_INFO_TYPE) \ 413 V(SHARED_FUNCTION_INFO_TYPE) \
414 V(WEAK_CELL_TYPE) \ 414 V(WEAK_CELL_TYPE) \
415 V(TRANSITION_ARRAY_TYPE) \
415 \ 416 \
416 V(JS_MESSAGE_OBJECT_TYPE) \ 417 V(JS_MESSAGE_OBJECT_TYPE) \
417 \ 418 \
418 V(JS_VALUE_TYPE) \ 419 V(JS_VALUE_TYPE) \
419 V(JS_DATE_TYPE) \ 420 V(JS_DATE_TYPE) \
420 V(JS_OBJECT_TYPE) \ 421 V(JS_OBJECT_TYPE) \
421 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ 422 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
422 V(JS_GENERATOR_OBJECT_TYPE) \ 423 V(JS_GENERATOR_OBJECT_TYPE) \
423 V(JS_MODULE_TYPE) \ 424 V(JS_MODULE_TYPE) \
424 V(JS_GLOBAL_OBJECT_TYPE) \ 425 V(JS_GLOBAL_OBJECT_TYPE) \
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 POLYMORPHIC_CODE_CACHE_TYPE, 697 POLYMORPHIC_CODE_CACHE_TYPE,
697 TYPE_FEEDBACK_INFO_TYPE, 698 TYPE_FEEDBACK_INFO_TYPE,
698 ALIASED_ARGUMENTS_ENTRY_TYPE, 699 ALIASED_ARGUMENTS_ENTRY_TYPE,
699 BOX_TYPE, 700 BOX_TYPE,
700 DEBUG_INFO_TYPE, 701 DEBUG_INFO_TYPE,
701 BREAK_POINT_INFO_TYPE, 702 BREAK_POINT_INFO_TYPE,
702 FIXED_ARRAY_TYPE, 703 FIXED_ARRAY_TYPE,
703 SHARED_FUNCTION_INFO_TYPE, 704 SHARED_FUNCTION_INFO_TYPE,
704 CELL_TYPE, 705 CELL_TYPE,
705 WEAK_CELL_TYPE, 706 WEAK_CELL_TYPE,
707 TRANSITION_ARRAY_TYPE,
706 PROPERTY_CELL_TYPE, 708 PROPERTY_CELL_TYPE,
707 PROTOTYPE_INFO_TYPE, 709 PROTOTYPE_INFO_TYPE,
708 SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE, 710 SLOPPY_BLOCK_WITH_EVAL_CONTEXT_EXTENSION_TYPE,
709 711
710 // All the following types are subtypes of JSReceiver, which corresponds to 712 // All the following types are subtypes of JSReceiver, which corresponds to
711 // objects in the JS sense. The first and the last type in this range are 713 // objects in the JS sense. The first and the last type in this range are
712 // the two forms of function. This organization enables using the same 714 // the two forms of function. This organization enables using the same
713 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the 715 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the
714 // NONCALLABLE_JS_OBJECT range. 716 // NONCALLABLE_JS_OBJECT range.
715 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE 717 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 786
785 787
786 #define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \ 788 #define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \
787 V(FAST_ELEMENTS_SUB_TYPE) \ 789 V(FAST_ELEMENTS_SUB_TYPE) \
788 V(DICTIONARY_ELEMENTS_SUB_TYPE) \ 790 V(DICTIONARY_ELEMENTS_SUB_TYPE) \
789 V(FAST_PROPERTIES_SUB_TYPE) \ 791 V(FAST_PROPERTIES_SUB_TYPE) \
790 V(DICTIONARY_PROPERTIES_SUB_TYPE) \ 792 V(DICTIONARY_PROPERTIES_SUB_TYPE) \
791 V(MAP_CODE_CACHE_SUB_TYPE) \ 793 V(MAP_CODE_CACHE_SUB_TYPE) \
792 V(SCOPE_INFO_SUB_TYPE) \ 794 V(SCOPE_INFO_SUB_TYPE) \
793 V(STRING_TABLE_SUB_TYPE) \ 795 V(STRING_TABLE_SUB_TYPE) \
794 V(DESCRIPTOR_ARRAY_SUB_TYPE) \ 796 V(DESCRIPTOR_ARRAY_SUB_TYPE)
795 V(TRANSITION_ARRAY_SUB_TYPE)
796 797
797 enum FixedArraySubInstanceType { 798 enum FixedArraySubInstanceType {
798 #define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name) name, 799 #define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name) name,
799 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE) 800 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE)
800 #undef DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE 801 #undef DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE
801 LAST_FIXED_ARRAY_SUB_TYPE = TRANSITION_ARRAY_SUB_TYPE 802 LAST_FIXED_ARRAY_SUB_TYPE = DESCRIPTOR_ARRAY_SUB_TYPE
802 }; 803 };
803 804
804 805
805 // TODO(bmeurer): Remove this in favor of the ComparisonResult below. 806 // TODO(bmeurer): Remove this in favor of the ComparisonResult below.
806 enum CompareResult { 807 enum CompareResult {
807 LESS = -1, 808 LESS = -1,
808 EQUAL = 0, 809 EQUAL = 0,
809 GREATER = 1, 810 GREATER = 1,
810 811
811 NOT_EQUAL = GREATER 812 NOT_EQUAL = GREATER
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 class ObjectHashTable; 860 class ObjectHashTable;
860 class ObjectVisitor; 861 class ObjectVisitor;
861 class PropertyCell; 862 class PropertyCell;
862 class PropertyDescriptor; 863 class PropertyDescriptor;
863 class SafepointEntry; 864 class SafepointEntry;
864 class SharedFunctionInfo; 865 class SharedFunctionInfo;
865 class StringStream; 866 class StringStream;
866 class TypeFeedbackInfo; 867 class TypeFeedbackInfo;
867 class TypeFeedbackVector; 868 class TypeFeedbackVector;
868 class WeakCell; 869 class WeakCell;
870 class TransitionArray;
869 871
870 // We cannot just say "class HeapType;" if it is created from a template... =8-? 872 // We cannot just say "class HeapType;" if it is created from a template... =8-?
871 template<class> class TypeImpl; 873 template<class> class TypeImpl;
872 struct HeapTypeConfig; 874 struct HeapTypeConfig;
873 typedef TypeImpl<HeapTypeConfig> HeapType; 875 typedef TypeImpl<HeapTypeConfig> HeapType;
874 876
875 877
876 // A template-ized version of the IsXXX functions. 878 // A template-ized version of the IsXXX functions.
877 template <class C> inline bool Is(Object* obj); 879 template <class C> inline bool Is(Object* obj);
878 880
(...skipping 9842 matching lines...) Expand 10 before | Expand all | Expand 10 after
10721 } 10723 }
10722 return value; 10724 return value;
10723 } 10725 }
10724 }; 10726 };
10725 10727
10726 10728
10727 } // NOLINT, false-positive due to second-order macros. 10729 } // NOLINT, false-positive due to second-order macros.
10728 } // NOLINT, false-positive due to second-order macros. 10730 } // NOLINT, false-positive due to second-order macros.
10729 10731
10730 #endif // V8_OBJECTS_H_ 10732 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698