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