Chromium Code Reviews| 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1002 V(ObjectHashTable) \ | 1002 V(ObjectHashTable) \ |
| 1003 V(WeakHashTable) \ | 1003 V(WeakHashTable) \ |
| 1004 V(OrderedHashTable) | 1004 V(OrderedHashTable) |
| 1005 | 1005 |
| 1006 // Object is the abstract superclass for all classes in the | 1006 // Object is the abstract superclass for all classes in the |
| 1007 // object hierarchy. | 1007 // object hierarchy. |
| 1008 // Object does not use any virtual functions to avoid the | 1008 // Object does not use any virtual functions to avoid the |
| 1009 // allocation of the C++ vtable. | 1009 // allocation of the C++ vtable. |
| 1010 // Since both Smi and HeapObject are subclasses of Object no | 1010 // Since both Smi and HeapObject are subclasses of Object no |
| 1011 // data members can be present in Object. | 1011 // data members can be present in Object. |
| 1012 class Object { | 1012 class Object { /* POSTMORTEM */ |
| 1013 public: | 1013 public: |
| 1014 // Type testing. | 1014 // Type testing. |
| 1015 bool IsObject() const { return true; } | 1015 bool IsObject() const { return true; } |
| 1016 | 1016 |
| 1017 #define IS_TYPE_FUNCTION_DECL(type_) INLINE(bool Is##type_() const); | 1017 #define IS_TYPE_FUNCTION_DECL(type_) INLINE(bool Is##type_() const); |
| 1018 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 1018 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| 1019 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) | 1019 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) |
| 1020 #undef IS_TYPE_FUNCTION_DECL | 1020 #undef IS_TYPE_FUNCTION_DECL |
| 1021 | 1021 |
| 1022 // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas | 1022 // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1411 | 1411 |
| 1412 std::ostream& operator<<(std::ostream& os, const Brief& v); | 1412 std::ostream& operator<<(std::ostream& os, const Brief& v); |
| 1413 | 1413 |
| 1414 | 1414 |
| 1415 // Smi represents integer Numbers that can be stored in 31 bits. | 1415 // Smi represents integer Numbers that can be stored in 31 bits. |
| 1416 // Smis are immediate which means they are NOT allocated in the heap. | 1416 // Smis are immediate which means they are NOT allocated in the heap. |
| 1417 // The this pointer has the following format: [31 bit signed int] 0 | 1417 // The this pointer has the following format: [31 bit signed int] 0 |
| 1418 // For long smis it has the following format: | 1418 // For long smis it has the following format: |
| 1419 // [32 bit signed int] [31 bits zero padding] 0 | 1419 // [32 bit signed int] [31 bits zero padding] 0 |
| 1420 // Smi stands for small integer. | 1420 // Smi stands for small integer. |
| 1421 class Smi: public Object { | 1421 class Smi: public Object { /* POSTMORTEM */ |
| 1422 public: | 1422 public: |
| 1423 // Returns the integer value. | 1423 // Returns the integer value. |
| 1424 inline int value() const { return Internals::SmiValue(this); } | 1424 inline int value() const { return Internals::SmiValue(this); } |
| 1425 | 1425 |
| 1426 // Convert a value to a Smi object. | 1426 // Convert a value to a Smi object. |
| 1427 static inline Smi* FromInt(int value) { | 1427 static inline Smi* FromInt(int value) { |
| 1428 DCHECK(Smi::IsValid(value)); | 1428 DCHECK(Smi::IsValid(value)); |
| 1429 return reinterpret_cast<Smi*>(Internals::IntToSmi(value)); | 1429 return reinterpret_cast<Smi*>(Internals::IntToSmi(value)); |
| 1430 } | 1430 } |
| 1431 | 1431 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1506 | 1506 |
| 1507 // The content of an heap object (except for the map pointer). kTaggedValues | 1507 // The content of an heap object (except for the map pointer). kTaggedValues |
| 1508 // objects can contain both heap pointers and Smis, kMixedValues can contain | 1508 // objects can contain both heap pointers and Smis, kMixedValues can contain |
| 1509 // heap pointers, Smis, and raw values (e.g. doubles or strings), and kRawValues | 1509 // heap pointers, Smis, and raw values (e.g. doubles or strings), and kRawValues |
| 1510 // objects can contain raw values and Smis. | 1510 // objects can contain raw values and Smis. |
| 1511 enum class HeapObjectContents { kTaggedValues, kMixedValues, kRawValues }; | 1511 enum class HeapObjectContents { kTaggedValues, kMixedValues, kRawValues }; |
| 1512 | 1512 |
| 1513 | 1513 |
| 1514 // HeapObject is the superclass for all classes describing heap allocated | 1514 // HeapObject is the superclass for all classes describing heap allocated |
| 1515 // objects. | 1515 // objects. |
| 1516 class HeapObject: public Object { | 1516 class HeapObject: public Object { /* POSTMORTEM */ |
| 1517 public: | 1517 public: |
| 1518 // [map]: Contains a map which contains the object's reflective | 1518 // [map]: Contains a map which contains the object's reflective |
| 1519 // information. | 1519 // information. |
| 1520 inline Map* map() const; | 1520 inline Map* map() const; |
| 1521 inline void set_map(Map* value); | 1521 inline void set_map(Map* value); |
| 1522 // The no-write-barrier version. This is OK if the object is white and in | 1522 // The no-write-barrier version. This is OK if the object is white and in |
| 1523 // new space, or if the value is an immortal immutable object, like the maps | 1523 // new space, or if the value is an immortal immutable object, like the maps |
| 1524 // of primitive (non-JS) objects like strings, heap numbers etc. | 1524 // of primitive (non-JS) objects like strings, heap numbers etc. |
| 1525 inline void set_map_no_write_barrier(Map* value); | 1525 inline void set_map_no_write_barrier(Map* value); |
| 1526 | 1526 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1631 inline void IteratePointer(ObjectVisitor* v, int offset); | 1631 inline void IteratePointer(ObjectVisitor* v, int offset); |
| 1632 // as above, for the next code link of a code object. | 1632 // as above, for the next code link of a code object. |
| 1633 inline void IterateNextCodeLink(ObjectVisitor* v, int offset); | 1633 inline void IterateNextCodeLink(ObjectVisitor* v, int offset); |
| 1634 | 1634 |
| 1635 private: | 1635 private: |
| 1636 DISALLOW_IMPLICIT_CONSTRUCTORS(HeapObject); | 1636 DISALLOW_IMPLICIT_CONSTRUCTORS(HeapObject); |
| 1637 }; | 1637 }; |
| 1638 | 1638 |
| 1639 | 1639 |
| 1640 // This is the base class for object's body descriptors. | 1640 // This is the base class for object's body descriptors. |
| 1641 class BodyDescriptorBase { | 1641 class BodyDescriptorBase { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:12
really?
| |
| 1642 protected: | 1642 protected: |
| 1643 static inline void IterateBodyImpl(HeapObject* obj, int start_offset, | 1643 static inline void IterateBodyImpl(HeapObject* obj, int start_offset, |
| 1644 int end_offset, ObjectVisitor* v); | 1644 int end_offset, ObjectVisitor* v); |
| 1645 | 1645 |
| 1646 template <typename StaticVisitor> | 1646 template <typename StaticVisitor> |
| 1647 static inline void IterateBodyImpl(HeapObject* obj, int start_offset, | 1647 static inline void IterateBodyImpl(HeapObject* obj, int start_offset, |
| 1648 int end_offset); | 1648 int end_offset); |
| 1649 }; | 1649 }; |
| 1650 | 1650 |
| 1651 | 1651 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1695 // interval. The size of the object is taken from the map. | 1695 // interval. The size of the object is taken from the map. |
| 1696 template <int start_offset> | 1696 template <int start_offset> |
| 1697 class FlexibleBodyDescriptor : public FlexibleBodyDescriptorBase<start_offset> { | 1697 class FlexibleBodyDescriptor : public FlexibleBodyDescriptorBase<start_offset> { |
| 1698 public: | 1698 public: |
| 1699 static inline int SizeOf(Map* map, HeapObject* object); | 1699 static inline int SizeOf(Map* map, HeapObject* object); |
| 1700 }; | 1700 }; |
| 1701 | 1701 |
| 1702 | 1702 |
| 1703 // The HeapNumber class describes heap allocated numbers that cannot be | 1703 // The HeapNumber class describes heap allocated numbers that cannot be |
| 1704 // represented in a Smi (small integer) | 1704 // represented in a Smi (small integer) |
| 1705 class HeapNumber: public HeapObject { | 1705 class HeapNumber: public HeapObject { /* POSTMORTEM */ |
| 1706 public: | 1706 public: |
| 1707 // [value]: number value. | 1707 // [value]: number value. |
| 1708 inline double value() const; | 1708 inline double value() const; |
| 1709 inline void set_value(double value); | 1709 inline void set_value(double value); |
| 1710 | 1710 |
| 1711 DECLARE_CAST(HeapNumber) | 1711 DECLARE_CAST(HeapNumber) |
| 1712 | 1712 |
| 1713 // Dispatched behavior. | 1713 // Dispatched behavior. |
| 1714 bool HeapNumberBooleanValue(); | 1714 bool HeapNumberBooleanValue(); |
| 1715 | 1715 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1832 | 1832 |
| 1833 | 1833 |
| 1834 enum KeyFilter { SKIP_SYMBOLS, INCLUDE_SYMBOLS }; | 1834 enum KeyFilter { SKIP_SYMBOLS, INCLUDE_SYMBOLS }; |
| 1835 | 1835 |
| 1836 | 1836 |
| 1837 enum GetKeysConversion { KEEP_NUMBERS, CONVERT_TO_STRING }; | 1837 enum GetKeysConversion { KEEP_NUMBERS, CONVERT_TO_STRING }; |
| 1838 | 1838 |
| 1839 | 1839 |
| 1840 // JSReceiver includes types on which properties can be defined, i.e., | 1840 // JSReceiver includes types on which properties can be defined, i.e., |
| 1841 // JSObject and JSProxy. | 1841 // JSObject and JSProxy. |
| 1842 class JSReceiver: public HeapObject { | 1842 class JSReceiver: public HeapObject { /* POSTMORTEM */ |
| 1843 public: | 1843 public: |
| 1844 DECLARE_CAST(JSReceiver) | 1844 DECLARE_CAST(JSReceiver) |
| 1845 | 1845 |
| 1846 // ES6 section 7.1.1 ToPrimitive | 1846 // ES6 section 7.1.1 ToPrimitive |
| 1847 MUST_USE_RESULT static MaybeHandle<Object> ToPrimitive( | 1847 MUST_USE_RESULT static MaybeHandle<Object> ToPrimitive( |
| 1848 Handle<JSReceiver> receiver, | 1848 Handle<JSReceiver> receiver, |
| 1849 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); | 1849 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); |
| 1850 MUST_USE_RESULT static MaybeHandle<Object> OrdinaryToPrimitive( | 1850 MUST_USE_RESULT static MaybeHandle<Object> OrdinaryToPrimitive( |
| 1851 Handle<JSReceiver> receiver, OrdinaryToPrimitiveHint hint); | 1851 Handle<JSReceiver> receiver, OrdinaryToPrimitiveHint hint); |
| 1852 | 1852 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1963 | 1963 |
| 1964 private: | 1964 private: |
| 1965 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); | 1965 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); |
| 1966 }; | 1966 }; |
| 1967 | 1967 |
| 1968 | 1968 |
| 1969 // The JSObject describes real heap allocated JavaScript objects with | 1969 // The JSObject describes real heap allocated JavaScript objects with |
| 1970 // properties. | 1970 // properties. |
| 1971 // Note that the map of JSObject changes during execution to enable inline | 1971 // Note that the map of JSObject changes during execution to enable inline |
| 1972 // caching. | 1972 // caching. |
| 1973 class JSObject: public JSReceiver { | 1973 class JSObject: public JSReceiver { /* POSTMORTEM */ |
| 1974 public: | 1974 public: |
| 1975 // [properties]: Backing storage for properties. | 1975 // [properties]: Backing storage for properties. |
| 1976 // properties is a FixedArray in the fast case and a Dictionary in the | 1976 // properties is a FixedArray in the fast case and a Dictionary in the |
| 1977 // slow case. | 1977 // slow case. |
| 1978 DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties. | 1978 DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties. |
| 1979 inline void initialize_properties(); | 1979 inline void initialize_properties(); |
| 1980 inline bool HasFastProperties(); | 1980 inline bool HasFastProperties(); |
| 1981 // Gets slow properties for non-global objects. | 1981 // Gets slow properties for non-global objects. |
| 1982 inline NameDictionary* property_dictionary(); | 1982 inline NameDictionary* property_dictionary(); |
| 1983 // Gets global object properties. | 1983 // Gets global object properties. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2133 PropertyAttributes attributes); | 2133 PropertyAttributes attributes); |
| 2134 | 2134 |
| 2135 static void OptimizeAsPrototype(Handle<JSObject> object, | 2135 static void OptimizeAsPrototype(Handle<JSObject> object, |
| 2136 PrototypeOptimizationMode mode); | 2136 PrototypeOptimizationMode mode); |
| 2137 static void ReoptimizeIfPrototype(Handle<JSObject> object); | 2137 static void ReoptimizeIfPrototype(Handle<JSObject> object); |
| 2138 static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate); | 2138 static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate); |
| 2139 static bool UnregisterPrototypeUser(Handle<Map> user, Isolate* isolate); | 2139 static bool UnregisterPrototypeUser(Handle<Map> user, Isolate* isolate); |
| 2140 static void InvalidatePrototypeChains(Map* map); | 2140 static void InvalidatePrototypeChains(Map* map); |
| 2141 | 2141 |
| 2142 // Alternative implementation of WeakFixedArray::NullCallback. | 2142 // Alternative implementation of WeakFixedArray::NullCallback. |
| 2143 class PrototypeRegistryCompactionCallback { | 2143 class PrototypeRegistryCompactionCallback { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:12
really?
| |
| 2144 public: | 2144 public: |
| 2145 static void Callback(Object* value, int old_index, int new_index); | 2145 static void Callback(Object* value, int old_index, int new_index); |
| 2146 }; | 2146 }; |
| 2147 | 2147 |
| 2148 // Retrieve interceptors. | 2148 // Retrieve interceptors. |
| 2149 InterceptorInfo* GetNamedInterceptor(); | 2149 InterceptorInfo* GetNamedInterceptor(); |
| 2150 InterceptorInfo* GetIndexedInterceptor(); | 2150 InterceptorInfo* GetIndexedInterceptor(); |
| 2151 | 2151 |
| 2152 // Used from JSReceiver. | 2152 // Used from JSReceiver. |
| 2153 MUST_USE_RESULT static Maybe<PropertyAttributes> | 2153 MUST_USE_RESULT static Maybe<PropertyAttributes> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2428 | 2428 |
| 2429 static void PrintElementsTransition( | 2429 static void PrintElementsTransition( |
| 2430 FILE* file, Handle<JSObject> object, | 2430 FILE* file, Handle<JSObject> object, |
| 2431 ElementsKind from_kind, Handle<FixedArrayBase> from_elements, | 2431 ElementsKind from_kind, Handle<FixedArrayBase> from_elements, |
| 2432 ElementsKind to_kind, Handle<FixedArrayBase> to_elements); | 2432 ElementsKind to_kind, Handle<FixedArrayBase> to_elements); |
| 2433 | 2433 |
| 2434 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map); | 2434 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map); |
| 2435 | 2435 |
| 2436 #ifdef DEBUG | 2436 #ifdef DEBUG |
| 2437 // Structure for collecting spill information about JSObjects. | 2437 // Structure for collecting spill information about JSObjects. |
| 2438 class SpillInformation { | 2438 class SpillInformation { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:12
really?
| |
| 2439 public: | 2439 public: |
| 2440 void Clear(); | 2440 void Clear(); |
| 2441 void Print(); | 2441 void Print(); |
| 2442 int number_of_objects_; | 2442 int number_of_objects_; |
| 2443 int number_of_objects_with_fast_properties_; | 2443 int number_of_objects_with_fast_properties_; |
| 2444 int number_of_objects_with_fast_elements_; | 2444 int number_of_objects_with_fast_elements_; |
| 2445 int number_of_fast_used_fields_; | 2445 int number_of_fast_used_fields_; |
| 2446 int number_of_fast_unused_fields_; | 2446 int number_of_fast_unused_fields_; |
| 2447 int number_of_slow_used_properties_; | 2447 int number_of_slow_used_properties_; |
| 2448 int number_of_slow_unused_properties_; | 2448 int number_of_slow_unused_properties_; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2579 MUST_USE_RESULT static Maybe<bool> SetPrototypeUnobserved( | 2579 MUST_USE_RESULT static Maybe<bool> SetPrototypeUnobserved( |
| 2580 Handle<JSObject> object, Handle<Object> value, bool from_javascript, | 2580 Handle<JSObject> object, Handle<Object> value, bool from_javascript, |
| 2581 ShouldThrow should_throw); | 2581 ShouldThrow should_throw); |
| 2582 | 2582 |
| 2583 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); | 2583 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); |
| 2584 }; | 2584 }; |
| 2585 | 2585 |
| 2586 | 2586 |
| 2587 // Common superclass for FixedArrays that allow implementations to share | 2587 // Common superclass for FixedArrays that allow implementations to share |
| 2588 // common accessors and some code paths. | 2588 // common accessors and some code paths. |
| 2589 class FixedArrayBase: public HeapObject { | 2589 class FixedArrayBase: public HeapObject { /* POSTMORTEM */ |
| 2590 public: | 2590 public: |
| 2591 // [length]: length of the array. | 2591 // [length]: length of the array. |
| 2592 inline int length() const; | 2592 inline int length() const; |
| 2593 inline void set_length(int value); | 2593 inline void set_length(int value); |
| 2594 | 2594 |
| 2595 // Get and set the length using acquire loads and release stores. | 2595 // Get and set the length using acquire loads and release stores. |
| 2596 inline int synchronized_length() const; | 2596 inline int synchronized_length() const; |
| 2597 inline void synchronized_set_length(int value); | 2597 inline void synchronized_set_length(int value); |
| 2598 | 2598 |
| 2599 DECLARE_CAST(FixedArrayBase) | 2599 DECLARE_CAST(FixedArrayBase) |
| 2600 | 2600 |
| 2601 // Layout description. | 2601 // Layout description. |
| 2602 // Length is smi tagged when it is stored. | 2602 // Length is smi tagged when it is stored. |
| 2603 static const int kLengthOffset = HeapObject::kHeaderSize; | 2603 static const int kLengthOffset = HeapObject::kHeaderSize; |
| 2604 static const int kHeaderSize = kLengthOffset + kPointerSize; | 2604 static const int kHeaderSize = kLengthOffset + kPointerSize; |
| 2605 }; | 2605 }; |
| 2606 | 2606 |
| 2607 | 2607 |
| 2608 class FixedDoubleArray; | 2608 class FixedDoubleArray; |
| 2609 class IncrementalMarking; | 2609 class IncrementalMarking; |
| 2610 | 2610 |
| 2611 | 2611 |
| 2612 // FixedArray describes fixed-sized arrays with element type Object*. | 2612 // FixedArray describes fixed-sized arrays with element type Object*. |
| 2613 class FixedArray: public FixedArrayBase { | 2613 class FixedArray: public FixedArrayBase { /* POSTMORTEM */ |
| 2614 public: | 2614 public: |
| 2615 // Setter and getter for elements. | 2615 // Setter and getter for elements. |
| 2616 inline Object* get(int index) const; | 2616 inline Object* get(int index) const; |
| 2617 static inline Handle<Object> get(Handle<FixedArray> array, int index); | 2617 static inline Handle<Object> get(Handle<FixedArray> array, int index); |
| 2618 // Setter that uses write barrier. | 2618 // Setter that uses write barrier. |
| 2619 inline void set(int index, Object* value); | 2619 inline void set(int index, Object* value); |
| 2620 inline bool is_the_hole(int index); | 2620 inline bool is_the_hole(int index); |
| 2621 | 2621 |
| 2622 // Setter that doesn't need write barrier. | 2622 // Setter that doesn't need write barrier. |
| 2623 inline void set(int index, Smi* value); | 2623 inline void set(int index, Smi* value); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2699 Object* value); | 2699 Object* value); |
| 2700 | 2700 |
| 2701 private: | 2701 private: |
| 2702 STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); | 2702 STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); |
| 2703 | 2703 |
| 2704 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 2704 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
| 2705 }; | 2705 }; |
| 2706 | 2706 |
| 2707 | 2707 |
| 2708 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2708 // FixedDoubleArray describes fixed-sized arrays with element type double. |
| 2709 class FixedDoubleArray: public FixedArrayBase { | 2709 class FixedDoubleArray: public FixedArrayBase { /* POSTMORTEM */ |
| 2710 public: | 2710 public: |
| 2711 // Setter and getter for elements. | 2711 // Setter and getter for elements. |
| 2712 inline double get_scalar(int index); | 2712 inline double get_scalar(int index); |
| 2713 inline uint64_t get_representation(int index); | 2713 inline uint64_t get_representation(int index); |
| 2714 static inline Handle<Object> get(Handle<FixedDoubleArray> array, int index); | 2714 static inline Handle<Object> get(Handle<FixedDoubleArray> array, int index); |
| 2715 inline void set(int index, double value); | 2715 inline void set(int index, double value); |
| 2716 inline void set_the_hole(int index); | 2716 inline void set_the_hole(int index); |
| 2717 | 2717 |
| 2718 // Checking for the hole. | 2718 // Checking for the hole. |
| 2719 inline bool is_the_hole(int index); | 2719 inline bool is_the_hole(int index); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 2742 | 2742 |
| 2743 // Dispatched behavior. | 2743 // Dispatched behavior. |
| 2744 DECLARE_PRINTER(FixedDoubleArray) | 2744 DECLARE_PRINTER(FixedDoubleArray) |
| 2745 DECLARE_VERIFIER(FixedDoubleArray) | 2745 DECLARE_VERIFIER(FixedDoubleArray) |
| 2746 | 2746 |
| 2747 private: | 2747 private: |
| 2748 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedDoubleArray); | 2748 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedDoubleArray); |
| 2749 }; | 2749 }; |
| 2750 | 2750 |
| 2751 | 2751 |
| 2752 class WeakFixedArray : public FixedArray { | 2752 class WeakFixedArray : public FixedArray { /* POSTMORTEM */ |
| 2753 public: | 2753 public: |
| 2754 // If |maybe_array| is not a WeakFixedArray, a fresh one will be allocated. | 2754 // If |maybe_array| is not a WeakFixedArray, a fresh one will be allocated. |
| 2755 // This function does not check if the value exists already, callers must | 2755 // This function does not check if the value exists already, callers must |
| 2756 // ensure this themselves if necessary. | 2756 // ensure this themselves if necessary. |
| 2757 static Handle<WeakFixedArray> Add(Handle<Object> maybe_array, | 2757 static Handle<WeakFixedArray> Add(Handle<Object> maybe_array, |
| 2758 Handle<HeapObject> value, | 2758 Handle<HeapObject> value, |
| 2759 int* assigned_index = NULL); | 2759 int* assigned_index = NULL); |
| 2760 | 2760 |
| 2761 // Returns true if an entry was found and removed. | 2761 // Returns true if an entry was found and removed. |
| 2762 bool Remove(Handle<HeapObject> value); | 2762 bool Remove(Handle<HeapObject> value); |
| 2763 | 2763 |
| 2764 class NullCallback { | 2764 class NullCallback { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:11
really?
| |
| 2765 public: | 2765 public: |
| 2766 static void Callback(Object* value, int old_index, int new_index) {} | 2766 static void Callback(Object* value, int old_index, int new_index) {} |
| 2767 }; | 2767 }; |
| 2768 | 2768 |
| 2769 template <class CompactionCallback> | 2769 template <class CompactionCallback> |
| 2770 void Compact(); | 2770 void Compact(); |
| 2771 | 2771 |
| 2772 inline Object* Get(int index) const; | 2772 inline Object* Get(int index) const; |
| 2773 inline void Clear(int index); | 2773 inline void Clear(int index); |
| 2774 inline int Length() const; | 2774 inline int Length() const; |
| 2775 | 2775 |
| 2776 inline bool IsEmptySlot(int index) const; | 2776 inline bool IsEmptySlot(int index) const; |
| 2777 static Object* Empty() { return Smi::FromInt(0); } | 2777 static Object* Empty() { return Smi::FromInt(0); } |
| 2778 | 2778 |
| 2779 class Iterator { | 2779 class Iterator { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:12
really?
| |
| 2780 public: | 2780 public: |
| 2781 explicit Iterator(Object* maybe_array) : list_(NULL) { Reset(maybe_array); } | 2781 explicit Iterator(Object* maybe_array) : list_(NULL) { Reset(maybe_array); } |
| 2782 void Reset(Object* maybe_array); | 2782 void Reset(Object* maybe_array); |
| 2783 | 2783 |
| 2784 template <class T> | 2784 template <class T> |
| 2785 inline T* Next(); | 2785 inline T* Next(); |
| 2786 | 2786 |
| 2787 private: | 2787 private: |
| 2788 int index_; | 2788 int index_; |
| 2789 WeakFixedArray* list_; | 2789 WeakFixedArray* list_; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 2812 | 2812 |
| 2813 // Disallow inherited setters. | 2813 // Disallow inherited setters. |
| 2814 void set(int index, Smi* value); | 2814 void set(int index, Smi* value); |
| 2815 void set(int index, Object* value); | 2815 void set(int index, Object* value); |
| 2816 void set(int index, Object* value, WriteBarrierMode mode); | 2816 void set(int index, Object* value, WriteBarrierMode mode); |
| 2817 DISALLOW_IMPLICIT_CONSTRUCTORS(WeakFixedArray); | 2817 DISALLOW_IMPLICIT_CONSTRUCTORS(WeakFixedArray); |
| 2818 }; | 2818 }; |
| 2819 | 2819 |
| 2820 | 2820 |
| 2821 // Generic array grows dynamically with O(1) amortized insertion. | 2821 // Generic array grows dynamically with O(1) amortized insertion. |
| 2822 class ArrayList : public FixedArray { | 2822 class ArrayList : public FixedArray { /* POSTMORTEM */ |
| 2823 public: | 2823 public: |
| 2824 enum AddMode { | 2824 enum AddMode { |
| 2825 kNone, | 2825 kNone, |
| 2826 // Use this if GC can delete elements from the array. | 2826 // Use this if GC can delete elements from the array. |
| 2827 kReloadLengthAfterAllocation, | 2827 kReloadLengthAfterAllocation, |
| 2828 }; | 2828 }; |
| 2829 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj, | 2829 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj, |
| 2830 AddMode mode = kNone); | 2830 AddMode mode = kNone); |
| 2831 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj1, | 2831 static Handle<ArrayList> Add(Handle<ArrayList> array, Handle<Object> obj1, |
| 2832 Handle<Object> obj2, AddMode = kNone); | 2832 Handle<Object> obj2, AddMode = kNone); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 2847 | 2847 |
| 2848 | 2848 |
| 2849 // DescriptorArrays are fixed arrays used to hold instance descriptors. | 2849 // DescriptorArrays are fixed arrays used to hold instance descriptors. |
| 2850 // The format of the these objects is: | 2850 // The format of the these objects is: |
| 2851 // [0]: Number of descriptors | 2851 // [0]: Number of descriptors |
| 2852 // [1]: Either Smi(0) if uninitialized, or a pointer to small fixed array: | 2852 // [1]: Either Smi(0) if uninitialized, or a pointer to small fixed array: |
| 2853 // [0]: pointer to fixed array with enum cache | 2853 // [0]: pointer to fixed array with enum cache |
| 2854 // [1]: either Smi(0) or pointer to fixed array with indices | 2854 // [1]: either Smi(0) or pointer to fixed array with indices |
| 2855 // [2]: first key | 2855 // [2]: first key |
| 2856 // [2 + number of descriptors * kDescriptorSize]: start of slack | 2856 // [2 + number of descriptors * kDescriptorSize]: start of slack |
| 2857 class DescriptorArray: public FixedArray { | 2857 class DescriptorArray: public FixedArray { /* POSTMORTEM */ |
| 2858 public: | 2858 public: |
| 2859 // Returns true for both shared empty_descriptor_array and for smis, which the | 2859 // Returns true for both shared empty_descriptor_array and for smis, which the |
| 2860 // map uses to encode additional bit fields when the descriptor array is not | 2860 // map uses to encode additional bit fields when the descriptor array is not |
| 2861 // yet used. | 2861 // yet used. |
| 2862 inline bool IsEmpty(); | 2862 inline bool IsEmpty(); |
| 2863 | 2863 |
| 2864 // Returns the number of descriptors in the array. | 2864 // Returns the number of descriptors in the array. |
| 2865 inline int number_of_descriptors(); | 2865 inline int number_of_descriptors(); |
| 2866 | 2866 |
| 2867 inline int number_of_descriptors_storage(); | 2867 inline int number_of_descriptors_storage(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3007 | 3007 |
| 3008 private: | 3008 private: |
| 3009 // WhitenessWitness is used to prove that a descriptor array is white | 3009 // WhitenessWitness is used to prove that a descriptor array is white |
| 3010 // (unmarked), so incremental write barriers can be skipped because the | 3010 // (unmarked), so incremental write barriers can be skipped because the |
| 3011 // marking invariant cannot be broken and slots pointing into evacuation | 3011 // marking invariant cannot be broken and slots pointing into evacuation |
| 3012 // candidates will be discovered when the object is scanned. A witness is | 3012 // candidates will be discovered when the object is scanned. A witness is |
| 3013 // always stack-allocated right after creating an array. By allocating a | 3013 // always stack-allocated right after creating an array. By allocating a |
| 3014 // witness, incremental marking is globally disabled. The witness is then | 3014 // witness, incremental marking is globally disabled. The witness is then |
| 3015 // passed along wherever needed to statically prove that the array is known to | 3015 // passed along wherever needed to statically prove that the array is known to |
| 3016 // be white. | 3016 // be white. |
| 3017 class WhitenessWitness { | 3017 class WhitenessWitness { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:11
really?
| |
| 3018 public: | 3018 public: |
| 3019 inline explicit WhitenessWitness(DescriptorArray* array); | 3019 inline explicit WhitenessWitness(DescriptorArray* array); |
| 3020 inline ~WhitenessWitness(); | 3020 inline ~WhitenessWitness(); |
| 3021 | 3021 |
| 3022 private: | 3022 private: |
| 3023 IncrementalMarking* marking_; | 3023 IncrementalMarking* marking_; |
| 3024 }; | 3024 }; |
| 3025 | 3025 |
| 3026 // An entry in a DescriptorArray, represented as an (array, index) pair. | 3026 // An entry in a DescriptorArray, represented as an (array, index) pair. |
| 3027 class Entry { | 3027 class Entry { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:12
really?
| |
| 3028 public: | 3028 public: |
| 3029 inline explicit Entry(DescriptorArray* descs, int index) : | 3029 inline explicit Entry(DescriptorArray* descs, int index) : |
| 3030 descs_(descs), index_(index) { } | 3030 descs_(descs), index_(index) { } |
| 3031 | 3031 |
| 3032 inline PropertyType type(); | 3032 inline PropertyType type(); |
| 3033 inline Object* GetCallbackObject(); | 3033 inline Object* GetCallbackObject(); |
| 3034 | 3034 |
| 3035 private: | 3035 private: |
| 3036 DescriptorArray* descs_; | 3036 DescriptorArray* descs_; |
| 3037 int index_; | 3037 int index_; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3105 // // of the backing storage. | 3105 // // of the backing storage. |
| 3106 // static const int kPrefixSize = ..; | 3106 // static const int kPrefixSize = ..; |
| 3107 // // The Element size indicates number of elements per entry. | 3107 // // The Element size indicates number of elements per entry. |
| 3108 // static const int kEntrySize = ..; | 3108 // static const int kEntrySize = ..; |
| 3109 // }; | 3109 // }; |
| 3110 // The prefix size indicates an amount of memory in the | 3110 // The prefix size indicates an amount of memory in the |
| 3111 // beginning of the backing storage that can be used for non-element | 3111 // beginning of the backing storage that can be used for non-element |
| 3112 // information by subclasses. | 3112 // information by subclasses. |
| 3113 | 3113 |
| 3114 template<typename Key> | 3114 template<typename Key> |
| 3115 class BaseShape { | 3115 class BaseShape { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:11
really?
| |
| 3116 public: | 3116 public: |
| 3117 static const bool UsesSeed = false; | 3117 static const bool UsesSeed = false; |
| 3118 static uint32_t Hash(Key key) { return 0; } | 3118 static uint32_t Hash(Key key) { return 0; } |
| 3119 static uint32_t SeededHash(Key key, uint32_t seed) { | 3119 static uint32_t SeededHash(Key key, uint32_t seed) { |
| 3120 DCHECK(UsesSeed); | 3120 DCHECK(UsesSeed); |
| 3121 return Hash(key); | 3121 return Hash(key); |
| 3122 } | 3122 } |
| 3123 static uint32_t HashForObject(Key key, Object* object) { return 0; } | 3123 static uint32_t HashForObject(Key key, Object* object) { return 0; } |
| 3124 static uint32_t SeededHashForObject(Key key, uint32_t seed, Object* object) { | 3124 static uint32_t SeededHashForObject(Key key, uint32_t seed, Object* object) { |
| 3125 DCHECK(UsesSeed); | 3125 DCHECK(UsesSeed); |
| 3126 return HashForObject(key, object); | 3126 return HashForObject(key, object); |
| 3127 } | 3127 } |
| 3128 }; | 3128 }; |
| 3129 | 3129 |
| 3130 | 3130 |
| 3131 class HashTableBase : public FixedArray { | 3131 class HashTableBase : public FixedArray { /* POSTMORTEM */ |
| 3132 public: | 3132 public: |
| 3133 // Returns the number of elements in the hash table. | 3133 // Returns the number of elements in the hash table. |
| 3134 inline int NumberOfElements(); | 3134 inline int NumberOfElements(); |
| 3135 | 3135 |
| 3136 // Returns the number of deleted elements in the hash table. | 3136 // Returns the number of deleted elements in the hash table. |
| 3137 inline int NumberOfDeletedElements(); | 3137 inline int NumberOfDeletedElements(); |
| 3138 | 3138 |
| 3139 // Returns the capacity of the hash table. | 3139 // Returns the capacity of the hash table. |
| 3140 inline int Capacity(); | 3140 inline int Capacity(); |
| 3141 | 3141 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3187 } | 3187 } |
| 3188 | 3188 |
| 3189 inline static uint32_t NextProbe( | 3189 inline static uint32_t NextProbe( |
| 3190 uint32_t last, uint32_t number, uint32_t size) { | 3190 uint32_t last, uint32_t number, uint32_t size) { |
| 3191 return (last + number) & (size - 1); | 3191 return (last + number) & (size - 1); |
| 3192 } | 3192 } |
| 3193 }; | 3193 }; |
| 3194 | 3194 |
| 3195 | 3195 |
| 3196 template <typename Derived, typename Shape, typename Key> | 3196 template <typename Derived, typename Shape, typename Key> |
| 3197 class HashTable : public HashTableBase { | 3197 class HashTable : public HashTableBase { /* POSTMORTEM */ |
| 3198 public: | 3198 public: |
| 3199 // Wrapper methods | 3199 // Wrapper methods |
| 3200 inline uint32_t Hash(Key key) { | 3200 inline uint32_t Hash(Key key) { |
| 3201 if (Shape::UsesSeed) { | 3201 if (Shape::UsesSeed) { |
| 3202 return Shape::SeededHash(key, GetHeap()->HashSeed()); | 3202 return Shape::SeededHash(key, GetHeap()->HashSeed()); |
| 3203 } else { | 3203 } else { |
| 3204 return Shape::Hash(key); | 3204 return Shape::Hash(key); |
| 3205 } | 3205 } |
| 3206 } | 3206 } |
| 3207 | 3207 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3288 uint32_t EntryForProbe(Key key, Object* k, int probe, uint32_t expected); | 3288 uint32_t EntryForProbe(Key key, Object* k, int probe, uint32_t expected); |
| 3289 | 3289 |
| 3290 void Swap(uint32_t entry1, uint32_t entry2, WriteBarrierMode mode); | 3290 void Swap(uint32_t entry1, uint32_t entry2, WriteBarrierMode mode); |
| 3291 | 3291 |
| 3292 // Rehashes this hash-table into the new table. | 3292 // Rehashes this hash-table into the new table. |
| 3293 void Rehash(Handle<Derived> new_table, Key key); | 3293 void Rehash(Handle<Derived> new_table, Key key); |
| 3294 }; | 3294 }; |
| 3295 | 3295 |
| 3296 | 3296 |
| 3297 // HashTableKey is an abstract superclass for virtual key behavior. | 3297 // HashTableKey is an abstract superclass for virtual key behavior. |
| 3298 class HashTableKey { | 3298 class HashTableKey { /* POSTMORTEM */ |
|
Jakob Kummerow
2015/11/10 15:12:12
really?
| |
| 3299 public: | 3299 public: |
| 3300 // Returns whether the other object matches this key. | 3300 // Returns whether the other object matches this key. |
| 3301 virtual bool IsMatch(Object* other) = 0; | 3301 virtual bool IsMatch(Object* other) = 0; |
| 3302 // Returns the hash value for this key. | 3302 // Returns the hash value for this key. |
| 3303 virtual uint32_t Hash() = 0; | 3303 virtual uint32_t Hash() = 0; |
| 3304 // Returns the hash value for object. | 3304 // Returns the hash value for object. |
| 3305 virtual uint32_t HashForObject(Object* key) = 0; | 3305 virtual uint32_t HashForObject(Object* key) = 0; |
| 3306 // Returns the key object for storing into the hash table. | 3306 // Returns the key object for storing into the hash table. |
| 3307 MUST_USE_RESULT virtual Handle<Object> AsHandle(Isolate* isolate) = 0; | 3307 MUST_USE_RESULT virtual Handle<Object> AsHandle(Isolate* isolate) = 0; |
| 3308 // Required. | 3308 // Required. |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 3331 }; | 3331 }; |
| 3332 | 3332 |
| 3333 class SeqOneByteString; | 3333 class SeqOneByteString; |
| 3334 | 3334 |
| 3335 // StringTable. | 3335 // StringTable. |
| 3336 // | 3336 // |
| 3337 // No special elements in the prefix and the element size is 1 | 3337 // No special elements in the prefix and the element size is 1 |
| 3338 // because only the string itself (the key) needs to be stored. | 3338 // because only the string itself (the key) needs to be stored. |
| 3339 class StringTable: public HashTable<StringTable, | 3339 class StringTable: public HashTable<StringTable, |
| 3340 StringTableShape, | 3340 StringTableShape, |
| 3341 HashTableKey*> { | 3341 HashTableKey*> { /* POSTMORTEM */ |
| 3342 public: | 3342 public: |
| 3343 // Find string in the string table. If it is not there yet, it is | 3343 // Find string in the string table. If it is not there yet, it is |
| 3344 // added. The return value is the string found. | 3344 // added. The return value is the string found. |
| 3345 static Handle<String> LookupString(Isolate* isolate, Handle<String> key); | 3345 static Handle<String> LookupString(Isolate* isolate, Handle<String> key); |
| 3346 static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key); | 3346 static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key); |
| 3347 static String* LookupKeyIfExists(Isolate* isolate, HashTableKey* key); | 3347 static String* LookupKeyIfExists(Isolate* isolate, HashTableKey* key); |
| 3348 | 3348 |
| 3349 // Tries to internalize given string and returns string handle on success | 3349 // Tries to internalize given string and returns string handle on success |
| 3350 // or an empty handle otherwise. | 3350 // or an empty handle otherwise. |
| 3351 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( | 3351 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 3368 | 3368 |
| 3369 private: | 3369 private: |
| 3370 template <bool seq_one_byte> | 3370 template <bool seq_one_byte> |
| 3371 friend class JsonParser; | 3371 friend class JsonParser; |
| 3372 | 3372 |
| 3373 DISALLOW_IMPLICIT_CONSTRUCTORS(StringTable); | 3373 DISALLOW_IMPLICIT_CONSTRUCTORS(StringTable); |
| 3374 }; | 3374 }; |
| 3375 | 3375 |
| 3376 | 3376 |
| 3377 template <typename Derived, typename Shape, typename Key> | 3377 template <typename Derived, typename Shape, typename Key> |
| 3378 class Dictionary: public HashTable<Derived, Shape, Key> { | 3378 class Dictionary: public HashTable<Derived, Shape, Key> { /* POSTMORTEM */ |
| 3379 typedef HashTable<Derived, Shape, Key> DerivedHashTable; | 3379 typedef HashTable<Derived, Shape, Key> DerivedHashTable; |
| 3380 | 3380 |
| 3381 public: | 3381 public: |
| 3382 // Returns the value at entry. | 3382 // Returns the value at entry. |
| 3383 Object* ValueAt(int entry) { | 3383 Object* ValueAt(int entry) { |
| 3384 return this->get(Derived::EntryToIndex(entry) + 1); | 3384 return this->get(Derived::EntryToIndex(entry) + 1); |
| 3385 } | 3385 } |
| 3386 | 3386 |
| 3387 // Set the value for entry. | 3387 // Set the value for entry. |
| 3388 void ValueAtPut(int entry, Object* value) { | 3388 void ValueAtPut(int entry, Object* value) { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3795 // table: | 3795 // table: |
| 3796 // | 3796 // |
| 3797 // Memory layout for obsolete table: | 3797 // Memory layout for obsolete table: |
| 3798 // [0]: bucket count | 3798 // [0]: bucket count |
| 3799 // [1]: Next newer table | 3799 // [1]: Next newer table |
| 3800 // [2]: Number of removed holes or -1 when the table was cleared. | 3800 // [2]: Number of removed holes or -1 when the table was cleared. |
| 3801 // [3..(3 + NumberOfRemovedHoles() - 1)]: The indexes of the removed holes. | 3801 // [3..(3 + NumberOfRemovedHoles() - 1)]: The indexes of the removed holes. |
| 3802 // [3 + NumberOfRemovedHoles()..length]: Not used | 3802 // [3 + NumberOfRemovedHoles()..length]: Not used |
| 3803 // | 3803 // |
| 3804 template<class Derived, class Iterator, int entrysize> | 3804 template<class Derived, class Iterator, int entrysize> |
| 3805 class OrderedHashTable: public FixedArray { | 3805 class OrderedHashTable: public FixedArray { /* POSTMORTEM */ |
| 3806 public: | 3806 public: |
| 3807 // Returns an OrderedHashTable with a capacity of at least |capacity|. | 3807 // Returns an OrderedHashTable with a capacity of at least |capacity|. |
| 3808 static Handle<Derived> Allocate( | 3808 static Handle<Derived> Allocate( |
| 3809 Isolate* isolate, int capacity, PretenureFlag pretenure = NOT_TENURED); | 3809 Isolate* isolate, int capacity, PretenureFlag pretenure = NOT_TENURED); |
| 3810 | 3810 |
| 3811 // Returns an OrderedHashTable (possibly |table|) with enough space | 3811 // Returns an OrderedHashTable (possibly |table|) with enough space |
| 3812 // to add at least one new element. | 3812 // to add at least one new element. |
| 3813 static Handle<Derived> EnsureGrowable(Handle<Derived> table); | 3813 static Handle<Derived> EnsureGrowable(Handle<Derived> table); |
| 3814 | 3814 |
| 3815 // Returns an OrderedHashTable (possibly |table|) that's shrunken | 3815 // Returns an OrderedHashTable (possibly |table|) that's shrunken |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4325 static inline int GetIndex(Handle<Map> map); | 4325 static inline int GetIndex(Handle<Map> map); |
| 4326 | 4326 |
| 4327 // The following declarations hide base class methods. | 4327 // The following declarations hide base class methods. |
| 4328 Object* get(int index); | 4328 Object* get(int index); |
| 4329 void set(int index, Object* value); | 4329 void set(int index, Object* value); |
| 4330 }; | 4330 }; |
| 4331 | 4331 |
| 4332 | 4332 |
| 4333 // ByteArray represents fixed sized byte arrays. Used for the relocation info | 4333 // ByteArray represents fixed sized byte arrays. Used for the relocation info |
| 4334 // that is attached to code objects. | 4334 // that is attached to code objects. |
| 4335 class ByteArray: public FixedArrayBase { | 4335 class ByteArray: public FixedArrayBase { /* POSTMORTEM */ |
| 4336 public: | 4336 public: |
| 4337 inline int Size(); | 4337 inline int Size(); |
| 4338 | 4338 |
| 4339 // Setter and getter. | 4339 // Setter and getter. |
| 4340 inline byte get(int index); | 4340 inline byte get(int index); |
| 4341 inline void set(int index, byte value); | 4341 inline void set(int index, byte value); |
| 4342 | 4342 |
| 4343 // Treat contents as an int array. | 4343 // Treat contents as an int array. |
| 4344 inline int get_int(int index); | 4344 inline int get_int(int index); |
| 4345 | 4345 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4437 private: | 4437 private: |
| 4438 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); | 4438 DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeArray); |
| 4439 }; | 4439 }; |
| 4440 | 4440 |
| 4441 | 4441 |
| 4442 // FreeSpace are fixed-size free memory blocks used by the heap and GC. | 4442 // FreeSpace are fixed-size free memory blocks used by the heap and GC. |
| 4443 // They look like heap objects (are heap object tagged and have a map) so that | 4443 // They look like heap objects (are heap object tagged and have a map) so that |
| 4444 // the heap remains iterable. They have a size and a next pointer. | 4444 // the heap remains iterable. They have a size and a next pointer. |
| 4445 // The next pointer is the raw address of the next FreeSpace object (or NULL) | 4445 // The next pointer is the raw address of the next FreeSpace object (or NULL) |
| 4446 // in the free list. | 4446 // in the free list. |
| 4447 class FreeSpace: public HeapObject { | 4447 class FreeSpace: public HeapObject { /* POSTMORTEM */ |
| 4448 public: | 4448 public: |
| 4449 // [size]: size of the free space including the header. | 4449 // [size]: size of the free space including the header. |
| 4450 inline int size() const; | 4450 inline int size() const; |
| 4451 inline void set_size(int value); | 4451 inline void set_size(int value); |
| 4452 | 4452 |
| 4453 inline int nobarrier_size() const; | 4453 inline int nobarrier_size() const; |
| 4454 inline void nobarrier_set_size(int value); | 4454 inline void nobarrier_set_size(int value); |
| 4455 | 4455 |
| 4456 inline int Size(); | 4456 inline int Size(); |
| 4457 | 4457 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4823 static const int kReturnHandlerIndex = 1; | 4823 static const int kReturnHandlerIndex = 1; |
| 4824 static const int kReturnEntrySize = 2; | 4824 static const int kReturnEntrySize = 2; |
| 4825 | 4825 |
| 4826 // Encoding of the {handler} field. | 4826 // Encoding of the {handler} field. |
| 4827 class HandlerPredictionField : public BitField<CatchPrediction, 0, 1> {}; | 4827 class HandlerPredictionField : public BitField<CatchPrediction, 0, 1> {}; |
| 4828 class HandlerOffsetField : public BitField<int, 1, 30> {}; | 4828 class HandlerOffsetField : public BitField<int, 1, 30> {}; |
| 4829 }; | 4829 }; |
| 4830 | 4830 |
| 4831 | 4831 |
| 4832 // Code describes objects with on-the-fly generated machine code. | 4832 // Code describes objects with on-the-fly generated machine code. |
| 4833 class Code: public HeapObject { | 4833 class Code: public HeapObject { /* POSTMORTEM */ |
| 4834 public: | 4834 public: |
| 4835 // Opaque data type for encapsulating code flags like kind, inline | 4835 // Opaque data type for encapsulating code flags like kind, inline |
| 4836 // cache state, and arguments count. | 4836 // cache state, and arguments count. |
| 4837 typedef uint32_t Flags; | 4837 typedef uint32_t Flags; |
| 4838 | 4838 |
| 4839 #define NON_IC_KIND_LIST(V) \ | 4839 #define NON_IC_KIND_LIST(V) \ |
| 4840 V(FUNCTION) \ | 4840 V(FUNCTION) \ |
| 4841 V(OPTIMIZED_FUNCTION) \ | 4841 V(OPTIMIZED_FUNCTION) \ |
| 4842 V(STUB) \ | 4842 V(STUB) \ |
| 4843 V(HANDLER) \ | 4843 V(HANDLER) \ |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5498 }; | 5498 }; |
| 5499 | 5499 |
| 5500 | 5500 |
| 5501 class PrototypeInfo; | 5501 class PrototypeInfo; |
| 5502 | 5502 |
| 5503 | 5503 |
| 5504 // All heap objects have a Map that describes their structure. | 5504 // All heap objects have a Map that describes their structure. |
| 5505 // A Map contains information about: | 5505 // A Map contains information about: |
| 5506 // - Size information about the object | 5506 // - Size information about the object |
| 5507 // - How to iterate over an object (for garbage collection) | 5507 // - How to iterate over an object (for garbage collection) |
| 5508 class Map: public HeapObject { | 5508 class Map: public HeapObject { /* POSTMORTEM */ |
| 5509 public: | 5509 public: |
| 5510 // Instance size. | 5510 // Instance size. |
| 5511 // Size in bytes or kVariableSizeSentinel if instances do not have | 5511 // Size in bytes or kVariableSizeSentinel if instances do not have |
| 5512 // a fixed size. | 5512 // a fixed size. |
| 5513 inline int instance_size(); | 5513 inline int instance_size(); |
| 5514 inline void set_instance_size(int value); | 5514 inline void set_instance_size(int value); |
| 5515 | 5515 |
| 5516 // Only to clear an unused byte, remove once byte is used. | 5516 // Only to clear an unused byte, remove once byte is used. |
| 5517 inline void clear_unused(); | 5517 inline void clear_unused(); |
| 5518 | 5518 |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6262 static const int kScopeInfoOffset = HeapObject::kHeaderSize; | 6262 static const int kScopeInfoOffset = HeapObject::kHeaderSize; |
| 6263 static const int kExtensionOffset = kScopeInfoOffset + kPointerSize; | 6263 static const int kExtensionOffset = kScopeInfoOffset + kPointerSize; |
| 6264 static const int kSize = kExtensionOffset + kPointerSize; | 6264 static const int kSize = kExtensionOffset + kPointerSize; |
| 6265 | 6265 |
| 6266 private: | 6266 private: |
| 6267 DISALLOW_IMPLICIT_CONSTRUCTORS(SloppyBlockWithEvalContextExtension); | 6267 DISALLOW_IMPLICIT_CONSTRUCTORS(SloppyBlockWithEvalContextExtension); |
| 6268 }; | 6268 }; |
| 6269 | 6269 |
| 6270 | 6270 |
| 6271 // Script describes a script which has been added to the VM. | 6271 // Script describes a script which has been added to the VM. |
| 6272 class Script: public Struct { | 6272 class Script: public Struct { /* POSTMORTEM */ |
| 6273 public: | 6273 public: |
| 6274 // Script types. | 6274 // Script types. |
| 6275 enum Type { | 6275 enum Type { |
| 6276 TYPE_NATIVE = 0, | 6276 TYPE_NATIVE = 0, |
| 6277 TYPE_EXTENSION = 1, | 6277 TYPE_EXTENSION = 1, |
| 6278 TYPE_NORMAL = 2 | 6278 TYPE_NORMAL = 2 |
| 6279 }; | 6279 }; |
| 6280 | 6280 |
| 6281 // Script compilation types. | 6281 // Script compilation types. |
| 6282 enum CompilationType { | 6282 enum CompilationType { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6498 // Result of searching in an optimized code map of a SharedFunctionInfo. Note | 6498 // Result of searching in an optimized code map of a SharedFunctionInfo. Note |
| 6499 // that both {code} and {literals} can be NULL to pass search result status. | 6499 // that both {code} and {literals} can be NULL to pass search result status. |
| 6500 struct CodeAndLiterals { | 6500 struct CodeAndLiterals { |
| 6501 Code* code; // Cached optimized code. | 6501 Code* code; // Cached optimized code. |
| 6502 LiteralsArray* literals; // Cached literals array. | 6502 LiteralsArray* literals; // Cached literals array. |
| 6503 }; | 6503 }; |
| 6504 | 6504 |
| 6505 | 6505 |
| 6506 // SharedFunctionInfo describes the JSFunction information that can be | 6506 // SharedFunctionInfo describes the JSFunction information that can be |
| 6507 // shared by multiple instances of the function. | 6507 // shared by multiple instances of the function. |
| 6508 class SharedFunctionInfo: public HeapObject { | 6508 class SharedFunctionInfo: public HeapObject { /* POSTMORTEM */ |
| 6509 public: | 6509 public: |
| 6510 // [name]: Function name. | 6510 // [name]: Function name. |
| 6511 DECL_ACCESSORS(name, Object) | 6511 DECL_ACCESSORS(name, Object) |
| 6512 | 6512 |
| 6513 // [code]: Function code. | 6513 // [code]: Function code. |
| 6514 DECL_ACCESSORS(code, Code) | 6514 DECL_ACCESSORS(code, Code) |
| 6515 inline void ReplaceCode(Code* code); | 6515 inline void ReplaceCode(Code* code); |
| 6516 | 6516 |
| 6517 // [optimized_code_map]: Map from native context to optimized code | 6517 // [optimized_code_map]: Map from native context to optimized code |
| 6518 // and a shared literals array or Smi(0) if none. | 6518 // and a shared literals array or Smi(0) if none. |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7164 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) | 7164 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) |
| 7165 : value(v), max_length(max) {} | 7165 : value(v), max_length(max) {} |
| 7166 const SharedFunctionInfo* value; | 7166 const SharedFunctionInfo* value; |
| 7167 int max_length; | 7167 int max_length; |
| 7168 }; | 7168 }; |
| 7169 | 7169 |
| 7170 | 7170 |
| 7171 std::ostream& operator<<(std::ostream& os, const SourceCodeOf& v); | 7171 std::ostream& operator<<(std::ostream& os, const SourceCodeOf& v); |
| 7172 | 7172 |
| 7173 | 7173 |
| 7174 class JSGeneratorObject: public JSObject { | 7174 class JSGeneratorObject: public JSObject { /* POSTMORTEM */ |
| 7175 public: | 7175 public: |
| 7176 // [function]: The function corresponding to this generator object. | 7176 // [function]: The function corresponding to this generator object. |
| 7177 DECL_ACCESSORS(function, JSFunction) | 7177 DECL_ACCESSORS(function, JSFunction) |
| 7178 | 7178 |
| 7179 // [context]: The context of the suspended computation. | 7179 // [context]: The context of the suspended computation. |
| 7180 DECL_ACCESSORS(context, Context) | 7180 DECL_ACCESSORS(context, Context) |
| 7181 | 7181 |
| 7182 // [receiver]: The receiver of the suspended computation. | 7182 // [receiver]: The receiver of the suspended computation. |
| 7183 DECL_ACCESSORS(receiver, Object) | 7183 DECL_ACCESSORS(receiver, Object) |
| 7184 | 7184 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7216 | 7216 |
| 7217 // Resume mode, for use by runtime functions. | 7217 // Resume mode, for use by runtime functions. |
| 7218 enum ResumeMode { NEXT, THROW }; | 7218 enum ResumeMode { NEXT, THROW }; |
| 7219 | 7219 |
| 7220 private: | 7220 private: |
| 7221 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); | 7221 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); |
| 7222 }; | 7222 }; |
| 7223 | 7223 |
| 7224 | 7224 |
| 7225 // Representation for module instance objects. | 7225 // Representation for module instance objects. |
| 7226 class JSModule: public JSObject { | 7226 class JSModule: public JSObject { /* POSTMORTEM */ |
| 7227 public: | 7227 public: |
| 7228 // [context]: the context holding the module's locals, or undefined if none. | 7228 // [context]: the context holding the module's locals, or undefined if none. |
| 7229 DECL_ACCESSORS(context, Object) | 7229 DECL_ACCESSORS(context, Object) |
| 7230 | 7230 |
| 7231 // [scope_info]: Scope info. | 7231 // [scope_info]: Scope info. |
| 7232 DECL_ACCESSORS(scope_info, ScopeInfo) | 7232 DECL_ACCESSORS(scope_info, ScopeInfo) |
| 7233 | 7233 |
| 7234 DECLARE_CAST(JSModule) | 7234 DECLARE_CAST(JSModule) |
| 7235 | 7235 |
| 7236 // Dispatched behavior. | 7236 // Dispatched behavior. |
| 7237 DECLARE_PRINTER(JSModule) | 7237 DECLARE_PRINTER(JSModule) |
| 7238 DECLARE_VERIFIER(JSModule) | 7238 DECLARE_VERIFIER(JSModule) |
| 7239 | 7239 |
| 7240 // Layout description. | 7240 // Layout description. |
| 7241 static const int kContextOffset = JSObject::kHeaderSize; | 7241 static const int kContextOffset = JSObject::kHeaderSize; |
| 7242 static const int kScopeInfoOffset = kContextOffset + kPointerSize; | 7242 static const int kScopeInfoOffset = kContextOffset + kPointerSize; |
| 7243 static const int kSize = kScopeInfoOffset + kPointerSize; | 7243 static const int kSize = kScopeInfoOffset + kPointerSize; |
| 7244 | 7244 |
| 7245 private: | 7245 private: |
| 7246 DISALLOW_IMPLICIT_CONSTRUCTORS(JSModule); | 7246 DISALLOW_IMPLICIT_CONSTRUCTORS(JSModule); |
| 7247 }; | 7247 }; |
| 7248 | 7248 |
| 7249 | 7249 |
| 7250 // JSFunction describes JavaScript functions. | 7250 // JSFunction describes JavaScript functions. |
| 7251 class JSFunction: public JSObject { | 7251 class JSFunction: public JSObject { /* POSTMORTEM */ |
| 7252 public: | 7252 public: |
| 7253 // [prototype_or_initial_map]: | 7253 // [prototype_or_initial_map]: |
| 7254 DECL_ACCESSORS(prototype_or_initial_map, Object) | 7254 DECL_ACCESSORS(prototype_or_initial_map, Object) |
| 7255 | 7255 |
| 7256 // [shared]: The information about the function that | 7256 // [shared]: The information about the function that |
| 7257 // can be shared by instances. | 7257 // can be shared by instances. |
| 7258 DECL_ACCESSORS(shared, SharedFunctionInfo) | 7258 DECL_ACCESSORS(shared, SharedFunctionInfo) |
| 7259 | 7259 |
| 7260 // [context]: The context for this function. | 7260 // [context]: The context for this function. |
| 7261 inline Context* context(); | 7261 inline Context* context(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7470 static const int kNativeContextOffset = JSObject::kHeaderSize; | 7470 static const int kNativeContextOffset = JSObject::kHeaderSize; |
| 7471 static const int kHashOffset = kNativeContextOffset + kPointerSize; | 7471 static const int kHashOffset = kNativeContextOffset + kPointerSize; |
| 7472 static const int kSize = kHashOffset + kPointerSize; | 7472 static const int kSize = kHashOffset + kPointerSize; |
| 7473 | 7473 |
| 7474 private: | 7474 private: |
| 7475 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); | 7475 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |
| 7476 }; | 7476 }; |
| 7477 | 7477 |
| 7478 | 7478 |
| 7479 // JavaScript global object. | 7479 // JavaScript global object. |
| 7480 class JSGlobalObject : public JSObject { | 7480 class JSGlobalObject : public JSObject { /* POSTMORTEM */ |
| 7481 public: | 7481 public: |
| 7482 // [native context]: the natives corresponding to this global object. | 7482 // [native context]: the natives corresponding to this global object. |
| 7483 DECL_ACCESSORS(native_context, Context) | 7483 DECL_ACCESSORS(native_context, Context) |
| 7484 | 7484 |
| 7485 // [global proxy]: the global proxy object of the context | 7485 // [global proxy]: the global proxy object of the context |
| 7486 DECL_ACCESSORS(global_proxy, JSObject) | 7486 DECL_ACCESSORS(global_proxy, JSObject) |
| 7487 | 7487 |
| 7488 | 7488 |
| 7489 static void InvalidatePropertyCell(Handle<JSGlobalObject> object, | 7489 static void InvalidatePropertyCell(Handle<JSGlobalObject> object, |
| 7490 Handle<Name> name); | 7490 Handle<Name> name); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 7505 static const int kGlobalProxyOffset = kNativeContextOffset + kPointerSize; | 7505 static const int kGlobalProxyOffset = kNativeContextOffset + kPointerSize; |
| 7506 static const int kHeaderSize = kGlobalProxyOffset + kPointerSize; | 7506 static const int kHeaderSize = kGlobalProxyOffset + kPointerSize; |
| 7507 static const int kSize = kHeaderSize; | 7507 static const int kSize = kHeaderSize; |
| 7508 | 7508 |
| 7509 private: | 7509 private: |
| 7510 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); | 7510 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); |
| 7511 }; | 7511 }; |
| 7512 | 7512 |
| 7513 | 7513 |
| 7514 // Representation for JS Wrapper objects, String, Number, Boolean, etc. | 7514 // Representation for JS Wrapper objects, String, Number, Boolean, etc. |
| 7515 class JSValue: public JSObject { | 7515 class JSValue: public JSObject { /* POSTMORTEM */ |
| 7516 public: | 7516 public: |
| 7517 // [value]: the object being wrapped. | 7517 // [value]: the object being wrapped. |
| 7518 DECL_ACCESSORS(value, Object) | 7518 DECL_ACCESSORS(value, Object) |
| 7519 | 7519 |
| 7520 DECLARE_CAST(JSValue) | 7520 DECLARE_CAST(JSValue) |
| 7521 | 7521 |
| 7522 // Dispatched behavior. | 7522 // Dispatched behavior. |
| 7523 DECLARE_PRINTER(JSValue) | 7523 DECLARE_PRINTER(JSValue) |
| 7524 DECLARE_VERIFIER(JSValue) | 7524 DECLARE_VERIFIER(JSValue) |
| 7525 | 7525 |
| 7526 // Layout description. | 7526 // Layout description. |
| 7527 static const int kValueOffset = JSObject::kHeaderSize; | 7527 static const int kValueOffset = JSObject::kHeaderSize; |
| 7528 static const int kSize = kValueOffset + kPointerSize; | 7528 static const int kSize = kValueOffset + kPointerSize; |
| 7529 | 7529 |
| 7530 private: | 7530 private: |
| 7531 DISALLOW_IMPLICIT_CONSTRUCTORS(JSValue); | 7531 DISALLOW_IMPLICIT_CONSTRUCTORS(JSValue); |
| 7532 }; | 7532 }; |
| 7533 | 7533 |
| 7534 | 7534 |
| 7535 class DateCache; | 7535 class DateCache; |
| 7536 | 7536 |
| 7537 // Representation for JS date objects. | 7537 // Representation for JS date objects. |
| 7538 class JSDate: public JSObject { | 7538 class JSDate: public JSObject { /* POSTMORTEM */ |
| 7539 public: | 7539 public: |
| 7540 // If one component is NaN, all of them are, indicating a NaN time value. | 7540 // If one component is NaN, all of them are, indicating a NaN time value. |
| 7541 // [value]: the time value. | 7541 // [value]: the time value. |
| 7542 DECL_ACCESSORS(value, Object) | 7542 DECL_ACCESSORS(value, Object) |
| 7543 // [year]: caches year. Either undefined, smi, or NaN. | 7543 // [year]: caches year. Either undefined, smi, or NaN. |
| 7544 DECL_ACCESSORS(year, Object) | 7544 DECL_ACCESSORS(year, Object) |
| 7545 // [month]: caches month. Either undefined, smi, or NaN. | 7545 // [month]: caches month. Either undefined, smi, or NaN. |
| 7546 DECL_ACCESSORS(month, Object) | 7546 DECL_ACCESSORS(month, Object) |
| 7547 // [day]: caches day. Either undefined, smi, or NaN. | 7547 // [day]: caches day. Either undefined, smi, or NaN. |
| 7548 DECL_ACCESSORS(day, Object) | 7548 DECL_ACCESSORS(day, Object) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7627 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDate); | 7627 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDate); |
| 7628 }; | 7628 }; |
| 7629 | 7629 |
| 7630 | 7630 |
| 7631 // Representation of message objects used for error reporting through | 7631 // Representation of message objects used for error reporting through |
| 7632 // the API. The messages are formatted in JavaScript so this object is | 7632 // the API. The messages are formatted in JavaScript so this object is |
| 7633 // a real JavaScript object. The information used for formatting the | 7633 // a real JavaScript object. The information used for formatting the |
| 7634 // error messages are not directly accessible from JavaScript to | 7634 // error messages are not directly accessible from JavaScript to |
| 7635 // prevent leaking information to user code called during error | 7635 // prevent leaking information to user code called during error |
| 7636 // formatting. | 7636 // formatting. |
| 7637 class JSMessageObject: public JSObject { | 7637 class JSMessageObject: public JSObject { /* POSTMORTEM */ |
| 7638 public: | 7638 public: |
| 7639 // [type]: the type of error message. | 7639 // [type]: the type of error message. |
| 7640 inline int type() const; | 7640 inline int type() const; |
| 7641 inline void set_type(int value); | 7641 inline void set_type(int value); |
| 7642 | 7642 |
| 7643 // [arguments]: the arguments for formatting the error message. | 7643 // [arguments]: the arguments for formatting the error message. |
| 7644 DECL_ACCESSORS(argument, Object) | 7644 DECL_ACCESSORS(argument, Object) |
| 7645 | 7645 |
| 7646 // [script]: the script from which the error message originated. | 7646 // [script]: the script from which the error message originated. |
| 7647 DECL_ACCESSORS(script, Object) | 7647 DECL_ACCESSORS(script, Object) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7687 // - reference to the original flag string | 7687 // - reference to the original flag string |
| 7688 // If it is an atom regexp | 7688 // If it is an atom regexp |
| 7689 // - a reference to a literal string to search for | 7689 // - a reference to a literal string to search for |
| 7690 // If it is an irregexp regexp: | 7690 // If it is an irregexp regexp: |
| 7691 // - a reference to code for Latin1 inputs (bytecode or compiled), or a smi | 7691 // - a reference to code for Latin1 inputs (bytecode or compiled), or a smi |
| 7692 // used for tracking the last usage (used for code flushing). | 7692 // used for tracking the last usage (used for code flushing). |
| 7693 // - a reference to code for UC16 inputs (bytecode or compiled), or a smi | 7693 // - a reference to code for UC16 inputs (bytecode or compiled), or a smi |
| 7694 // used for tracking the last usage (used for code flushing).. | 7694 // used for tracking the last usage (used for code flushing).. |
| 7695 // - max number of registers used by irregexp implementations. | 7695 // - max number of registers used by irregexp implementations. |
| 7696 // - number of capture registers (output values) of the regexp. | 7696 // - number of capture registers (output values) of the regexp. |
| 7697 class JSRegExp: public JSObject { | 7697 class JSRegExp: public JSObject { /* POSTMORTEM */ |
| 7698 public: | 7698 public: |
| 7699 // Meaning of Type: | 7699 // Meaning of Type: |
| 7700 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet. | 7700 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet. |
| 7701 // ATOM: A simple string to match against using an indexOf operation. | 7701 // ATOM: A simple string to match against using an indexOf operation. |
| 7702 // IRREGEXP: Compiled with Irregexp. | 7702 // IRREGEXP: Compiled with Irregexp. |
| 7703 // IRREGEXP_NATIVE: Compiled to native code with Irregexp. | 7703 // IRREGEXP_NATIVE: Compiled to native code with Irregexp. |
| 7704 enum Type { NOT_COMPILED, ATOM, IRREGEXP }; | 7704 enum Type { NOT_COMPILED, ATOM, IRREGEXP }; |
| 7705 enum Flag { | 7705 enum Flag { |
| 7706 NONE = 0, | 7706 NONE = 0, |
| 7707 GLOBAL = 1, | 7707 GLOBAL = 1, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7885 void Age(); | 7885 void Age(); |
| 7886 static const int kHashGenerations = 10; | 7886 static const int kHashGenerations = 10; |
| 7887 | 7887 |
| 7888 DECLARE_CAST(CompilationCacheTable) | 7888 DECLARE_CAST(CompilationCacheTable) |
| 7889 | 7889 |
| 7890 private: | 7890 private: |
| 7891 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); | 7891 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); |
| 7892 }; | 7892 }; |
| 7893 | 7893 |
| 7894 | 7894 |
| 7895 class CodeCache: public Struct { | 7895 class CodeCache: public Struct { /* POSTMORTEM */ |
| 7896 public: | 7896 public: |
| 7897 DECL_ACCESSORS(default_cache, FixedArray) | 7897 DECL_ACCESSORS(default_cache, FixedArray) |
| 7898 DECL_ACCESSORS(normal_type_cache, Object) | 7898 DECL_ACCESSORS(normal_type_cache, Object) |
| 7899 | 7899 |
| 7900 // Add the code object to the cache. | 7900 // Add the code object to the cache. |
| 7901 static void Update( | 7901 static void Update( |
| 7902 Handle<CodeCache> cache, Handle<Name> name, Handle<Code> code); | 7902 Handle<CodeCache> cache, Handle<Name> name, Handle<Code> code); |
| 7903 | 7903 |
| 7904 // Lookup code object in the cache. Returns code object if found and undefined | 7904 // Lookup code object in the cache. Returns code object if found and undefined |
| 7905 // if not. | 7905 // if not. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7980 DECLARE_CAST(CodeCacheHashTable) | 7980 DECLARE_CAST(CodeCacheHashTable) |
| 7981 | 7981 |
| 7982 // Initial size of the fixed array backing the hash table. | 7982 // Initial size of the fixed array backing the hash table. |
| 7983 static const int kInitialSize = 64; | 7983 static const int kInitialSize = 64; |
| 7984 | 7984 |
| 7985 private: | 7985 private: |
| 7986 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable); | 7986 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable); |
| 7987 }; | 7987 }; |
| 7988 | 7988 |
| 7989 | 7989 |
| 7990 class PolymorphicCodeCache: public Struct { | 7990 class PolymorphicCodeCache: public Struct { /* POSTMORTEM */ |
| 7991 public: | 7991 public: |
| 7992 DECL_ACCESSORS(cache, Object) | 7992 DECL_ACCESSORS(cache, Object) |
| 7993 | 7993 |
| 7994 static void Update(Handle<PolymorphicCodeCache> cache, | 7994 static void Update(Handle<PolymorphicCodeCache> cache, |
| 7995 MapHandleList* maps, | 7995 MapHandleList* maps, |
| 7996 Code::Flags flags, | 7996 Code::Flags flags, |
| 7997 Handle<Code> code); | 7997 Handle<Code> code); |
| 7998 | 7998 |
| 7999 | 7999 |
| 8000 // Returns an undefined value if the entry is not found. | 8000 // Returns an undefined value if the entry is not found. |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 8028 Handle<Code> code); | 8028 Handle<Code> code); |
| 8029 | 8029 |
| 8030 DECLARE_CAST(PolymorphicCodeCacheHashTable) | 8030 DECLARE_CAST(PolymorphicCodeCacheHashTable) |
| 8031 | 8031 |
| 8032 static const int kInitialSize = 64; | 8032 static const int kInitialSize = 64; |
| 8033 private: | 8033 private: |
| 8034 DISALLOW_IMPLICIT_CONSTRUCTORS(PolymorphicCodeCacheHashTable); | 8034 DISALLOW_IMPLICIT_CONSTRUCTORS(PolymorphicCodeCacheHashTable); |
| 8035 }; | 8035 }; |
| 8036 | 8036 |
| 8037 | 8037 |
| 8038 class TypeFeedbackInfo: public Struct { | 8038 class TypeFeedbackInfo: public Struct { /* POSTMORTEM */ |
| 8039 public: | 8039 public: |
| 8040 inline int ic_total_count(); | 8040 inline int ic_total_count(); |
| 8041 inline void set_ic_total_count(int count); | 8041 inline void set_ic_total_count(int count); |
| 8042 | 8042 |
| 8043 inline int ic_with_type_info_count(); | 8043 inline int ic_with_type_info_count(); |
| 8044 inline void change_ic_with_type_info_count(int delta); | 8044 inline void change_ic_with_type_info_count(int delta); |
| 8045 | 8045 |
| 8046 inline int ic_generic_count(); | 8046 inline int ic_generic_count(); |
| 8047 inline void change_ic_generic_count(int delta); | 8047 inline void change_ic_generic_count(int delta); |
| 8048 | 8048 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8083 }; | 8083 }; |
| 8084 | 8084 |
| 8085 | 8085 |
| 8086 enum AllocationSiteMode { | 8086 enum AllocationSiteMode { |
| 8087 DONT_TRACK_ALLOCATION_SITE, | 8087 DONT_TRACK_ALLOCATION_SITE, |
| 8088 TRACK_ALLOCATION_SITE, | 8088 TRACK_ALLOCATION_SITE, |
| 8089 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE | 8089 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE |
| 8090 }; | 8090 }; |
| 8091 | 8091 |
| 8092 | 8092 |
| 8093 class AllocationSite: public Struct { | 8093 class AllocationSite: public Struct { /* POSTMORTEM */ |
| 8094 public: | 8094 public: |
| 8095 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; | 8095 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; |
| 8096 static const double kPretenureRatio; | 8096 static const double kPretenureRatio; |
| 8097 static const int kPretenureMinimumCreated = 100; | 8097 static const int kPretenureMinimumCreated = 100; |
| 8098 | 8098 |
| 8099 // Values for pretenure decision field. | 8099 // Values for pretenure decision field. |
| 8100 enum PretenureDecision { | 8100 enum PretenureDecision { |
| 8101 kUndecided = 0, | 8101 kUndecided = 0, |
| 8102 kDontTenure = 1, | 8102 kDontTenure = 1, |
| 8103 kMaybeTenure = 2, | 8103 kMaybeTenure = 2, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8212 kDependentCodeOffset + kPointerSize, | 8212 kDependentCodeOffset + kPointerSize, |
| 8213 kSize> BodyDescriptor; | 8213 kSize> BodyDescriptor; |
| 8214 | 8214 |
| 8215 private: | 8215 private: |
| 8216 inline bool PretenuringDecisionMade(); | 8216 inline bool PretenuringDecisionMade(); |
| 8217 | 8217 |
| 8218 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); | 8218 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); |
| 8219 }; | 8219 }; |
| 8220 | 8220 |
| 8221 | 8221 |
| 8222 class AllocationMemento: public Struct { | 8222 class AllocationMemento: public Struct { /* POSTMORTEM */ |
| 8223 public: | 8223 public: |
| 8224 static const int kAllocationSiteOffset = HeapObject::kHeaderSize; | 8224 static const int kAllocationSiteOffset = HeapObject::kHeaderSize; |
| 8225 static const int kSize = kAllocationSiteOffset + kPointerSize; | 8225 static const int kSize = kAllocationSiteOffset + kPointerSize; |
| 8226 | 8226 |
| 8227 DECL_ACCESSORS(allocation_site, Object) | 8227 DECL_ACCESSORS(allocation_site, Object) |
| 8228 | 8228 |
| 8229 inline bool IsValid(); | 8229 inline bool IsValid(); |
| 8230 inline AllocationSite* GetAllocationSite(); | 8230 inline AllocationSite* GetAllocationSite(); |
| 8231 | 8231 |
| 8232 DECLARE_PRINTER(AllocationMemento) | 8232 DECLARE_PRINTER(AllocationMemento) |
| 8233 DECLARE_VERIFIER(AllocationMemento) | 8233 DECLARE_VERIFIER(AllocationMemento) |
| 8234 | 8234 |
| 8235 DECLARE_CAST(AllocationMemento) | 8235 DECLARE_CAST(AllocationMemento) |
| 8236 | 8236 |
| 8237 private: | 8237 private: |
| 8238 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); | 8238 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); |
| 8239 }; | 8239 }; |
| 8240 | 8240 |
| 8241 | 8241 |
| 8242 // Representation of a slow alias as part of a sloppy arguments objects. | 8242 // Representation of a slow alias as part of a sloppy arguments objects. |
| 8243 // For fast aliases (if HasSloppyArgumentsElements()): | 8243 // For fast aliases (if HasSloppyArgumentsElements()): |
| 8244 // - the parameter map contains an index into the context | 8244 // - the parameter map contains an index into the context |
| 8245 // - all attributes of the element have default values | 8245 // - all attributes of the element have default values |
| 8246 // For slow aliases (if HasDictionaryArgumentsElements()): | 8246 // For slow aliases (if HasDictionaryArgumentsElements()): |
| 8247 // - the parameter map contains no fast alias mapping (i.e. the hole) | 8247 // - the parameter map contains no fast alias mapping (i.e. the hole) |
| 8248 // - this struct (in the slow backing store) contains an index into the context | 8248 // - this struct (in the slow backing store) contains an index into the context |
| 8249 // - all attributes are available as part if the property details | 8249 // - all attributes are available as part if the property details |
| 8250 class AliasedArgumentsEntry: public Struct { | 8250 class AliasedArgumentsEntry: public Struct { /* POSTMORTEM */ |
| 8251 public: | 8251 public: |
| 8252 inline int aliased_context_slot() const; | 8252 inline int aliased_context_slot() const; |
| 8253 inline void set_aliased_context_slot(int count); | 8253 inline void set_aliased_context_slot(int count); |
| 8254 | 8254 |
| 8255 DECLARE_CAST(AliasedArgumentsEntry) | 8255 DECLARE_CAST(AliasedArgumentsEntry) |
| 8256 | 8256 |
| 8257 // Dispatched behavior. | 8257 // Dispatched behavior. |
| 8258 DECLARE_PRINTER(AliasedArgumentsEntry) | 8258 DECLARE_PRINTER(AliasedArgumentsEntry) |
| 8259 DECLARE_VERIFIER(AliasedArgumentsEntry) | 8259 DECLARE_VERIFIER(AliasedArgumentsEntry) |
| 8260 | 8260 |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8944 // truncating the original string. | 8944 // truncating the original string. |
| 8945 MUST_USE_RESULT static Handle<String> Truncate(Handle<SeqString> string, | 8945 MUST_USE_RESULT static Handle<String> Truncate(Handle<SeqString> string, |
| 8946 int new_length); | 8946 int new_length); |
| 8947 private: | 8947 private: |
| 8948 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString); | 8948 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString); |
| 8949 }; | 8949 }; |
| 8950 | 8950 |
| 8951 | 8951 |
| 8952 // The OneByteString class captures sequential one-byte string objects. | 8952 // The OneByteString class captures sequential one-byte string objects. |
| 8953 // Each character in the OneByteString is an one-byte character. | 8953 // Each character in the OneByteString is an one-byte character. |
| 8954 class SeqOneByteString: public SeqString { | 8954 class SeqOneByteString: public SeqString { /* POSTMORTEM */ |
| 8955 public: | 8955 public: |
| 8956 static const bool kHasOneByteEncoding = true; | 8956 static const bool kHasOneByteEncoding = true; |
| 8957 | 8957 |
| 8958 // Dispatched behavior. | 8958 // Dispatched behavior. |
| 8959 inline uint16_t SeqOneByteStringGet(int index); | 8959 inline uint16_t SeqOneByteStringGet(int index); |
| 8960 inline void SeqOneByteStringSet(int index, uint16_t value); | 8960 inline void SeqOneByteStringSet(int index, uint16_t value); |
| 8961 | 8961 |
| 8962 // Get the address of the characters in this string. | 8962 // Get the address of the characters in this string. |
| 8963 inline Address GetCharsAddress(); | 8963 inline Address GetCharsAddress(); |
| 8964 | 8964 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 8980 static const int kMaxSize = 512 * MB - 1; | 8980 static const int kMaxSize = 512 * MB - 1; |
| 8981 STATIC_ASSERT((kMaxSize - kHeaderSize) >= String::kMaxLength); | 8981 STATIC_ASSERT((kMaxSize - kHeaderSize) >= String::kMaxLength); |
| 8982 | 8982 |
| 8983 private: | 8983 private: |
| 8984 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString); | 8984 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString); |
| 8985 }; | 8985 }; |
| 8986 | 8986 |
| 8987 | 8987 |
| 8988 // The TwoByteString class captures sequential unicode string objects. | 8988 // The TwoByteString class captures sequential unicode string objects. |
| 8989 // Each character in the TwoByteString is a two-byte uint16_t. | 8989 // Each character in the TwoByteString is a two-byte uint16_t. |
| 8990 class SeqTwoByteString: public SeqString { | 8990 class SeqTwoByteString: public SeqString { /* POSTMORTEM */ |
| 8991 public: | 8991 public: |
| 8992 static const bool kHasOneByteEncoding = false; | 8992 static const bool kHasOneByteEncoding = false; |
| 8993 | 8993 |
| 8994 // Dispatched behavior. | 8994 // Dispatched behavior. |
| 8995 inline uint16_t SeqTwoByteStringGet(int index); | 8995 inline uint16_t SeqTwoByteStringGet(int index); |
| 8996 inline void SeqTwoByteStringSet(int index, uint16_t value); | 8996 inline void SeqTwoByteStringSet(int index, uint16_t value); |
| 8997 | 8997 |
| 8998 // Get the address of the characters in this string. | 8998 // Get the address of the characters in this string. |
| 8999 inline Address GetCharsAddress(); | 8999 inline Address GetCharsAddress(); |
| 9000 | 9000 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 9026 | 9026 |
| 9027 | 9027 |
| 9028 // The ConsString class describes string values built by using the | 9028 // The ConsString class describes string values built by using the |
| 9029 // addition operator on strings. A ConsString is a pair where the | 9029 // addition operator on strings. A ConsString is a pair where the |
| 9030 // first and second components are pointers to other string values. | 9030 // first and second components are pointers to other string values. |
| 9031 // One or both components of a ConsString can be pointers to other | 9031 // One or both components of a ConsString can be pointers to other |
| 9032 // ConsStrings, creating a binary tree of ConsStrings where the leaves | 9032 // ConsStrings, creating a binary tree of ConsStrings where the leaves |
| 9033 // are non-ConsString string values. The string value represented by | 9033 // are non-ConsString string values. The string value represented by |
| 9034 // a ConsString can be obtained by concatenating the leaf string | 9034 // a ConsString can be obtained by concatenating the leaf string |
| 9035 // values in a left-to-right depth-first traversal of the tree. | 9035 // values in a left-to-right depth-first traversal of the tree. |
| 9036 class ConsString: public String { | 9036 class ConsString: public String { /* POSTMORTEM */ |
| 9037 public: | 9037 public: |
| 9038 // First string of the cons cell. | 9038 // First string of the cons cell. |
| 9039 inline String* first(); | 9039 inline String* first(); |
| 9040 // Doesn't check that the result is a string, even in debug mode. This is | 9040 // Doesn't check that the result is a string, even in debug mode. This is |
| 9041 // useful during GC where the mark bits confuse the checks. | 9041 // useful during GC where the mark bits confuse the checks. |
| 9042 inline Object* unchecked_first(); | 9042 inline Object* unchecked_first(); |
| 9043 inline void set_first(String* first, | 9043 inline void set_first(String* first, |
| 9044 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 9044 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| 9045 | 9045 |
| 9046 // Second string of the cons cell. | 9046 // Second string of the cons cell. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9079 // a substring. A Sliced String is described as a pointer to the parent, | 9079 // a substring. A Sliced String is described as a pointer to the parent, |
| 9080 // the offset from the start of the parent string and the length. Using | 9080 // the offset from the start of the parent string and the length. Using |
| 9081 // a Sliced String therefore requires unpacking of the parent string and | 9081 // a Sliced String therefore requires unpacking of the parent string and |
| 9082 // adding the offset to the start address. A substring of a Sliced String | 9082 // adding the offset to the start address. A substring of a Sliced String |
| 9083 // are not nested since the double indirection is simplified when creating | 9083 // are not nested since the double indirection is simplified when creating |
| 9084 // such a substring. | 9084 // such a substring. |
| 9085 // Currently missing features are: | 9085 // Currently missing features are: |
| 9086 // - handling externalized parent strings | 9086 // - handling externalized parent strings |
| 9087 // - external strings as parent | 9087 // - external strings as parent |
| 9088 // - truncating sliced string to enable otherwise unneeded parent to be GC'ed. | 9088 // - truncating sliced string to enable otherwise unneeded parent to be GC'ed. |
| 9089 class SlicedString: public String { | 9089 class SlicedString: public String { /* POSTMORTEM */ |
| 9090 public: | 9090 public: |
| 9091 inline String* parent(); | 9091 inline String* parent(); |
| 9092 inline void set_parent(String* parent, | 9092 inline void set_parent(String* parent, |
| 9093 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 9093 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| 9094 inline int offset() const; | 9094 inline int offset() const; |
| 9095 inline void set_offset(int offset); | 9095 inline void set_offset(int offset); |
| 9096 | 9096 |
| 9097 // Dispatched behavior. | 9097 // Dispatched behavior. |
| 9098 uint16_t SlicedStringGet(int index); | 9098 uint16_t SlicedStringGet(int index); |
| 9099 | 9099 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 9120 | 9120 |
| 9121 // The ExternalString class describes string values that are backed by | 9121 // The ExternalString class describes string values that are backed by |
| 9122 // a string resource that lies outside the V8 heap. ExternalStrings | 9122 // a string resource that lies outside the V8 heap. ExternalStrings |
| 9123 // consist of the length field common to all strings, a pointer to the | 9123 // consist of the length field common to all strings, a pointer to the |
| 9124 // external resource. It is important to ensure (externally) that the | 9124 // external resource. It is important to ensure (externally) that the |
| 9125 // resource is not deallocated while the ExternalString is live in the | 9125 // resource is not deallocated while the ExternalString is live in the |
| 9126 // V8 heap. | 9126 // V8 heap. |
| 9127 // | 9127 // |
| 9128 // The API expects that all ExternalStrings are created through the | 9128 // The API expects that all ExternalStrings are created through the |
| 9129 // API. Therefore, ExternalStrings should not be used internally. | 9129 // API. Therefore, ExternalStrings should not be used internally. |
| 9130 class ExternalString: public String { | 9130 class ExternalString: public String { /* POSTMORTEM */ |
| 9131 public: | 9131 public: |
| 9132 DECLARE_CAST(ExternalString) | 9132 DECLARE_CAST(ExternalString) |
| 9133 | 9133 |
| 9134 // Layout description. | 9134 // Layout description. |
| 9135 static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize); | 9135 static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize); |
| 9136 static const int kShortSize = kResourceOffset + kPointerSize; | 9136 static const int kShortSize = kResourceOffset + kPointerSize; |
| 9137 static const int kResourceDataOffset = kResourceOffset + kPointerSize; | 9137 static const int kResourceDataOffset = kResourceOffset + kPointerSize; |
| 9138 static const int kSize = kResourceDataOffset + kPointerSize; | 9138 static const int kSize = kResourceDataOffset + kPointerSize; |
| 9139 | 9139 |
| 9140 static const int kMaxShortLength = | 9140 static const int kMaxShortLength = |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9181 template <typename StaticVisitor> | 9181 template <typename StaticVisitor> |
| 9182 inline void ExternalOneByteStringIterateBody(); | 9182 inline void ExternalOneByteStringIterateBody(); |
| 9183 | 9183 |
| 9184 private: | 9184 private: |
| 9185 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalOneByteString); | 9185 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalOneByteString); |
| 9186 }; | 9186 }; |
| 9187 | 9187 |
| 9188 | 9188 |
| 9189 // The ExternalTwoByteString class is an external string backed by a UTF-16 | 9189 // The ExternalTwoByteString class is an external string backed by a UTF-16 |
| 9190 // encoded string. | 9190 // encoded string. |
| 9191 class ExternalTwoByteString: public ExternalString { | 9191 class ExternalTwoByteString: public ExternalString { /* POSTMORTEM */ |
| 9192 public: | 9192 public: |
| 9193 static const bool kHasOneByteEncoding = false; | 9193 static const bool kHasOneByteEncoding = false; |
| 9194 | 9194 |
| 9195 typedef v8::String::ExternalStringResource Resource; | 9195 typedef v8::String::ExternalStringResource Resource; |
| 9196 | 9196 |
| 9197 // The underlying string resource. | 9197 // The underlying string resource. |
| 9198 inline const Resource* resource(); | 9198 inline const Resource* resource(); |
| 9199 inline void set_resource(const Resource* buffer); | 9199 inline void set_resource(const Resource* buffer); |
| 9200 | 9200 |
| 9201 // Update the pointer cache to the external character array. | 9201 // Update the pointer cache to the external character array. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9348 explicit VectorIterator(Vector<const T> data) : data_(data), index_(0) { } | 9348 explicit VectorIterator(Vector<const T> data) : data_(data), index_(0) { } |
| 9349 T GetNext() { return data_[index_++]; } | 9349 T GetNext() { return data_[index_++]; } |
| 9350 bool has_more() { return index_ < data_.length(); } | 9350 bool has_more() { return index_ < data_.length(); } |
| 9351 private: | 9351 private: |
| 9352 Vector<const T> data_; | 9352 Vector<const T> data_; |
| 9353 int index_; | 9353 int index_; |
| 9354 }; | 9354 }; |
| 9355 | 9355 |
| 9356 | 9356 |
| 9357 // The Oddball describes objects null, undefined, true, and false. | 9357 // The Oddball describes objects null, undefined, true, and false. |
| 9358 class Oddball: public HeapObject { | 9358 class Oddball: public HeapObject { /* POSTMORTEM */ |
| 9359 public: | 9359 public: |
| 9360 // [to_string]: Cached to_string computed at startup. | 9360 // [to_string]: Cached to_string computed at startup. |
| 9361 DECL_ACCESSORS(to_string, String) | 9361 DECL_ACCESSORS(to_string, String) |
| 9362 | 9362 |
| 9363 // [to_number]: Cached to_number computed at startup. | 9363 // [to_number]: Cached to_number computed at startup. |
| 9364 DECL_ACCESSORS(to_number, Object) | 9364 DECL_ACCESSORS(to_number, Object) |
| 9365 | 9365 |
| 9366 // [typeof]: Cached type_of computed at startup. | 9366 // [typeof]: Cached type_of computed at startup. |
| 9367 DECL_ACCESSORS(type_of, String) | 9367 DECL_ACCESSORS(type_of, String) |
| 9368 | 9368 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9405 | 9405 |
| 9406 STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset); | 9406 STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset); |
| 9407 STATIC_ASSERT(kNull == Internals::kNullOddballKind); | 9407 STATIC_ASSERT(kNull == Internals::kNullOddballKind); |
| 9408 STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind); | 9408 STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind); |
| 9409 | 9409 |
| 9410 private: | 9410 private: |
| 9411 DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball); | 9411 DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball); |
| 9412 }; | 9412 }; |
| 9413 | 9413 |
| 9414 | 9414 |
| 9415 class Cell: public HeapObject { | 9415 class Cell: public HeapObject { /* POSTMORTEM */ |
| 9416 public: | 9416 public: |
| 9417 // [value]: value of the cell. | 9417 // [value]: value of the cell. |
| 9418 DECL_ACCESSORS(value, Object) | 9418 DECL_ACCESSORS(value, Object) |
| 9419 | 9419 |
| 9420 DECLARE_CAST(Cell) | 9420 DECLARE_CAST(Cell) |
| 9421 | 9421 |
| 9422 static inline Cell* FromValueAddress(Address value) { | 9422 static inline Cell* FromValueAddress(Address value) { |
| 9423 Object* result = FromAddress(value - kValueOffset); | 9423 Object* result = FromAddress(value - kValueOffset); |
| 9424 return static_cast<Cell*>(result); | 9424 return static_cast<Cell*>(result); |
| 9425 } | 9425 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9527 static const int kSize = kNextOffset + kPointerSize; | 9527 static const int kSize = kNextOffset + kPointerSize; |
| 9528 | 9528 |
| 9529 typedef FixedBodyDescriptor<kValueOffset, kSize, kSize> BodyDescriptor; | 9529 typedef FixedBodyDescriptor<kValueOffset, kSize, kSize> BodyDescriptor; |
| 9530 | 9530 |
| 9531 private: | 9531 private: |
| 9532 DISALLOW_IMPLICIT_CONSTRUCTORS(WeakCell); | 9532 DISALLOW_IMPLICIT_CONSTRUCTORS(WeakCell); |
| 9533 }; | 9533 }; |
| 9534 | 9534 |
| 9535 | 9535 |
| 9536 // The JSProxy describes EcmaScript Harmony proxies | 9536 // The JSProxy describes EcmaScript Harmony proxies |
| 9537 class JSProxy: public JSReceiver { | 9537 class JSProxy: public JSReceiver { /* POSTMORTEM */ |
| 9538 public: | 9538 public: |
| 9539 // [handler]: The handler property. | 9539 // [handler]: The handler property. |
| 9540 DECL_ACCESSORS(handler, Object) | 9540 DECL_ACCESSORS(handler, Object) |
| 9541 | 9541 |
| 9542 // [hash]: The hash code property (undefined if not initialized yet). | 9542 // [hash]: The hash code property (undefined if not initialized yet). |
| 9543 DECL_ACCESSORS(hash, Object) | 9543 DECL_ACCESSORS(hash, Object) |
| 9544 | 9544 |
| 9545 DECLARE_CAST(JSProxy) | 9545 DECLARE_CAST(JSProxy) |
| 9546 | 9546 |
| 9547 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( | 9547 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9612 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); | 9612 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); |
| 9613 | 9613 |
| 9614 MUST_USE_RESULT Object* GetIdentityHash(); | 9614 MUST_USE_RESULT Object* GetIdentityHash(); |
| 9615 | 9615 |
| 9616 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); | 9616 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy); |
| 9617 | 9617 |
| 9618 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); | 9618 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); |
| 9619 }; | 9619 }; |
| 9620 | 9620 |
| 9621 | 9621 |
| 9622 class JSFunctionProxy: public JSProxy { | 9622 class JSFunctionProxy: public JSProxy { /* POSTMORTEM */ |
| 9623 public: | 9623 public: |
| 9624 // [call_trap]: The call trap. | 9624 // [call_trap]: The call trap. |
| 9625 DECL_ACCESSORS(call_trap, JSReceiver) | 9625 DECL_ACCESSORS(call_trap, JSReceiver) |
| 9626 | 9626 |
| 9627 // [construct_trap]: The construct trap. | 9627 // [construct_trap]: The construct trap. |
| 9628 DECL_ACCESSORS(construct_trap, Object) | 9628 DECL_ACCESSORS(construct_trap, Object) |
| 9629 | 9629 |
| 9630 DECLARE_CAST(JSFunctionProxy) | 9630 DECLARE_CAST(JSFunctionProxy) |
| 9631 | 9631 |
| 9632 // Dispatched behavior. | 9632 // Dispatched behavior. |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 9644 | 9644 |
| 9645 typedef FixedBodyDescriptor<kHandlerOffset, | 9645 typedef FixedBodyDescriptor<kHandlerOffset, |
| 9646 kConstructTrapOffset + kPointerSize, | 9646 kConstructTrapOffset + kPointerSize, |
| 9647 kSize> BodyDescriptor; | 9647 kSize> BodyDescriptor; |
| 9648 | 9648 |
| 9649 private: | 9649 private: |
| 9650 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); | 9650 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); |
| 9651 }; | 9651 }; |
| 9652 | 9652 |
| 9653 | 9653 |
| 9654 class JSCollection : public JSObject { | 9654 class JSCollection : public JSObject { /* POSTMORTEM */ |
| 9655 public: | 9655 public: |
| 9656 // [table]: the backing hash table | 9656 // [table]: the backing hash table |
| 9657 DECL_ACCESSORS(table, Object) | 9657 DECL_ACCESSORS(table, Object) |
| 9658 | 9658 |
| 9659 static const int kTableOffset = JSObject::kHeaderSize; | 9659 static const int kTableOffset = JSObject::kHeaderSize; |
| 9660 static const int kSize = kTableOffset + kPointerSize; | 9660 static const int kSize = kTableOffset + kPointerSize; |
| 9661 | 9661 |
| 9662 private: | 9662 private: |
| 9663 DISALLOW_IMPLICIT_CONSTRUCTORS(JSCollection); | 9663 DISALLOW_IMPLICIT_CONSTRUCTORS(JSCollection); |
| 9664 }; | 9664 }; |
| 9665 | 9665 |
| 9666 | 9666 |
| 9667 // The JSSet describes EcmaScript Harmony sets | 9667 // The JSSet describes EcmaScript Harmony sets |
| 9668 class JSSet : public JSCollection { | 9668 class JSSet : public JSCollection { /* POSTMORTEM */ |
| 9669 public: | 9669 public: |
| 9670 DECLARE_CAST(JSSet) | 9670 DECLARE_CAST(JSSet) |
| 9671 | 9671 |
| 9672 static void Initialize(Handle<JSSet> set, Isolate* isolate); | 9672 static void Initialize(Handle<JSSet> set, Isolate* isolate); |
| 9673 static void Clear(Handle<JSSet> set); | 9673 static void Clear(Handle<JSSet> set); |
| 9674 | 9674 |
| 9675 // Dispatched behavior. | 9675 // Dispatched behavior. |
| 9676 DECLARE_PRINTER(JSSet) | 9676 DECLARE_PRINTER(JSSet) |
| 9677 DECLARE_VERIFIER(JSSet) | 9677 DECLARE_VERIFIER(JSSet) |
| 9678 | 9678 |
| 9679 private: | 9679 private: |
| 9680 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); | 9680 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); |
| 9681 }; | 9681 }; |
| 9682 | 9682 |
| 9683 | 9683 |
| 9684 // The JSMap describes EcmaScript Harmony maps | 9684 // The JSMap describes EcmaScript Harmony maps |
| 9685 class JSMap : public JSCollection { | 9685 class JSMap : public JSCollection { /* POSTMORTEM */ |
| 9686 public: | 9686 public: |
| 9687 DECLARE_CAST(JSMap) | 9687 DECLARE_CAST(JSMap) |
| 9688 | 9688 |
| 9689 static void Initialize(Handle<JSMap> map, Isolate* isolate); | 9689 static void Initialize(Handle<JSMap> map, Isolate* isolate); |
| 9690 static void Clear(Handle<JSMap> map); | 9690 static void Clear(Handle<JSMap> map); |
| 9691 | 9691 |
| 9692 // Dispatched behavior. | 9692 // Dispatched behavior. |
| 9693 DECLARE_PRINTER(JSMap) | 9693 DECLARE_PRINTER(JSMap) |
| 9694 DECLARE_VERIFIER(JSMap) | 9694 DECLARE_VERIFIER(JSMap) |
| 9695 | 9695 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9832 // Indices of in-object properties. | 9832 // Indices of in-object properties. |
| 9833 static const int kValueIndex = 0; | 9833 static const int kValueIndex = 0; |
| 9834 static const int kDoneIndex = 1; | 9834 static const int kDoneIndex = 1; |
| 9835 | 9835 |
| 9836 private: | 9836 private: |
| 9837 DISALLOW_IMPLICIT_CONSTRUCTORS(JSIteratorResult); | 9837 DISALLOW_IMPLICIT_CONSTRUCTORS(JSIteratorResult); |
| 9838 }; | 9838 }; |
| 9839 | 9839 |
| 9840 | 9840 |
| 9841 // Base class for both JSWeakMap and JSWeakSet | 9841 // Base class for both JSWeakMap and JSWeakSet |
| 9842 class JSWeakCollection: public JSObject { | 9842 class JSWeakCollection: public JSObject { /* POSTMORTEM */ |
| 9843 public: | 9843 public: |
| 9844 // [table]: the backing hash table mapping keys to values. | 9844 // [table]: the backing hash table mapping keys to values. |
| 9845 DECL_ACCESSORS(table, Object) | 9845 DECL_ACCESSORS(table, Object) |
| 9846 | 9846 |
| 9847 // [next]: linked list of encountered weak maps during GC. | 9847 // [next]: linked list of encountered weak maps during GC. |
| 9848 DECL_ACCESSORS(next, Object) | 9848 DECL_ACCESSORS(next, Object) |
| 9849 | 9849 |
| 9850 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate); | 9850 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate); |
| 9851 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key, | 9851 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key, |
| 9852 Handle<Object> value, int32_t hash); | 9852 Handle<Object> value, int32_t hash); |
| 9853 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key, | 9853 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key, |
| 9854 int32_t hash); | 9854 int32_t hash); |
| 9855 | 9855 |
| 9856 static const int kTableOffset = JSObject::kHeaderSize; | 9856 static const int kTableOffset = JSObject::kHeaderSize; |
| 9857 static const int kNextOffset = kTableOffset + kPointerSize; | 9857 static const int kNextOffset = kTableOffset + kPointerSize; |
| 9858 static const int kSize = kNextOffset + kPointerSize; | 9858 static const int kSize = kNextOffset + kPointerSize; |
| 9859 | 9859 |
| 9860 private: | 9860 private: |
| 9861 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection); | 9861 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection); |
| 9862 }; | 9862 }; |
| 9863 | 9863 |
| 9864 | 9864 |
| 9865 // The JSWeakMap describes EcmaScript Harmony weak maps | 9865 // The JSWeakMap describes EcmaScript Harmony weak maps |
| 9866 class JSWeakMap: public JSWeakCollection { | 9866 class JSWeakMap: public JSWeakCollection { /* POSTMORTEM */ |
| 9867 public: | 9867 public: |
| 9868 DECLARE_CAST(JSWeakMap) | 9868 DECLARE_CAST(JSWeakMap) |
| 9869 | 9869 |
| 9870 // Dispatched behavior. | 9870 // Dispatched behavior. |
| 9871 DECLARE_PRINTER(JSWeakMap) | 9871 DECLARE_PRINTER(JSWeakMap) |
| 9872 DECLARE_VERIFIER(JSWeakMap) | 9872 DECLARE_VERIFIER(JSWeakMap) |
| 9873 | 9873 |
| 9874 private: | 9874 private: |
| 9875 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakMap); | 9875 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakMap); |
| 9876 }; | 9876 }; |
| 9877 | 9877 |
| 9878 | 9878 |
| 9879 // The JSWeakSet describes EcmaScript Harmony weak sets | 9879 // The JSWeakSet describes EcmaScript Harmony weak sets |
| 9880 class JSWeakSet: public JSWeakCollection { | 9880 class JSWeakSet: public JSWeakCollection { /* POSTMORTEM */ |
| 9881 public: | 9881 public: |
| 9882 DECLARE_CAST(JSWeakSet) | 9882 DECLARE_CAST(JSWeakSet) |
| 9883 | 9883 |
| 9884 // Dispatched behavior. | 9884 // Dispatched behavior. |
| 9885 DECLARE_PRINTER(JSWeakSet) | 9885 DECLARE_PRINTER(JSWeakSet) |
| 9886 DECLARE_VERIFIER(JSWeakSet) | 9886 DECLARE_VERIFIER(JSWeakSet) |
| 9887 | 9887 |
| 9888 private: | 9888 private: |
| 9889 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakSet); | 9889 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakSet); |
| 9890 }; | 9890 }; |
| 9891 | 9891 |
| 9892 | 9892 |
| 9893 // Whether a JSArrayBuffer is a SharedArrayBuffer or not. | 9893 // Whether a JSArrayBuffer is a SharedArrayBuffer or not. |
| 9894 enum class SharedFlag { kNotShared, kShared }; | 9894 enum class SharedFlag { kNotShared, kShared }; |
| 9895 | 9895 |
| 9896 | 9896 |
| 9897 class JSArrayBuffer: public JSObject { | 9897 class JSArrayBuffer: public JSObject { /* POSTMORTEM */ |
| 9898 public: | 9898 public: |
| 9899 // [backing_store]: backing memory for this array | 9899 // [backing_store]: backing memory for this array |
| 9900 DECL_ACCESSORS(backing_store, void) | 9900 DECL_ACCESSORS(backing_store, void) |
| 9901 | 9901 |
| 9902 // [byte_length]: length in bytes | 9902 // [byte_length]: length in bytes |
| 9903 DECL_ACCESSORS(byte_length, Object) | 9903 DECL_ACCESSORS(byte_length, Object) |
| 9904 | 9904 |
| 9905 inline uint32_t bit_field() const; | 9905 inline uint32_t bit_field() const; |
| 9906 inline void set_bit_field(uint32_t bits); | 9906 inline void set_bit_field(uint32_t bits); |
| 9907 | 9907 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9961 class IsExternal : public BitField<bool, 1, 1> {}; | 9961 class IsExternal : public BitField<bool, 1, 1> {}; |
| 9962 class IsNeuterable : public BitField<bool, 2, 1> {}; | 9962 class IsNeuterable : public BitField<bool, 2, 1> {}; |
| 9963 class WasNeutered : public BitField<bool, 3, 1> {}; | 9963 class WasNeutered : public BitField<bool, 3, 1> {}; |
| 9964 class IsShared : public BitField<bool, 4, 1> {}; | 9964 class IsShared : public BitField<bool, 4, 1> {}; |
| 9965 | 9965 |
| 9966 private: | 9966 private: |
| 9967 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 9967 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
| 9968 }; | 9968 }; |
| 9969 | 9969 |
| 9970 | 9970 |
| 9971 class JSArrayBufferView: public JSObject { | 9971 class JSArrayBufferView: public JSObject { /* POSTMORTEM */ |
| 9972 public: | 9972 public: |
| 9973 // [buffer]: ArrayBuffer that this typed array views. | 9973 // [buffer]: ArrayBuffer that this typed array views. |
| 9974 DECL_ACCESSORS(buffer, Object) | 9974 DECL_ACCESSORS(buffer, Object) |
| 9975 | 9975 |
| 9976 // [byte_offset]: offset of typed array in bytes. | 9976 // [byte_offset]: offset of typed array in bytes. |
| 9977 DECL_ACCESSORS(byte_offset, Object) | 9977 DECL_ACCESSORS(byte_offset, Object) |
| 9978 | 9978 |
| 9979 // [byte_length]: length of typed array in bytes. | 9979 // [byte_length]: length of typed array in bytes. |
| 9980 DECL_ACCESSORS(byte_length, Object) | 9980 DECL_ACCESSORS(byte_length, Object) |
| 9981 | 9981 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 9993 private: | 9993 private: |
| 9994 #ifdef VERIFY_HEAP | 9994 #ifdef VERIFY_HEAP |
| 9995 DECL_ACCESSORS(raw_byte_offset, Object) | 9995 DECL_ACCESSORS(raw_byte_offset, Object) |
| 9996 DECL_ACCESSORS(raw_byte_length, Object) | 9996 DECL_ACCESSORS(raw_byte_length, Object) |
| 9997 #endif | 9997 #endif |
| 9998 | 9998 |
| 9999 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBufferView); | 9999 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBufferView); |
| 10000 }; | 10000 }; |
| 10001 | 10001 |
| 10002 | 10002 |
| 10003 class JSTypedArray: public JSArrayBufferView { | 10003 class JSTypedArray: public JSArrayBufferView { /* POSTMORTEM */ |
| 10004 public: | 10004 public: |
| 10005 // [length]: length of typed array in elements. | 10005 // [length]: length of typed array in elements. |
| 10006 DECL_ACCESSORS(length, Object) | 10006 DECL_ACCESSORS(length, Object) |
| 10007 inline uint32_t length_value() const; | 10007 inline uint32_t length_value() const; |
| 10008 | 10008 |
| 10009 DECLARE_CAST(JSTypedArray) | 10009 DECLARE_CAST(JSTypedArray) |
| 10010 | 10010 |
| 10011 ExternalArrayType type(); | 10011 ExternalArrayType type(); |
| 10012 size_t element_size(); | 10012 size_t element_size(); |
| 10013 | 10013 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 10027 static Handle<JSArrayBuffer> MaterializeArrayBuffer( | 10027 static Handle<JSArrayBuffer> MaterializeArrayBuffer( |
| 10028 Handle<JSTypedArray> typed_array); | 10028 Handle<JSTypedArray> typed_array); |
| 10029 #ifdef VERIFY_HEAP | 10029 #ifdef VERIFY_HEAP |
| 10030 DECL_ACCESSORS(raw_length, Object) | 10030 DECL_ACCESSORS(raw_length, Object) |
| 10031 #endif | 10031 #endif |
| 10032 | 10032 |
| 10033 DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray); | 10033 DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray); |
| 10034 }; | 10034 }; |
| 10035 | 10035 |
| 10036 | 10036 |
| 10037 class JSDataView: public JSArrayBufferView { | 10037 class JSDataView: public JSArrayBufferView { /* POSTMORTEM */ |
| 10038 public: | 10038 public: |
| 10039 DECLARE_CAST(JSDataView) | 10039 DECLARE_CAST(JSDataView) |
| 10040 | 10040 |
| 10041 // Dispatched behavior. | 10041 // Dispatched behavior. |
| 10042 DECLARE_PRINTER(JSDataView) | 10042 DECLARE_PRINTER(JSDataView) |
| 10043 DECLARE_VERIFIER(JSDataView) | 10043 DECLARE_VERIFIER(JSDataView) |
| 10044 | 10044 |
| 10045 static const int kSize = kViewSize; | 10045 static const int kSize = kViewSize; |
| 10046 | 10046 |
| 10047 static const int kSizeWithInternalFields = | 10047 static const int kSizeWithInternalFields = |
| 10048 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; | 10048 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; |
| 10049 | 10049 |
| 10050 private: | 10050 private: |
| 10051 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); | 10051 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); |
| 10052 }; | 10052 }; |
| 10053 | 10053 |
| 10054 | 10054 |
| 10055 // Foreign describes objects pointing from JavaScript to C structures. | 10055 // Foreign describes objects pointing from JavaScript to C structures. |
| 10056 class Foreign: public HeapObject { | 10056 class Foreign: public HeapObject { /* POSTMORTEM */ |
| 10057 public: | 10057 public: |
| 10058 // [address]: field containing the address. | 10058 // [address]: field containing the address. |
| 10059 inline Address foreign_address(); | 10059 inline Address foreign_address(); |
| 10060 inline void set_foreign_address(Address value); | 10060 inline void set_foreign_address(Address value); |
| 10061 | 10061 |
| 10062 DECLARE_CAST(Foreign) | 10062 DECLARE_CAST(Foreign) |
| 10063 | 10063 |
| 10064 // Dispatched behavior. | 10064 // Dispatched behavior. |
| 10065 inline void ForeignIterateBody(ObjectVisitor* v); | 10065 inline void ForeignIterateBody(ObjectVisitor* v); |
| 10066 | 10066 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 10081 private: | 10081 private: |
| 10082 DISALLOW_IMPLICIT_CONSTRUCTORS(Foreign); | 10082 DISALLOW_IMPLICIT_CONSTRUCTORS(Foreign); |
| 10083 }; | 10083 }; |
| 10084 | 10084 |
| 10085 | 10085 |
| 10086 // The JSArray describes JavaScript Arrays | 10086 // The JSArray describes JavaScript Arrays |
| 10087 // Such an array can be in one of two modes: | 10087 // Such an array can be in one of two modes: |
| 10088 // - fast, backing storage is a FixedArray and length <= elements.length(); | 10088 // - fast, backing storage is a FixedArray and length <= elements.length(); |
| 10089 // Please note: push and pop can be used to grow and shrink the array. | 10089 // Please note: push and pop can be used to grow and shrink the array. |
| 10090 // - slow, backing storage is a HashTable with numbers as keys. | 10090 // - slow, backing storage is a HashTable with numbers as keys. |
| 10091 class JSArray: public JSObject { | 10091 class JSArray: public JSObject { /* POSTMORTEM */ |
| 10092 public: | 10092 public: |
| 10093 // [length]: The length property. | 10093 // [length]: The length property. |
| 10094 DECL_ACCESSORS(length, Object) | 10094 DECL_ACCESSORS(length, Object) |
| 10095 | 10095 |
| 10096 // Overload the length setter to skip write barrier when the length | 10096 // Overload the length setter to skip write barrier when the length |
| 10097 // is set to a smi. This matches the set function on FixedArray. | 10097 // is set to a smi. This matches the set function on FixedArray. |
| 10098 inline void set_length(Smi* length); | 10098 inline void set_length(Smi* length); |
| 10099 | 10099 |
| 10100 static bool HasReadOnlyLength(Handle<JSArray> array); | 10100 static bool HasReadOnlyLength(Handle<JSArray> array); |
| 10101 static bool WouldChangeReadOnlyLength(Handle<JSArray> array, uint32_t index); | 10101 static bool WouldChangeReadOnlyLength(Handle<JSArray> array, uint32_t index); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10162 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context, | 10162 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context, |
| 10163 Handle<Map> initial_map); | 10163 Handle<Map> initial_map); |
| 10164 | 10164 |
| 10165 | 10165 |
| 10166 // JSRegExpResult is just a JSArray with a specific initial map. | 10166 // JSRegExpResult is just a JSArray with a specific initial map. |
| 10167 // This initial map adds in-object properties for "index" and "input" | 10167 // This initial map adds in-object properties for "index" and "input" |
| 10168 // properties, as assigned by RegExp.prototype.exec, which allows | 10168 // properties, as assigned by RegExp.prototype.exec, which allows |
| 10169 // faster creation of RegExp exec results. | 10169 // faster creation of RegExp exec results. |
| 10170 // This class just holds constants used when creating the result. | 10170 // This class just holds constants used when creating the result. |
| 10171 // After creation the result must be treated as a JSArray in all regards. | 10171 // After creation the result must be treated as a JSArray in all regards. |
| 10172 class JSRegExpResult: public JSArray { | 10172 class JSRegExpResult: public JSArray { /* POSTMORTEM */ |
| 10173 public: | 10173 public: |
| 10174 // Offsets of object fields. | 10174 // Offsets of object fields. |
| 10175 static const int kIndexOffset = JSArray::kSize; | 10175 static const int kIndexOffset = JSArray::kSize; |
| 10176 static const int kInputOffset = kIndexOffset + kPointerSize; | 10176 static const int kInputOffset = kIndexOffset + kPointerSize; |
| 10177 static const int kSize = kInputOffset + kPointerSize; | 10177 static const int kSize = kInputOffset + kPointerSize; |
| 10178 // Indices of in-object properties. | 10178 // Indices of in-object properties. |
| 10179 static const int kIndexIndex = 0; | 10179 static const int kIndexIndex = 0; |
| 10180 static const int kInputIndex = 1; | 10180 static const int kInputIndex = 1; |
| 10181 private: | 10181 private: |
| 10182 DISALLOW_IMPLICIT_CONSTRUCTORS(JSRegExpResult); | 10182 DISALLOW_IMPLICIT_CONSTRUCTORS(JSRegExpResult); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10238 | 10238 |
| 10239 // An accessor must have a getter, but can have no setter. | 10239 // An accessor must have a getter, but can have no setter. |
| 10240 // | 10240 // |
| 10241 // When setting a property, V8 searches accessors in prototypes. | 10241 // When setting a property, V8 searches accessors in prototypes. |
| 10242 // If an accessor was found and it does not have a setter, | 10242 // If an accessor was found and it does not have a setter, |
| 10243 // the request is ignored. | 10243 // the request is ignored. |
| 10244 // | 10244 // |
| 10245 // If the accessor in the prototype has the READ_ONLY property attribute, then | 10245 // If the accessor in the prototype has the READ_ONLY property attribute, then |
| 10246 // a new value is added to the derived object when the property is set. | 10246 // a new value is added to the derived object when the property is set. |
| 10247 // This shadows the accessor in the prototype. | 10247 // This shadows the accessor in the prototype. |
| 10248 class ExecutableAccessorInfo: public AccessorInfo { | 10248 class ExecutableAccessorInfo: public AccessorInfo { /* POSTMORTEM */ |
| 10249 public: | 10249 public: |
| 10250 DECL_ACCESSORS(getter, Object) | 10250 DECL_ACCESSORS(getter, Object) |
| 10251 DECL_ACCESSORS(setter, Object) | 10251 DECL_ACCESSORS(setter, Object) |
| 10252 DECL_ACCESSORS(data, Object) | 10252 DECL_ACCESSORS(data, Object) |
| 10253 | 10253 |
| 10254 DECLARE_CAST(ExecutableAccessorInfo) | 10254 DECLARE_CAST(ExecutableAccessorInfo) |
| 10255 | 10255 |
| 10256 // Dispatched behavior. | 10256 // Dispatched behavior. |
| 10257 DECLARE_PRINTER(ExecutableAccessorInfo) | 10257 DECLARE_PRINTER(ExecutableAccessorInfo) |
| 10258 DECLARE_VERIFIER(ExecutableAccessorInfo) | 10258 DECLARE_VERIFIER(ExecutableAccessorInfo) |
| 10259 | 10259 |
| 10260 static const int kGetterOffset = AccessorInfo::kSize; | 10260 static const int kGetterOffset = AccessorInfo::kSize; |
| 10261 static const int kSetterOffset = kGetterOffset + kPointerSize; | 10261 static const int kSetterOffset = kGetterOffset + kPointerSize; |
| 10262 static const int kDataOffset = kSetterOffset + kPointerSize; | 10262 static const int kDataOffset = kSetterOffset + kPointerSize; |
| 10263 static const int kSize = kDataOffset + kPointerSize; | 10263 static const int kSize = kDataOffset + kPointerSize; |
| 10264 | 10264 |
| 10265 static void ClearSetter(Handle<ExecutableAccessorInfo> info); | 10265 static void ClearSetter(Handle<ExecutableAccessorInfo> info); |
| 10266 | 10266 |
| 10267 private: | 10267 private: |
| 10268 DISALLOW_IMPLICIT_CONSTRUCTORS(ExecutableAccessorInfo); | 10268 DISALLOW_IMPLICIT_CONSTRUCTORS(ExecutableAccessorInfo); |
| 10269 }; | 10269 }; |
| 10270 | 10270 |
| 10271 | 10271 |
| 10272 // Support for JavaScript accessors: A pair of a getter and a setter. Each | 10272 // Support for JavaScript accessors: A pair of a getter and a setter. Each |
| 10273 // accessor can either be | 10273 // accessor can either be |
| 10274 // * a pointer to a JavaScript function or proxy: a real accessor | 10274 // * a pointer to a JavaScript function or proxy: a real accessor |
| 10275 // * undefined: considered an accessor by the spec, too, strangely enough | 10275 // * undefined: considered an accessor by the spec, too, strangely enough |
| 10276 // * the hole: an accessor which has not been set | 10276 // * the hole: an accessor which has not been set |
| 10277 // * a pointer to a map: a transition used to ensure map sharing | 10277 // * a pointer to a map: a transition used to ensure map sharing |
| 10278 class AccessorPair: public Struct { | 10278 class AccessorPair: public Struct { /* POSTMORTEM */ |
| 10279 public: | 10279 public: |
| 10280 DECL_ACCESSORS(getter, Object) | 10280 DECL_ACCESSORS(getter, Object) |
| 10281 DECL_ACCESSORS(setter, Object) | 10281 DECL_ACCESSORS(setter, Object) |
| 10282 | 10282 |
| 10283 DECLARE_CAST(AccessorPair) | 10283 DECLARE_CAST(AccessorPair) |
| 10284 | 10284 |
| 10285 static Handle<AccessorPair> Copy(Handle<AccessorPair> pair); | 10285 static Handle<AccessorPair> Copy(Handle<AccessorPair> pair); |
| 10286 | 10286 |
| 10287 inline Object* get(AccessorComponent component); | 10287 inline Object* get(AccessorComponent component); |
| 10288 inline void set(AccessorComponent component, Object* value); | 10288 inline void set(AccessorComponent component, Object* value); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 10311 // requires us to consider undefined as a kind of accessor, too: | 10311 // requires us to consider undefined as a kind of accessor, too: |
| 10312 // var obj = {}; | 10312 // var obj = {}; |
| 10313 // Object.defineProperty(obj, "foo", {get: undefined}); | 10313 // Object.defineProperty(obj, "foo", {get: undefined}); |
| 10314 // assertTrue("foo" in obj); | 10314 // assertTrue("foo" in obj); |
| 10315 inline bool IsJSAccessor(Object* obj); | 10315 inline bool IsJSAccessor(Object* obj); |
| 10316 | 10316 |
| 10317 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorPair); | 10317 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorPair); |
| 10318 }; | 10318 }; |
| 10319 | 10319 |
| 10320 | 10320 |
| 10321 class AccessCheckInfo: public Struct { | 10321 class AccessCheckInfo: public Struct { /* POSTMORTEM */ |
| 10322 public: | 10322 public: |
| 10323 DECL_ACCESSORS(named_callback, Object) | 10323 DECL_ACCESSORS(named_callback, Object) |
| 10324 DECL_ACCESSORS(indexed_callback, Object) | 10324 DECL_ACCESSORS(indexed_callback, Object) |
| 10325 DECL_ACCESSORS(callback, Object) | 10325 DECL_ACCESSORS(callback, Object) |
| 10326 DECL_ACCESSORS(data, Object) | 10326 DECL_ACCESSORS(data, Object) |
| 10327 | 10327 |
| 10328 DECLARE_CAST(AccessCheckInfo) | 10328 DECLARE_CAST(AccessCheckInfo) |
| 10329 | 10329 |
| 10330 // Dispatched behavior. | 10330 // Dispatched behavior. |
| 10331 DECLARE_PRINTER(AccessCheckInfo) | 10331 DECLARE_PRINTER(AccessCheckInfo) |
| 10332 DECLARE_VERIFIER(AccessCheckInfo) | 10332 DECLARE_VERIFIER(AccessCheckInfo) |
| 10333 | 10333 |
| 10334 static const int kNamedCallbackOffset = HeapObject::kHeaderSize; | 10334 static const int kNamedCallbackOffset = HeapObject::kHeaderSize; |
| 10335 static const int kIndexedCallbackOffset = kNamedCallbackOffset + kPointerSize; | 10335 static const int kIndexedCallbackOffset = kNamedCallbackOffset + kPointerSize; |
| 10336 static const int kCallbackOffset = kIndexedCallbackOffset + kPointerSize; | 10336 static const int kCallbackOffset = kIndexedCallbackOffset + kPointerSize; |
| 10337 static const int kDataOffset = kCallbackOffset + kPointerSize; | 10337 static const int kDataOffset = kCallbackOffset + kPointerSize; |
| 10338 static const int kSize = kDataOffset + kPointerSize; | 10338 static const int kSize = kDataOffset + kPointerSize; |
| 10339 | 10339 |
| 10340 private: | 10340 private: |
| 10341 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); | 10341 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); |
| 10342 }; | 10342 }; |
| 10343 | 10343 |
| 10344 | 10344 |
| 10345 class InterceptorInfo: public Struct { | 10345 class InterceptorInfo: public Struct { /* POSTMORTEM */ |
| 10346 public: | 10346 public: |
| 10347 DECL_ACCESSORS(getter, Object) | 10347 DECL_ACCESSORS(getter, Object) |
| 10348 DECL_ACCESSORS(setter, Object) | 10348 DECL_ACCESSORS(setter, Object) |
| 10349 DECL_ACCESSORS(query, Object) | 10349 DECL_ACCESSORS(query, Object) |
| 10350 DECL_ACCESSORS(deleter, Object) | 10350 DECL_ACCESSORS(deleter, Object) |
| 10351 DECL_ACCESSORS(enumerator, Object) | 10351 DECL_ACCESSORS(enumerator, Object) |
| 10352 DECL_ACCESSORS(data, Object) | 10352 DECL_ACCESSORS(data, Object) |
| 10353 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols) | 10353 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols) |
| 10354 DECL_BOOLEAN_ACCESSORS(all_can_read) | 10354 DECL_BOOLEAN_ACCESSORS(all_can_read) |
| 10355 DECL_BOOLEAN_ACCESSORS(non_masking) | 10355 DECL_BOOLEAN_ACCESSORS(non_masking) |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 10374 | 10374 |
| 10375 static const int kCanInterceptSymbolsBit = 0; | 10375 static const int kCanInterceptSymbolsBit = 0; |
| 10376 static const int kAllCanReadBit = 1; | 10376 static const int kAllCanReadBit = 1; |
| 10377 static const int kNonMasking = 2; | 10377 static const int kNonMasking = 2; |
| 10378 | 10378 |
| 10379 private: | 10379 private: |
| 10380 DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo); | 10380 DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo); |
| 10381 }; | 10381 }; |
| 10382 | 10382 |
| 10383 | 10383 |
| 10384 class CallHandlerInfo: public Struct { | 10384 class CallHandlerInfo: public Struct { /* POSTMORTEM */ |
| 10385 public: | 10385 public: |
| 10386 DECL_ACCESSORS(callback, Object) | 10386 DECL_ACCESSORS(callback, Object) |
| 10387 DECL_ACCESSORS(data, Object) | 10387 DECL_ACCESSORS(data, Object) |
| 10388 | 10388 |
| 10389 DECLARE_CAST(CallHandlerInfo) | 10389 DECLARE_CAST(CallHandlerInfo) |
| 10390 | 10390 |
| 10391 // Dispatched behavior. | 10391 // Dispatched behavior. |
| 10392 DECLARE_PRINTER(CallHandlerInfo) | 10392 DECLARE_PRINTER(CallHandlerInfo) |
| 10393 DECLARE_VERIFIER(CallHandlerInfo) | 10393 DECLARE_VERIFIER(CallHandlerInfo) |
| 10394 | 10394 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 10418 kPropertyListOffset + kPointerSize; | 10418 kPropertyListOffset + kPointerSize; |
| 10419 static const int kPropertyIntrinsicsOffset = | 10419 static const int kPropertyIntrinsicsOffset = |
| 10420 kPropertyAccessorsOffset + kPointerSize; | 10420 kPropertyAccessorsOffset + kPointerSize; |
| 10421 static const int kHeaderSize = kPropertyIntrinsicsOffset + kPointerSize; | 10421 static const int kHeaderSize = kPropertyIntrinsicsOffset + kPointerSize; |
| 10422 | 10422 |
| 10423 private: | 10423 private: |
| 10424 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); | 10424 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); |
| 10425 }; | 10425 }; |
| 10426 | 10426 |
| 10427 | 10427 |
| 10428 class FunctionTemplateInfo: public TemplateInfo { | 10428 class FunctionTemplateInfo: public TemplateInfo { /* POSTMORTEM */ |
| 10429 public: | 10429 public: |
| 10430 DECL_ACCESSORS(serial_number, Object) | 10430 DECL_ACCESSORS(serial_number, Object) |
| 10431 DECL_ACCESSORS(call_code, Object) | 10431 DECL_ACCESSORS(call_code, Object) |
| 10432 DECL_ACCESSORS(prototype_template, Object) | 10432 DECL_ACCESSORS(prototype_template, Object) |
| 10433 DECL_ACCESSORS(parent_template, Object) | 10433 DECL_ACCESSORS(parent_template, Object) |
| 10434 DECL_ACCESSORS(named_property_handler, Object) | 10434 DECL_ACCESSORS(named_property_handler, Object) |
| 10435 DECL_ACCESSORS(indexed_property_handler, Object) | 10435 DECL_ACCESSORS(indexed_property_handler, Object) |
| 10436 DECL_ACCESSORS(instance_template, Object) | 10436 DECL_ACCESSORS(instance_template, Object) |
| 10437 DECL_ACCESSORS(class_name, Object) | 10437 DECL_ACCESSORS(class_name, Object) |
| 10438 DECL_ACCESSORS(signature, Object) | 10438 DECL_ACCESSORS(signature, Object) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10498 static const int kReadOnlyPrototypeBit = 3; | 10498 static const int kReadOnlyPrototypeBit = 3; |
| 10499 static const int kRemovePrototypeBit = 4; | 10499 static const int kRemovePrototypeBit = 4; |
| 10500 static const int kDoNotCacheBit = 5; | 10500 static const int kDoNotCacheBit = 5; |
| 10501 static const int kInstantiatedBit = 6; | 10501 static const int kInstantiatedBit = 6; |
| 10502 static const int kAcceptAnyReceiver = 7; | 10502 static const int kAcceptAnyReceiver = 7; |
| 10503 | 10503 |
| 10504 DISALLOW_IMPLICIT_CONSTRUCTORS(FunctionTemplateInfo); | 10504 DISALLOW_IMPLICIT_CONSTRUCTORS(FunctionTemplateInfo); |
| 10505 }; | 10505 }; |
| 10506 | 10506 |
| 10507 | 10507 |
| 10508 class ObjectTemplateInfo: public TemplateInfo { | 10508 class ObjectTemplateInfo: public TemplateInfo { /* POSTMORTEM */ |
| 10509 public: | 10509 public: |
| 10510 DECL_ACCESSORS(constructor, Object) | 10510 DECL_ACCESSORS(constructor, Object) |
| 10511 DECL_ACCESSORS(internal_field_count, Object) | 10511 DECL_ACCESSORS(internal_field_count, Object) |
| 10512 | 10512 |
| 10513 DECLARE_CAST(ObjectTemplateInfo) | 10513 DECLARE_CAST(ObjectTemplateInfo) |
| 10514 | 10514 |
| 10515 // Dispatched behavior. | 10515 // Dispatched behavior. |
| 10516 DECLARE_PRINTER(ObjectTemplateInfo) | 10516 DECLARE_PRINTER(ObjectTemplateInfo) |
| 10517 DECLARE_VERIFIER(ObjectTemplateInfo) | 10517 DECLARE_VERIFIER(ObjectTemplateInfo) |
| 10518 | 10518 |
| 10519 static const int kConstructorOffset = TemplateInfo::kHeaderSize; | 10519 static const int kConstructorOffset = TemplateInfo::kHeaderSize; |
| 10520 static const int kInternalFieldCountOffset = | 10520 static const int kInternalFieldCountOffset = |
| 10521 kConstructorOffset + kPointerSize; | 10521 kConstructorOffset + kPointerSize; |
| 10522 static const int kSize = kInternalFieldCountOffset + kPointerSize; | 10522 static const int kSize = kInternalFieldCountOffset + kPointerSize; |
| 10523 }; | 10523 }; |
| 10524 | 10524 |
| 10525 | 10525 |
| 10526 class TypeSwitchInfo: public Struct { | 10526 class TypeSwitchInfo: public Struct { /* POSTMORTEM */ |
| 10527 public: | 10527 public: |
| 10528 DECL_ACCESSORS(types, Object) | 10528 DECL_ACCESSORS(types, Object) |
| 10529 | 10529 |
| 10530 DECLARE_CAST(TypeSwitchInfo) | 10530 DECLARE_CAST(TypeSwitchInfo) |
| 10531 | 10531 |
| 10532 // Dispatched behavior. | 10532 // Dispatched behavior. |
| 10533 DECLARE_PRINTER(TypeSwitchInfo) | 10533 DECLARE_PRINTER(TypeSwitchInfo) |
| 10534 DECLARE_VERIFIER(TypeSwitchInfo) | 10534 DECLARE_VERIFIER(TypeSwitchInfo) |
| 10535 | 10535 |
| 10536 static const int kTypesOffset = Struct::kHeaderSize; | 10536 static const int kTypesOffset = Struct::kHeaderSize; |
| 10537 static const int kSize = kTypesOffset + kPointerSize; | 10537 static const int kSize = kTypesOffset + kPointerSize; |
| 10538 }; | 10538 }; |
| 10539 | 10539 |
| 10540 | 10540 |
| 10541 // The DebugInfo class holds additional information for a function being | 10541 // The DebugInfo class holds additional information for a function being |
| 10542 // debugged. | 10542 // debugged. |
| 10543 class DebugInfo: public Struct { | 10543 class DebugInfo: public Struct { /* POSTMORTEM */ |
| 10544 public: | 10544 public: |
| 10545 // The shared function info for the source being debugged. | 10545 // The shared function info for the source being debugged. |
| 10546 DECL_ACCESSORS(shared, SharedFunctionInfo) | 10546 DECL_ACCESSORS(shared, SharedFunctionInfo) |
| 10547 // Code object for the patched code. This code object is the code object | 10547 // Code object for the patched code. This code object is the code object |
| 10548 // currently active for the function. | 10548 // currently active for the function. |
| 10549 DECL_ACCESSORS(code, Code) | 10549 DECL_ACCESSORS(code, Code) |
| 10550 // Fixed array holding status information for each active break point. | 10550 // Fixed array holding status information for each active break point. |
| 10551 DECL_ACCESSORS(break_points, FixedArray) | 10551 DECL_ACCESSORS(break_points, FixedArray) |
| 10552 | 10552 |
| 10553 // Check if there is a break point at a code position. | 10553 // Check if there is a break point at a code position. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10589 // Lookup the index in the break_points array for a code position. | 10589 // Lookup the index in the break_points array for a code position. |
| 10590 int GetBreakPointInfoIndex(int code_position); | 10590 int GetBreakPointInfoIndex(int code_position); |
| 10591 | 10591 |
| 10592 DISALLOW_IMPLICIT_CONSTRUCTORS(DebugInfo); | 10592 DISALLOW_IMPLICIT_CONSTRUCTORS(DebugInfo); |
| 10593 }; | 10593 }; |
| 10594 | 10594 |
| 10595 | 10595 |
| 10596 // The BreakPointInfo class holds information for break points set in a | 10596 // The BreakPointInfo class holds information for break points set in a |
| 10597 // function. The DebugInfo object holds a BreakPointInfo object for each code | 10597 // function. The DebugInfo object holds a BreakPointInfo object for each code |
| 10598 // position with one or more break points. | 10598 // position with one or more break points. |
| 10599 class BreakPointInfo: public Struct { | 10599 class BreakPointInfo: public Struct { /* POSTMORTEM */ |
| 10600 public: | 10600 public: |
| 10601 // The position in the code for the break point. | 10601 // The position in the code for the break point. |
| 10602 DECL_INT_ACCESSORS(code_position) | 10602 DECL_INT_ACCESSORS(code_position) |
| 10603 // The position in the source for the break position. | 10603 // The position in the source for the break position. |
| 10604 DECL_INT_ACCESSORS(source_position) | 10604 DECL_INT_ACCESSORS(source_position) |
| 10605 // The position in the source for the last statement before this break | 10605 // The position in the source for the last statement before this break |
| 10606 // position. | 10606 // position. |
| 10607 DECL_INT_ACCESSORS(statement_position) | 10607 DECL_INT_ACCESSORS(statement_position) |
| 10608 // List of related JavaScript break points. | 10608 // List of related JavaScript break points. |
| 10609 DECL_ACCESSORS(break_point_objects, Object) | 10609 DECL_ACCESSORS(break_point_objects, Object) |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10759 } | 10759 } |
| 10760 return value; | 10760 return value; |
| 10761 } | 10761 } |
| 10762 }; | 10762 }; |
| 10763 | 10763 |
| 10764 | 10764 |
| 10765 } // NOLINT, false-positive due to second-order macros. | 10765 } // NOLINT, false-positive due to second-order macros. |
| 10766 } // NOLINT, false-positive due to second-order macros. | 10766 } // NOLINT, false-positive due to second-order macros. |
| 10767 | 10767 |
| 10768 #endif // V8_OBJECTS_H_ | 10768 #endif // V8_OBJECTS_H_ |
| OLD | NEW |