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 6269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6280 // In case of duplicates, the latest descriptor is used. | 6280 // In case of duplicates, the latest descriptor is used. |
6281 static void AppendCallbackDescriptors(Handle<Map> map, | 6281 static void AppendCallbackDescriptors(Handle<Map> map, |
6282 Handle<Object> descriptors); | 6282 Handle<Object> descriptors); |
6283 | 6283 |
6284 static inline int SlackForArraySize(int old_size, int size_limit); | 6284 static inline int SlackForArraySize(int old_size, int size_limit); |
6285 | 6285 |
6286 static void EnsureDescriptorSlack(Handle<Map> map, int slack); | 6286 static void EnsureDescriptorSlack(Handle<Map> map, int slack); |
6287 | 6287 |
6288 Code* LookupInCodeCache(Name* name, Code::Flags code); | 6288 Code* LookupInCodeCache(Name* name, Code::Flags code); |
6289 | 6289 |
| 6290 static Handle<Map> GetObjectCreateMap(Handle<HeapObject> prototype); |
| 6291 |
6290 // Computes a hash value for this map, to be used in HashTables and such. | 6292 // Computes a hash value for this map, to be used in HashTables and such. |
6291 int Hash(); | 6293 int Hash(); |
6292 | 6294 |
6293 // Returns the transitioned map for this map with the most generic | 6295 // Returns the transitioned map for this map with the most generic |
6294 // elements_kind that's found in |candidates|, or |nullptr| if no match is | 6296 // elements_kind that's found in |candidates|, or |nullptr| if no match is |
6295 // found at all. | 6297 // found at all. |
6296 Map* FindElementsKindTransitionedMap(MapHandleList* candidates); | 6298 Map* FindElementsKindTransitionedMap(MapHandleList* candidates); |
6297 | 6299 |
6298 inline bool CanTransition(); | 6300 inline bool CanTransition(); |
6299 | 6301 |
6300 inline bool IsBooleanMap(); | 6302 inline bool IsBooleanMap(); |
6301 inline bool IsPrimitiveMap(); | 6303 inline bool IsPrimitiveMap(); |
6302 inline bool IsJSReceiverMap(); | 6304 inline bool IsJSReceiverMap(); |
6303 inline bool IsJSObjectMap(); | 6305 inline bool IsJSObjectMap(); |
6304 inline bool IsJSArrayMap(); | 6306 inline bool IsJSArrayMap(); |
6305 inline bool IsJSFunctionMap(); | 6307 inline bool IsJSFunctionMap(); |
6306 inline bool IsStringMap(); | 6308 inline bool IsStringMap(); |
6307 inline bool IsJSProxyMap(); | 6309 inline bool IsJSProxyMap(); |
6308 inline bool IsModuleMap(); | 6310 inline bool IsModuleMap(); |
6309 inline bool IsJSGlobalProxyMap(); | 6311 inline bool IsJSGlobalProxyMap(); |
6310 inline bool IsJSGlobalObjectMap(); | 6312 inline bool IsJSGlobalObjectMap(); |
6311 inline bool IsJSTypedArrayMap(); | 6313 inline bool IsJSTypedArrayMap(); |
6312 inline bool IsJSDataViewMap(); | 6314 inline bool IsJSDataViewMap(); |
6313 | 6315 |
| 6316 inline bool IsSpecialReceiverMap(); |
| 6317 |
6314 inline bool CanOmitMapChecks(); | 6318 inline bool CanOmitMapChecks(); |
6315 | 6319 |
6316 static void AddDependentCode(Handle<Map> map, | 6320 static void AddDependentCode(Handle<Map> map, |
6317 DependentCode::DependencyGroup group, | 6321 DependentCode::DependencyGroup group, |
6318 Handle<Code> code); | 6322 Handle<Code> code); |
6319 | 6323 |
6320 bool IsMapInArrayPrototypeChain(); | 6324 bool IsMapInArrayPrototypeChain(); |
6321 | 6325 |
6322 static Handle<WeakCell> WeakCellForMap(Handle<Map> map); | 6326 static Handle<WeakCell> WeakCellForMap(Handle<Map> map); |
6323 | 6327 |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7087 V(Math, imul, MathImul) \ | 7091 V(Math, imul, MathImul) \ |
7088 V(Math, clz32, MathClz32) \ | 7092 V(Math, clz32, MathClz32) \ |
7089 V(Math, fround, MathFround) \ | 7093 V(Math, fround, MathFround) \ |
7090 V(Math, trunc, MathTrunc) \ | 7094 V(Math, trunc, MathTrunc) \ |
7091 V(Number, isFinite, NumberIsFinite) \ | 7095 V(Number, isFinite, NumberIsFinite) \ |
7092 V(Number, isInteger, NumberIsInteger) \ | 7096 V(Number, isInteger, NumberIsInteger) \ |
7093 V(Number, isNaN, NumberIsNaN) \ | 7097 V(Number, isNaN, NumberIsNaN) \ |
7094 V(Number, isSafeInteger, NumberIsSafeInteger) \ | 7098 V(Number, isSafeInteger, NumberIsSafeInteger) \ |
7095 V(Number, parseFloat, NumberParseFloat) \ | 7099 V(Number, parseFloat, NumberParseFloat) \ |
7096 V(Number, parseInt, NumberParseInt) \ | 7100 V(Number, parseInt, NumberParseInt) \ |
7097 V(Number.prototype, toString, NumberToString) | 7101 V(Number.prototype, toString, NumberToString) \ |
| 7102 V(Object, create, ObjectCreate) |
7098 | 7103 |
7099 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ | 7104 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ |
7100 V(Atomics, load, AtomicsLoad) \ | 7105 V(Atomics, load, AtomicsLoad) \ |
7101 V(Atomics, store, AtomicsStore) | 7106 V(Atomics, store, AtomicsStore) |
7102 | 7107 |
7103 enum BuiltinFunctionId { | 7108 enum BuiltinFunctionId { |
7104 kArrayCode, | 7109 kArrayCode, |
7105 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 7110 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
7106 k##name, | 7111 k##name, |
7107 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 7112 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
(...skipping 4592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11700 } | 11705 } |
11701 }; | 11706 }; |
11702 | 11707 |
11703 | 11708 |
11704 } // NOLINT, false-positive due to second-order macros. | 11709 } // NOLINT, false-positive due to second-order macros. |
11705 } // NOLINT, false-positive due to second-order macros. | 11710 } // NOLINT, false-positive due to second-order macros. |
11706 | 11711 |
11707 #include "src/objects/object-macros-undef.h" | 11712 #include "src/objects/object-macros-undef.h" |
11708 | 11713 |
11709 #endif // V8_OBJECTS_H_ | 11714 #endif // V8_OBJECTS_H_ |
OLD | NEW |