| 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 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2382 // Called the first time an object is observed with ES7 Object.observe. | 2382 // Called the first time an object is observed with ES7 Object.observe. |
| 2383 static void SetObserved(Handle<JSObject> object); | 2383 static void SetObserved(Handle<JSObject> object); |
| 2384 | 2384 |
| 2385 // Copy object. | 2385 // Copy object. |
| 2386 enum DeepCopyHints { kNoHints = 0, kObjectIsShallow = 1 }; | 2386 enum DeepCopyHints { kNoHints = 0, kObjectIsShallow = 1 }; |
| 2387 | 2387 |
| 2388 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( | 2388 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( |
| 2389 Handle<JSObject> object, | 2389 Handle<JSObject> object, |
| 2390 AllocationSiteUsageContext* site_context, | 2390 AllocationSiteUsageContext* site_context, |
| 2391 DeepCopyHints hints = kNoHints); | 2391 DeepCopyHints hints = kNoHints); |
| 2392 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( | |
| 2393 Handle<JSObject> object, DeepCopyHints hints = kNoHints); | |
| 2394 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( | 2392 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( |
| 2395 Handle<JSObject> object, | 2393 Handle<JSObject> object, |
| 2396 AllocationSiteCreationContext* site_context); | 2394 AllocationSiteCreationContext* site_context); |
| 2397 | 2395 |
| 2398 DECLARE_CAST(JSObject) | 2396 DECLARE_CAST(JSObject) |
| 2399 | 2397 |
| 2400 // Dispatched behavior. | 2398 // Dispatched behavior. |
| 2401 void JSObjectShortPrint(StringStream* accumulator); | 2399 void JSObjectShortPrint(StringStream* accumulator); |
| 2402 DECLARE_PRINTER(JSObject) | 2400 DECLARE_PRINTER(JSObject) |
| 2403 DECLARE_VERIFIER(JSObject) | 2401 DECLARE_VERIFIER(JSObject) |
| (...skipping 8058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10462 static const int kSize = kFastHandlerOffset + kPointerSize; | 10460 static const int kSize = kFastHandlerOffset + kPointerSize; |
| 10463 | 10461 |
| 10464 private: | 10462 private: |
| 10465 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); | 10463 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); |
| 10466 }; | 10464 }; |
| 10467 | 10465 |
| 10468 | 10466 |
| 10469 class TemplateInfo: public Struct { | 10467 class TemplateInfo: public Struct { |
| 10470 public: | 10468 public: |
| 10471 DECL_ACCESSORS(tag, Object) | 10469 DECL_ACCESSORS(tag, Object) |
| 10472 DECL_ACCESSORS(serial_number, Object) | 10470 inline int number_of_properties() const; |
| 10473 DECL_INT_ACCESSORS(number_of_properties) | 10471 inline void set_number_of_properties(int value); |
| 10474 DECL_ACCESSORS(property_list, Object) | 10472 DECL_ACCESSORS(property_list, Object) |
| 10475 DECL_ACCESSORS(property_accessors, Object) | 10473 DECL_ACCESSORS(property_accessors, Object) |
| 10476 | 10474 |
| 10477 DECLARE_VERIFIER(TemplateInfo) | 10475 DECLARE_VERIFIER(TemplateInfo) |
| 10478 | 10476 |
| 10479 static const int kTagOffset = HeapObject::kHeaderSize; | 10477 static const int kTagOffset = HeapObject::kHeaderSize; |
| 10480 static const int kSerialNumberOffset = kTagOffset + kPointerSize; | 10478 static const int kNumberOfProperties = kTagOffset + kPointerSize; |
| 10481 static const int kNumberOfProperties = kSerialNumberOffset + kPointerSize; | |
| 10482 static const int kPropertyListOffset = kNumberOfProperties + kPointerSize; | 10479 static const int kPropertyListOffset = kNumberOfProperties + kPointerSize; |
| 10483 static const int kPropertyAccessorsOffset = | 10480 static const int kPropertyAccessorsOffset = |
| 10484 kPropertyListOffset + kPointerSize; | 10481 kPropertyListOffset + kPointerSize; |
| 10485 static const int kPropertyIntrinsicsOffset = | 10482 static const int kPropertyIntrinsicsOffset = |
| 10486 kPropertyAccessorsOffset + kPointerSize; | 10483 kPropertyAccessorsOffset + kPointerSize; |
| 10487 static const int kHeaderSize = kPropertyIntrinsicsOffset + kPointerSize; | 10484 static const int kHeaderSize = kPropertyIntrinsicsOffset + kPointerSize; |
| 10488 | 10485 |
| 10489 private: | 10486 private: |
| 10490 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); | 10487 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); |
| 10491 }; | 10488 }; |
| 10492 | 10489 |
| 10493 | 10490 |
| 10494 class FunctionTemplateInfo: public TemplateInfo { | 10491 class FunctionTemplateInfo: public TemplateInfo { |
| 10495 public: | 10492 public: |
| 10493 DECL_ACCESSORS(serial_number, Object) |
| 10496 DECL_ACCESSORS(call_code, Object) | 10494 DECL_ACCESSORS(call_code, Object) |
| 10497 DECL_ACCESSORS(prototype_template, Object) | 10495 DECL_ACCESSORS(prototype_template, Object) |
| 10498 DECL_ACCESSORS(parent_template, Object) | 10496 DECL_ACCESSORS(parent_template, Object) |
| 10499 DECL_ACCESSORS(named_property_handler, Object) | 10497 DECL_ACCESSORS(named_property_handler, Object) |
| 10500 DECL_ACCESSORS(indexed_property_handler, Object) | 10498 DECL_ACCESSORS(indexed_property_handler, Object) |
| 10501 DECL_ACCESSORS(instance_template, Object) | 10499 DECL_ACCESSORS(instance_template, Object) |
| 10502 DECL_ACCESSORS(class_name, Object) | 10500 DECL_ACCESSORS(class_name, Object) |
| 10503 DECL_ACCESSORS(signature, Object) | 10501 DECL_ACCESSORS(signature, Object) |
| 10504 DECL_ACCESSORS(instance_call_handler, Object) | 10502 DECL_ACCESSORS(instance_call_handler, Object) |
| 10505 DECL_ACCESSORS(access_check_info, Object) | 10503 DECL_ACCESSORS(access_check_info, Object) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 10519 DECL_BOOLEAN_ACCESSORS(do_not_cache) | 10517 DECL_BOOLEAN_ACCESSORS(do_not_cache) |
| 10520 DECL_BOOLEAN_ACCESSORS(instantiated) | 10518 DECL_BOOLEAN_ACCESSORS(instantiated) |
| 10521 DECL_BOOLEAN_ACCESSORS(accept_any_receiver) | 10519 DECL_BOOLEAN_ACCESSORS(accept_any_receiver) |
| 10522 | 10520 |
| 10523 DECLARE_CAST(FunctionTemplateInfo) | 10521 DECLARE_CAST(FunctionTemplateInfo) |
| 10524 | 10522 |
| 10525 // Dispatched behavior. | 10523 // Dispatched behavior. |
| 10526 DECLARE_PRINTER(FunctionTemplateInfo) | 10524 DECLARE_PRINTER(FunctionTemplateInfo) |
| 10527 DECLARE_VERIFIER(FunctionTemplateInfo) | 10525 DECLARE_VERIFIER(FunctionTemplateInfo) |
| 10528 | 10526 |
| 10529 static const int kCallCodeOffset = TemplateInfo::kHeaderSize; | 10527 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; |
| 10528 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; |
| 10530 static const int kPrototypeTemplateOffset = | 10529 static const int kPrototypeTemplateOffset = |
| 10531 kCallCodeOffset + kPointerSize; | 10530 kCallCodeOffset + kPointerSize; |
| 10532 static const int kParentTemplateOffset = | 10531 static const int kParentTemplateOffset = |
| 10533 kPrototypeTemplateOffset + kPointerSize; | 10532 kPrototypeTemplateOffset + kPointerSize; |
| 10534 static const int kNamedPropertyHandlerOffset = | 10533 static const int kNamedPropertyHandlerOffset = |
| 10535 kParentTemplateOffset + kPointerSize; | 10534 kParentTemplateOffset + kPointerSize; |
| 10536 static const int kIndexedPropertyHandlerOffset = | 10535 static const int kIndexedPropertyHandlerOffset = |
| 10537 kNamedPropertyHandlerOffset + kPointerSize; | 10536 kNamedPropertyHandlerOffset + kPointerSize; |
| 10538 static const int kInstanceTemplateOffset = | 10537 static const int kInstanceTemplateOffset = |
| 10539 kIndexedPropertyHandlerOffset + kPointerSize; | 10538 kIndexedPropertyHandlerOffset + kPointerSize; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10804 } | 10803 } |
| 10805 return value; | 10804 return value; |
| 10806 } | 10805 } |
| 10807 }; | 10806 }; |
| 10808 | 10807 |
| 10809 | 10808 |
| 10810 } // NOLINT, false-positive due to second-order macros. | 10809 } // NOLINT, false-positive due to second-order macros. |
| 10811 } // NOLINT, false-positive due to second-order macros. | 10810 } // NOLINT, false-positive due to second-order macros. |
| 10812 | 10811 |
| 10813 #endif // V8_OBJECTS_H_ | 10812 #endif // V8_OBJECTS_H_ |
| OLD | NEW |