| 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 11452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11463 DECL_BOOLEAN_ACCESSORS(hidden_prototype) | 11463 DECL_BOOLEAN_ACCESSORS(hidden_prototype) |
| 11464 DECL_BOOLEAN_ACCESSORS(undetectable) | 11464 DECL_BOOLEAN_ACCESSORS(undetectable) |
| 11465 // If the bit is set, object instances created by this function | 11465 // If the bit is set, object instances created by this function |
| 11466 // requires access check. | 11466 // requires access check. |
| 11467 DECL_BOOLEAN_ACCESSORS(needs_access_check) | 11467 DECL_BOOLEAN_ACCESSORS(needs_access_check) |
| 11468 DECL_BOOLEAN_ACCESSORS(read_only_prototype) | 11468 DECL_BOOLEAN_ACCESSORS(read_only_prototype) |
| 11469 DECL_BOOLEAN_ACCESSORS(remove_prototype) | 11469 DECL_BOOLEAN_ACCESSORS(remove_prototype) |
| 11470 DECL_BOOLEAN_ACCESSORS(do_not_cache) | 11470 DECL_BOOLEAN_ACCESSORS(do_not_cache) |
| 11471 DECL_BOOLEAN_ACCESSORS(accept_any_receiver) | 11471 DECL_BOOLEAN_ACCESSORS(accept_any_receiver) |
| 11472 | 11472 |
| 11473 DECL_ACCESSORS(cached_property_name, Object) |
| 11474 |
| 11473 DECLARE_CAST(FunctionTemplateInfo) | 11475 DECLARE_CAST(FunctionTemplateInfo) |
| 11474 | 11476 |
| 11475 // Dispatched behavior. | 11477 // Dispatched behavior. |
| 11476 DECLARE_PRINTER(FunctionTemplateInfo) | 11478 DECLARE_PRINTER(FunctionTemplateInfo) |
| 11477 DECLARE_VERIFIER(FunctionTemplateInfo) | 11479 DECLARE_VERIFIER(FunctionTemplateInfo) |
| 11478 | 11480 |
| 11479 static const int kCallCodeOffset = TemplateInfo::kHeaderSize; | 11481 static const int kCallCodeOffset = TemplateInfo::kHeaderSize; |
| 11480 static const int kPrototypeTemplateOffset = | 11482 static const int kPrototypeTemplateOffset = |
| 11481 kCallCodeOffset + kPointerSize; | 11483 kCallCodeOffset + kPointerSize; |
| 11482 static const int kParentTemplateOffset = | 11484 static const int kParentTemplateOffset = |
| 11483 kPrototypeTemplateOffset + kPointerSize; | 11485 kPrototypeTemplateOffset + kPointerSize; |
| 11484 static const int kNamedPropertyHandlerOffset = | 11486 static const int kNamedPropertyHandlerOffset = |
| 11485 kParentTemplateOffset + kPointerSize; | 11487 kParentTemplateOffset + kPointerSize; |
| 11486 static const int kIndexedPropertyHandlerOffset = | 11488 static const int kIndexedPropertyHandlerOffset = |
| 11487 kNamedPropertyHandlerOffset + kPointerSize; | 11489 kNamedPropertyHandlerOffset + kPointerSize; |
| 11488 static const int kInstanceTemplateOffset = | 11490 static const int kInstanceTemplateOffset = |
| 11489 kIndexedPropertyHandlerOffset + kPointerSize; | 11491 kIndexedPropertyHandlerOffset + kPointerSize; |
| 11490 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; | 11492 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; |
| 11491 static const int kSignatureOffset = kClassNameOffset + kPointerSize; | 11493 static const int kSignatureOffset = kClassNameOffset + kPointerSize; |
| 11492 static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize; | 11494 static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize; |
| 11493 static const int kAccessCheckInfoOffset = | 11495 static const int kAccessCheckInfoOffset = |
| 11494 kInstanceCallHandlerOffset + kPointerSize; | 11496 kInstanceCallHandlerOffset + kPointerSize; |
| 11495 static const int kSharedFunctionInfoOffset = | 11497 static const int kSharedFunctionInfoOffset = |
| 11496 kAccessCheckInfoOffset + kPointerSize; | 11498 kAccessCheckInfoOffset + kPointerSize; |
| 11497 static const int kFlagOffset = kSharedFunctionInfoOffset + kPointerSize; | 11499 static const int kFlagOffset = kSharedFunctionInfoOffset + kPointerSize; |
| 11498 static const int kLengthOffset = kFlagOffset + kPointerSize; | 11500 static const int kLengthOffset = kFlagOffset + kPointerSize; |
| 11499 static const int kSize = kLengthOffset + kPointerSize; | 11501 static const int kCachedPropertyNameOffset = kLengthOffset + kPointerSize; |
| 11502 static const int kSize = kCachedPropertyNameOffset + kPointerSize; |
| 11500 | 11503 |
| 11501 static Handle<SharedFunctionInfo> GetOrCreateSharedFunctionInfo( | 11504 static Handle<SharedFunctionInfo> GetOrCreateSharedFunctionInfo( |
| 11502 Isolate* isolate, Handle<FunctionTemplateInfo> info); | 11505 Isolate* isolate, Handle<FunctionTemplateInfo> info); |
| 11503 // Returns parent function template or null. | 11506 // Returns parent function template or null. |
| 11504 inline FunctionTemplateInfo* GetParent(Isolate* isolate); | 11507 inline FunctionTemplateInfo* GetParent(Isolate* isolate); |
| 11505 // Returns true if |object| is an instance of this function template. | 11508 // Returns true if |object| is an instance of this function template. |
| 11506 inline bool IsTemplateFor(JSObject* object); | 11509 inline bool IsTemplateFor(JSObject* object); |
| 11507 bool IsTemplateFor(Map* map); | 11510 bool IsTemplateFor(Map* map); |
| 11508 inline bool instantiated(); | 11511 inline bool instantiated(); |
| 11509 | 11512 |
| 11513 // Helper function for cached accessors. |
| 11514 static MaybeHandle<Name> TryGetCachedPropertyName(Isolate* isolate, |
| 11515 Handle<Object> getter); |
| 11516 |
| 11510 private: | 11517 private: |
| 11511 // Bit position in the flag, from least significant bit position. | 11518 // Bit position in the flag, from least significant bit position. |
| 11512 static const int kHiddenPrototypeBit = 0; | 11519 static const int kHiddenPrototypeBit = 0; |
| 11513 static const int kUndetectableBit = 1; | 11520 static const int kUndetectableBit = 1; |
| 11514 static const int kNeedsAccessCheckBit = 2; | 11521 static const int kNeedsAccessCheckBit = 2; |
| 11515 static const int kReadOnlyPrototypeBit = 3; | 11522 static const int kReadOnlyPrototypeBit = 3; |
| 11516 static const int kRemovePrototypeBit = 4; | 11523 static const int kRemovePrototypeBit = 4; |
| 11517 static const int kDoNotCacheBit = 5; | 11524 static const int kDoNotCacheBit = 5; |
| 11518 static const int kAcceptAnyReceiver = 6; | 11525 static const int kAcceptAnyReceiver = 6; |
| 11519 | 11526 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11767 } | 11774 } |
| 11768 return value; | 11775 return value; |
| 11769 } | 11776 } |
| 11770 }; | 11777 }; |
| 11771 | 11778 |
| 11772 | 11779 |
| 11773 } // NOLINT, false-positive due to second-order macros. | 11780 } // NOLINT, false-positive due to second-order macros. |
| 11774 } // NOLINT, false-positive due to second-order macros. | 11781 } // NOLINT, false-positive due to second-order macros. |
| 11775 | 11782 |
| 11776 #endif // V8_OBJECTS_H_ | 11783 #endif // V8_OBJECTS_H_ |
| OLD | NEW |