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/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 V(JSGlobalProxy) \ | 985 V(JSGlobalProxy) \ |
986 V(UndetectableObject) \ | 986 V(UndetectableObject) \ |
987 V(AccessCheckNeeded) \ | 987 V(AccessCheckNeeded) \ |
988 V(Cell) \ | 988 V(Cell) \ |
989 V(PropertyCell) \ | 989 V(PropertyCell) \ |
990 V(WeakCell) \ | 990 V(WeakCell) \ |
991 V(ObjectHashTable) \ | 991 V(ObjectHashTable) \ |
992 V(WeakHashTable) \ | 992 V(WeakHashTable) \ |
993 V(OrderedHashTable) | 993 V(OrderedHashTable) |
994 | 994 |
995 // The element types selection for CreateListFromArrayLike. | |
996 enum class ElementTypes { kAll, kStringAndSymbol }; | |
997 | |
998 // Object is the abstract superclass for all classes in the | 995 // Object is the abstract superclass for all classes in the |
999 // object hierarchy. | 996 // object hierarchy. |
1000 // Object does not use any virtual functions to avoid the | 997 // Object does not use any virtual functions to avoid the |
1001 // allocation of the C++ vtable. | 998 // allocation of the C++ vtable. |
1002 // Since both Smi and HeapObject are subclasses of Object no | 999 // Since both Smi and HeapObject are subclasses of Object no |
1003 // data members can be present in Object. | 1000 // data members can be present in Object. |
1004 class Object { | 1001 class Object { |
1005 public: | 1002 public: |
1006 // Type testing. | 1003 // Type testing. |
1007 bool IsObject() const { return true; } | 1004 bool IsObject() const { return true; } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 Handle<Object> input); | 1158 Handle<Object> input); |
1162 | 1159 |
1163 // ES6 section 7.1.15 ToLength | 1160 // ES6 section 7.1.15 ToLength |
1164 MUST_USE_RESULT static MaybeHandle<Object> ToLength(Isolate* isolate, | 1161 MUST_USE_RESULT static MaybeHandle<Object> ToLength(Isolate* isolate, |
1165 Handle<Object> input); | 1162 Handle<Object> input); |
1166 | 1163 |
1167 // ES6 section 7.3.9 GetMethod | 1164 // ES6 section 7.3.9 GetMethod |
1168 MUST_USE_RESULT static MaybeHandle<Object> GetMethod( | 1165 MUST_USE_RESULT static MaybeHandle<Object> GetMethod( |
1169 Handle<JSReceiver> receiver, Handle<Name> name); | 1166 Handle<JSReceiver> receiver, Handle<Name> name); |
1170 | 1167 |
1171 // ES6 section 7.3.17 CreateListFromArrayLike | |
1172 MUST_USE_RESULT static MaybeHandle<FixedArray> CreateListFromArrayLike( | |
1173 Isolate* isolate, Handle<Object> object, ElementTypes element_types); | |
1174 | |
1175 // Check whether |object| is an instance of Error or NativeError. | 1168 // Check whether |object| is an instance of Error or NativeError. |
1176 static bool IsErrorObject(Isolate* isolate, Handle<Object> object); | 1169 static bool IsErrorObject(Isolate* isolate, Handle<Object> object); |
1177 | 1170 |
1178 // ES6 section 12.5.6 The typeof Operator | 1171 // ES6 section 12.5.6 The typeof Operator |
1179 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object); | 1172 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object); |
1180 | 1173 |
1181 // ES6 section 12.6 Multiplicative Operators | 1174 // ES6 section 12.6 Multiplicative Operators |
1182 MUST_USE_RESULT static MaybeHandle<Object> Multiply( | 1175 MUST_USE_RESULT static MaybeHandle<Object> Multiply( |
1183 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, | 1176 Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs, |
1184 Strength strength = Strength::WEAK); | 1177 Strength strength = Strength::WEAK); |
(...skipping 9525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10710 } | 10703 } |
10711 return value; | 10704 return value; |
10712 } | 10705 } |
10713 }; | 10706 }; |
10714 | 10707 |
10715 | 10708 |
10716 } // NOLINT, false-positive due to second-order macros. | 10709 } // NOLINT, false-positive due to second-order macros. |
10717 } // NOLINT, false-positive due to second-order macros. | 10710 } // NOLINT, false-positive due to second-order macros. |
10718 | 10711 |
10719 #endif // V8_OBJECTS_H_ | 10712 #endif // V8_OBJECTS_H_ |
OLD | NEW |