| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 #define DECLARE_PRINTER(Name) | 881 #define DECLARE_PRINTER(Name) |
| 882 #endif | 882 #endif |
| 883 | 883 |
| 884 #define OBJECT_TYPE_LIST(V) \ | 884 #define OBJECT_TYPE_LIST(V) \ |
| 885 V(Smi) \ | 885 V(Smi) \ |
| 886 V(LayoutDescriptor) \ | 886 V(LayoutDescriptor) \ |
| 887 V(HeapObject) \ | 887 V(HeapObject) \ |
| 888 V(Primitive) \ | 888 V(Primitive) \ |
| 889 V(Number) | 889 V(Number) |
| 890 | 890 |
| 891 #define HEAP_OBJECT_TYPE_LIST(V) \ | 891 #define HEAP_OBJECT_TYPE_LIST(V) \ |
| 892 V(HeapNumber) \ | 892 V(HeapNumber) \ |
| 893 V(MutableHeapNumber) \ | 893 V(MutableHeapNumber) \ |
| 894 V(Simd128Value) \ | 894 V(Simd128Value) \ |
| 895 V(Float32x4) \ | 895 V(Float32x4) \ |
| 896 V(Int32x4) \ | 896 V(Int32x4) \ |
| 897 V(Uint32x4) \ | 897 V(Uint32x4) \ |
| 898 V(Bool32x4) \ | 898 V(Bool32x4) \ |
| 899 V(Int16x8) \ | 899 V(Int16x8) \ |
| 900 V(Uint16x8) \ | 900 V(Uint16x8) \ |
| 901 V(Bool16x8) \ | 901 V(Bool16x8) \ |
| 902 V(Int8x16) \ | 902 V(Int8x16) \ |
| 903 V(Uint8x16) \ | 903 V(Uint8x16) \ |
| 904 V(Bool8x16) \ | 904 V(Bool8x16) \ |
| 905 V(Name) \ | 905 V(Name) \ |
| 906 V(UniqueName) \ | 906 V(UniqueName) \ |
| 907 V(String) \ | 907 V(String) \ |
| 908 V(SeqString) \ | 908 V(SeqString) \ |
| 909 V(ExternalString) \ | 909 V(ExternalString) \ |
| 910 V(ConsString) \ | 910 V(ConsString) \ |
| 911 V(SlicedString) \ | 911 V(SlicedString) \ |
| 912 V(ExternalTwoByteString) \ | 912 V(ExternalTwoByteString) \ |
| 913 V(ExternalOneByteString) \ | 913 V(ExternalOneByteString) \ |
| 914 V(SeqTwoByteString) \ | 914 V(SeqTwoByteString) \ |
| 915 V(SeqOneByteString) \ | 915 V(SeqOneByteString) \ |
| 916 V(InternalizedString) \ | 916 V(InternalizedString) \ |
| 917 V(Symbol) \ | 917 V(Symbol) \ |
| 918 \ | 918 \ |
| 919 V(FixedTypedArrayBase) \ | 919 V(FixedTypedArrayBase) \ |
| 920 V(FixedUint8Array) \ | 920 V(FixedUint8Array) \ |
| 921 V(FixedInt8Array) \ | 921 V(FixedInt8Array) \ |
| 922 V(FixedUint16Array) \ | 922 V(FixedUint16Array) \ |
| 923 V(FixedInt16Array) \ | 923 V(FixedInt16Array) \ |
| 924 V(FixedUint32Array) \ | 924 V(FixedUint32Array) \ |
| 925 V(FixedInt32Array) \ | 925 V(FixedInt32Array) \ |
| 926 V(FixedFloat32Array) \ | 926 V(FixedFloat32Array) \ |
| 927 V(FixedFloat64Array) \ | 927 V(FixedFloat64Array) \ |
| 928 V(FixedUint8ClampedArray) \ | 928 V(FixedUint8ClampedArray) \ |
| 929 V(ByteArray) \ | 929 V(ByteArray) \ |
| 930 V(BytecodeArray) \ | 930 V(BytecodeArray) \ |
| 931 V(FreeSpace) \ | 931 V(FreeSpace) \ |
| 932 V(JSReceiver) \ | 932 V(JSReceiver) \ |
| 933 V(JSObject) \ | 933 V(JSObject) \ |
| 934 V(JSContextExtensionObject) \ | 934 V(JSContextExtensionObject) \ |
| 935 V(JSGeneratorObject) \ | 935 V(JSGeneratorObject) \ |
| 936 V(JSModule) \ | 936 V(JSModule) \ |
| 937 V(Map) \ | 937 V(Map) \ |
| 938 V(DescriptorArray) \ | 938 V(DescriptorArray) \ |
| 939 V(TransitionArray) \ | 939 V(TransitionArray) \ |
| 940 V(LiteralsArray) \ | 940 V(LiteralsArray) \ |
| 941 V(TypeFeedbackMetadata) \ | 941 V(TypeFeedbackMetadata) \ |
| 942 V(TypeFeedbackVector) \ | 942 V(TypeFeedbackVector) \ |
| 943 V(DeoptimizationInputData) \ | 943 V(DeoptimizationInputData) \ |
| 944 V(DeoptimizationOutputData) \ | 944 V(DeoptimizationOutputData) \ |
| 945 V(DependentCode) \ | 945 V(DependentCode) \ |
| 946 V(HandlerTable) \ | 946 V(HandlerTable) \ |
| 947 V(FixedArray) \ | 947 V(FixedArray) \ |
| 948 V(FixedDoubleArray) \ | 948 V(FixedDoubleArray) \ |
| 949 V(WeakFixedArray) \ | 949 V(WeakFixedArray) \ |
| 950 V(ArrayList) \ | 950 V(ArrayList) \ |
| 951 V(Context) \ | 951 V(Context) \ |
| 952 V(ScriptContextTable) \ | 952 V(ScriptContextTable) \ |
| 953 V(NativeContext) \ | 953 V(NativeContext) \ |
| 954 V(ScopeInfo) \ | 954 V(ScopeInfo) \ |
| 955 V(JSBoundFunction) \ | 955 V(JSBoundFunction) \ |
| 956 V(JSFunction) \ | 956 V(JSFunction) \ |
| 957 V(Code) \ | 957 V(Code) \ |
| 958 V(AbstractCode) \ | 958 V(AbstractCode) \ |
| 959 V(Oddball) \ | 959 V(Oddball) \ |
| 960 V(SharedFunctionInfo) \ | 960 V(SharedFunctionInfo) \ |
| 961 V(JSValue) \ | 961 V(JSValue) \ |
| 962 V(JSDate) \ | 962 V(JSDate) \ |
| 963 V(JSMessageObject) \ | 963 V(JSMessageObject) \ |
| 964 V(StringWrapper) \ | 964 V(StringWrapper) \ |
| 965 V(Foreign) \ | 965 V(Foreign) \ |
| 966 V(Boolean) \ | 966 V(Boolean) \ |
| 967 V(JSArray) \ | 967 V(JSArray) \ |
| 968 V(JSArrayBuffer) \ | 968 V(JSArrayBuffer) \ |
| 969 V(JSArrayBufferView) \ | 969 V(JSArrayBufferView) \ |
| 970 V(JSTypedArray) \ | 970 V(JSTypedArray) \ |
| 971 V(JSDataView) \ | 971 V(JSDataView) \ |
| 972 V(JSProxy) \ | 972 V(JSProxy) \ |
| 973 V(JSSet) \ | 973 V(JSError) \ |
| 974 V(JSMap) \ | 974 V(JSSet) \ |
| 975 V(JSSetIterator) \ | 975 V(JSMap) \ |
| 976 V(JSMapIterator) \ | 976 V(JSSetIterator) \ |
| 977 V(JSWeakCollection) \ | 977 V(JSMapIterator) \ |
| 978 V(JSWeakMap) \ | 978 V(JSWeakCollection) \ |
| 979 V(JSWeakSet) \ | 979 V(JSWeakMap) \ |
| 980 V(JSRegExp) \ | 980 V(JSWeakSet) \ |
| 981 V(HashTable) \ | 981 V(JSRegExp) \ |
| 982 V(Dictionary) \ | 982 V(HashTable) \ |
| 983 V(StringTable) \ | 983 V(Dictionary) \ |
| 984 V(StringSet) \ | 984 V(StringTable) \ |
| 985 V(NormalizedMapCache) \ | 985 V(StringSet) \ |
| 986 V(CompilationCacheTable) \ | 986 V(NormalizedMapCache) \ |
| 987 V(CodeCacheHashTable) \ | 987 V(CompilationCacheTable) \ |
| 988 V(MapCache) \ | 988 V(CodeCacheHashTable) \ |
| 989 V(JSGlobalObject) \ | 989 V(MapCache) \ |
| 990 V(JSGlobalProxy) \ | 990 V(JSGlobalObject) \ |
| 991 V(Undetectable) \ | 991 V(JSGlobalProxy) \ |
| 992 V(AccessCheckNeeded) \ | 992 V(Undetectable) \ |
| 993 V(Callable) \ | 993 V(AccessCheckNeeded) \ |
| 994 V(Function) \ | 994 V(Callable) \ |
| 995 V(Constructor) \ | 995 V(Function) \ |
| 996 V(TemplateInfo) \ | 996 V(Constructor) \ |
| 997 V(Filler) \ | 997 V(TemplateInfo) \ |
| 998 V(FixedArrayBase) \ | 998 V(Filler) \ |
| 999 V(External) \ | 999 V(FixedArrayBase) \ |
| 1000 V(Struct) \ | 1000 V(External) \ |
| 1001 V(Cell) \ | 1001 V(Struct) \ |
| 1002 V(PropertyCell) \ | 1002 V(Cell) \ |
| 1003 V(WeakCell) \ | 1003 V(PropertyCell) \ |
| 1004 V(ObjectHashTable) \ | 1004 V(WeakCell) \ |
| 1005 V(WeakHashTable) \ | 1005 V(ObjectHashTable) \ |
| 1006 V(WeakHashTable) \ |
| 1006 V(OrderedHashTable) | 1007 V(OrderedHashTable) |
| 1007 | 1008 |
| 1008 #define ODDBALL_LIST(V) \ | 1009 #define ODDBALL_LIST(V) \ |
| 1009 V(Undefined, undefined_value) \ | 1010 V(Undefined, undefined_value) \ |
| 1010 V(Null, null_value) \ | 1011 V(Null, null_value) \ |
| 1011 V(TheHole, the_hole_value) \ | 1012 V(TheHole, the_hole_value) \ |
| 1012 V(Exception, exception) \ | 1013 V(Exception, exception) \ |
| 1013 V(Uninitialized, uninitialized_value) \ | 1014 V(Uninitialized, uninitialized_value) \ |
| 1014 V(True, true_value) \ | 1015 V(True, true_value) \ |
| 1015 V(False, false_value) \ | 1016 V(False, false_value) \ |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 Handle<JSReceiver> receiver, Handle<Name> name); | 1183 Handle<JSReceiver> receiver, Handle<Name> name); |
| 1183 | 1184 |
| 1184 // ES6 section 7.3.17 CreateListFromArrayLike | 1185 // ES6 section 7.3.17 CreateListFromArrayLike |
| 1185 MUST_USE_RESULT static MaybeHandle<FixedArray> CreateListFromArrayLike( | 1186 MUST_USE_RESULT static MaybeHandle<FixedArray> CreateListFromArrayLike( |
| 1186 Isolate* isolate, Handle<Object> object, ElementTypes element_types); | 1187 Isolate* isolate, Handle<Object> object, ElementTypes element_types); |
| 1187 | 1188 |
| 1188 // Get length property and apply ToLength. | 1189 // Get length property and apply ToLength. |
| 1189 MUST_USE_RESULT static MaybeHandle<Object> GetLengthFromArrayLike( | 1190 MUST_USE_RESULT static MaybeHandle<Object> GetLengthFromArrayLike( |
| 1190 Isolate* isolate, Handle<Object> object); | 1191 Isolate* isolate, Handle<Object> object); |
| 1191 | 1192 |
| 1192 // Check whether |object| is an instance of Error or NativeError. | |
| 1193 static bool IsErrorObject(Isolate* isolate, Handle<Object> object); | |
| 1194 | |
| 1195 // ES6 section 12.5.6 The typeof Operator | 1193 // ES6 section 12.5.6 The typeof Operator |
| 1196 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object); | 1194 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object); |
| 1197 | 1195 |
| 1198 // ES6 section 12.6 Multiplicative Operators | 1196 // ES6 section 12.6 Multiplicative Operators |
| 1199 MUST_USE_RESULT static MaybeHandle<Object> Multiply(Isolate* isolate, | 1197 MUST_USE_RESULT static MaybeHandle<Object> Multiply(Isolate* isolate, |
| 1200 Handle<Object> lhs, | 1198 Handle<Object> lhs, |
| 1201 Handle<Object> rhs); | 1199 Handle<Object> rhs); |
| 1202 MUST_USE_RESULT static MaybeHandle<Object> Divide(Isolate* isolate, | 1200 MUST_USE_RESULT static MaybeHandle<Object> Divide(Isolate* isolate, |
| 1203 Handle<Object> lhs, | 1201 Handle<Object> lhs, |
| 1204 Handle<Object> rhs); | 1202 Handle<Object> rhs); |
| (...skipping 9620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10825 } | 10823 } |
| 10826 return value; | 10824 return value; |
| 10827 } | 10825 } |
| 10828 }; | 10826 }; |
| 10829 | 10827 |
| 10830 | 10828 |
| 10831 } // NOLINT, false-positive due to second-order macros. | 10829 } // NOLINT, false-positive due to second-order macros. |
| 10832 } // NOLINT, false-positive due to second-order macros. | 10830 } // NOLINT, false-positive due to second-order macros. |
| 10833 | 10831 |
| 10834 #endif // V8_OBJECTS_H_ | 10832 #endif // V8_OBJECTS_H_ |
| OLD | NEW |