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

Side by Side Diff: src/objects.h

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