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