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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 6286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6297 // In case of duplicates, the latest descriptor is used. | 6297 // In case of duplicates, the latest descriptor is used. |
6298 static void AppendCallbackDescriptors(Handle<Map> map, | 6298 static void AppendCallbackDescriptors(Handle<Map> map, |
6299 Handle<Object> descriptors); | 6299 Handle<Object> descriptors); |
6300 | 6300 |
6301 static inline int SlackForArraySize(int old_size, int size_limit); | 6301 static inline int SlackForArraySize(int old_size, int size_limit); |
6302 | 6302 |
6303 static void EnsureDescriptorSlack(Handle<Map> map, int slack); | 6303 static void EnsureDescriptorSlack(Handle<Map> map, int slack); |
6304 | 6304 |
6305 Code* LookupInCodeCache(Name* name, Code::Flags code); | 6305 Code* LookupInCodeCache(Name* name, Code::Flags code); |
6306 | 6306 |
6307 static Handle<Map> GetObjectCreateMap(Handle<HeapObject> prototype); | |
6308 | |
6309 // Computes a hash value for this map, to be used in HashTables and such. | 6307 // Computes a hash value for this map, to be used in HashTables and such. |
6310 int Hash(); | 6308 int Hash(); |
6311 | 6309 |
6312 // Returns the transitioned map for this map with the most generic | 6310 // Returns the transitioned map for this map with the most generic |
6313 // elements_kind that's found in |candidates|, or |nullptr| if no match is | 6311 // elements_kind that's found in |candidates|, or |nullptr| if no match is |
6314 // found at all. | 6312 // found at all. |
6315 Map* FindElementsKindTransitionedMap(MapHandleList* candidates); | 6313 Map* FindElementsKindTransitionedMap(MapHandleList* candidates); |
6316 | 6314 |
6317 inline bool CanTransition(); | 6315 inline bool CanTransition(); |
6318 | 6316 |
6319 inline bool IsBooleanMap(); | 6317 inline bool IsBooleanMap(); |
6320 inline bool IsPrimitiveMap(); | 6318 inline bool IsPrimitiveMap(); |
6321 inline bool IsJSReceiverMap(); | 6319 inline bool IsJSReceiverMap(); |
6322 inline bool IsJSObjectMap(); | 6320 inline bool IsJSObjectMap(); |
6323 inline bool IsJSArrayMap(); | 6321 inline bool IsJSArrayMap(); |
6324 inline bool IsJSFunctionMap(); | 6322 inline bool IsJSFunctionMap(); |
6325 inline bool IsStringMap(); | 6323 inline bool IsStringMap(); |
6326 inline bool IsJSProxyMap(); | 6324 inline bool IsJSProxyMap(); |
6327 inline bool IsModuleMap(); | 6325 inline bool IsModuleMap(); |
6328 inline bool IsJSGlobalProxyMap(); | 6326 inline bool IsJSGlobalProxyMap(); |
6329 inline bool IsJSGlobalObjectMap(); | 6327 inline bool IsJSGlobalObjectMap(); |
6330 inline bool IsJSTypedArrayMap(); | 6328 inline bool IsJSTypedArrayMap(); |
6331 inline bool IsJSDataViewMap(); | 6329 inline bool IsJSDataViewMap(); |
6332 | 6330 |
6333 inline bool IsSpecialReceiverMap(); | |
6334 | |
6335 inline bool CanOmitMapChecks(); | 6331 inline bool CanOmitMapChecks(); |
6336 | 6332 |
6337 static void AddDependentCode(Handle<Map> map, | 6333 static void AddDependentCode(Handle<Map> map, |
6338 DependentCode::DependencyGroup group, | 6334 DependentCode::DependencyGroup group, |
6339 Handle<Code> code); | 6335 Handle<Code> code); |
6340 | 6336 |
6341 bool IsMapInArrayPrototypeChain(); | 6337 bool IsMapInArrayPrototypeChain(); |
6342 | 6338 |
6343 static Handle<WeakCell> WeakCellForMap(Handle<Map> map); | 6339 static Handle<WeakCell> WeakCellForMap(Handle<Map> map); |
6344 | 6340 |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7110 V(Math, imul, MathImul) \ | 7106 V(Math, imul, MathImul) \ |
7111 V(Math, clz32, MathClz32) \ | 7107 V(Math, clz32, MathClz32) \ |
7112 V(Math, fround, MathFround) \ | 7108 V(Math, fround, MathFround) \ |
7113 V(Math, trunc, MathTrunc) \ | 7109 V(Math, trunc, MathTrunc) \ |
7114 V(Number, isFinite, NumberIsFinite) \ | 7110 V(Number, isFinite, NumberIsFinite) \ |
7115 V(Number, isInteger, NumberIsInteger) \ | 7111 V(Number, isInteger, NumberIsInteger) \ |
7116 V(Number, isNaN, NumberIsNaN) \ | 7112 V(Number, isNaN, NumberIsNaN) \ |
7117 V(Number, isSafeInteger, NumberIsSafeInteger) \ | 7113 V(Number, isSafeInteger, NumberIsSafeInteger) \ |
7118 V(Number, parseFloat, NumberParseFloat) \ | 7114 V(Number, parseFloat, NumberParseFloat) \ |
7119 V(Number, parseInt, NumberParseInt) \ | 7115 V(Number, parseInt, NumberParseInt) \ |
7120 V(Number.prototype, toString, NumberToString) \ | 7116 V(Number.prototype, toString, NumberToString) |
7121 V(Object, create, ObjectCreate) | |
7122 | 7117 |
7123 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ | 7118 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ |
7124 V(Atomics, load, AtomicsLoad) \ | 7119 V(Atomics, load, AtomicsLoad) \ |
7125 V(Atomics, store, AtomicsStore) | 7120 V(Atomics, store, AtomicsStore) |
7126 | 7121 |
7127 enum BuiltinFunctionId { | 7122 enum BuiltinFunctionId { |
7128 kArrayCode, | 7123 kArrayCode, |
7129 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 7124 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
7130 k##name, | 7125 k##name, |
7131 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 7126 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
(...skipping 4606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11738 } | 11733 } |
11739 }; | 11734 }; |
11740 | 11735 |
11741 | 11736 |
11742 } // NOLINT, false-positive due to second-order macros. | 11737 } // NOLINT, false-positive due to second-order macros. |
11743 } // NOLINT, false-positive due to second-order macros. | 11738 } // NOLINT, false-positive due to second-order macros. |
11744 | 11739 |
11745 #include "src/objects/object-macros-undef.h" | 11740 #include "src/objects/object-macros-undef.h" |
11746 | 11741 |
11747 #endif // V8_OBJECTS_H_ | 11742 #endif // V8_OBJECTS_H_ |
OLD | NEW |