Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 600 } | 600 } |
| 601 inline Object* ToObjectUnchecked() { | 601 inline Object* ToObjectUnchecked() { |
| 602 ASSERT(!IsFailure()); | 602 ASSERT(!IsFailure()); |
| 603 return reinterpret_cast<Object*>(this); | 603 return reinterpret_cast<Object*>(this); |
| 604 } | 604 } |
| 605 inline Object* ToObjectChecked() { | 605 inline Object* ToObjectChecked() { |
| 606 CHECK(!IsFailure()); | 606 CHECK(!IsFailure()); |
| 607 return reinterpret_cast<Object*>(this); | 607 return reinterpret_cast<Object*>(this); |
| 608 } | 608 } |
| 609 | 609 |
| 610 #ifdef OBJECT_PRINT | |
| 611 // Prints this object with details. | |
| 612 void Print(FILE* out = stdout); | |
|
Søren Thygesen Gjesse
2010/12/17 13:44:04
The Google C++ Style Guide does not allow default
| |
| 613 void PrintLn(FILE* out = stdout); | |
| 614 #endif | |
| 610 #ifdef DEBUG | 615 #ifdef DEBUG |
| 611 // Prints this object with details. | |
| 612 void Print(); | |
| 613 void PrintLn(); | |
| 614 // Verifies the object. | 616 // Verifies the object. |
| 615 void Verify(); | 617 void Verify(); |
| 616 #endif | 618 #endif |
| 617 }; | 619 }; |
| 618 | 620 |
| 619 // Object is the abstract superclass for all classes in the | 621 // Object is the abstract superclass for all classes in the |
| 620 // object hierarchy. | 622 // object hierarchy. |
| 621 // Object does not use any virtual functions to avoid the | 623 // Object does not use any virtual functions to avoid the |
| 622 // allocation of the C++ vtable. | 624 // allocation of the C++ vtable. |
| 623 // Since Smi and Failure are subclasses of Object no | 625 // Since Smi and Failure are subclasses of Object no |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 755 // Returns true if this is a JSValue containing a string and the index is | 757 // Returns true if this is a JSValue containing a string and the index is |
| 756 // < the length of the string. Used to implement [] on strings. | 758 // < the length of the string. Used to implement [] on strings. |
| 757 inline bool IsStringObjectWithCharacterAt(uint32_t index); | 759 inline bool IsStringObjectWithCharacterAt(uint32_t index); |
| 758 | 760 |
| 759 #ifdef DEBUG | 761 #ifdef DEBUG |
| 760 // Verify a pointer is a valid object pointer. | 762 // Verify a pointer is a valid object pointer. |
| 761 static void VerifyPointer(Object* p); | 763 static void VerifyPointer(Object* p); |
| 762 #endif | 764 #endif |
| 763 | 765 |
| 764 // Prints this object without details. | 766 // Prints this object without details. |
| 765 void ShortPrint(); | 767 void ShortPrint(FILE* out = stdout); |
| 766 | 768 |
| 767 // Prints this object without details to a message accumulator. | 769 // Prints this object without details to a message accumulator. |
| 768 void ShortPrint(StringStream* accumulator); | 770 void ShortPrint(StringStream* accumulator); |
| 769 | 771 |
| 770 // Casting: This cast is only needed to satisfy macros in objects-inl.h. | 772 // Casting: This cast is only needed to satisfy macros in objects-inl.h. |
| 771 static Object* cast(Object* value) { return value; } | 773 static Object* cast(Object* value) { return value; } |
| 772 | 774 |
| 773 // Layout description. | 775 // Layout description. |
| 774 static const int kHeaderSize = 0; // Object does not take up any space. | 776 static const int kHeaderSize = 0; // Object does not take up any space. |
| 775 | 777 |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 794 | 796 |
| 795 static inline Smi* FromIntptr(intptr_t value); | 797 static inline Smi* FromIntptr(intptr_t value); |
| 796 | 798 |
| 797 // Returns whether value can be represented in a Smi. | 799 // Returns whether value can be represented in a Smi. |
| 798 static inline bool IsValid(intptr_t value); | 800 static inline bool IsValid(intptr_t value); |
| 799 | 801 |
| 800 // Casting. | 802 // Casting. |
| 801 static inline Smi* cast(Object* object); | 803 static inline Smi* cast(Object* object); |
| 802 | 804 |
| 803 // Dispatched behavior. | 805 // Dispatched behavior. |
| 804 void SmiPrint(); | 806 void SmiPrint(FILE* out = stdout); |
| 805 void SmiPrint(StringStream* accumulator); | 807 void SmiPrint(StringStream* accumulator); |
| 806 #ifdef DEBUG | 808 #ifdef DEBUG |
| 807 void SmiVerify(); | 809 void SmiVerify(); |
| 808 #endif | 810 #endif |
| 809 | 811 |
| 810 static const int kMinValue = (-1 << (kSmiValueSize - 1)); | 812 static const int kMinValue = (-1 << (kSmiValueSize - 1)); |
| 811 static const int kMaxValue = -(kMinValue + 1); | 813 static const int kMaxValue = -(kMinValue + 1); |
| 812 | 814 |
| 813 private: | 815 private: |
| 814 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); | 816 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 863 | 865 |
| 864 static inline Failure* RetryAfterGC(AllocationSpace space); | 866 static inline Failure* RetryAfterGC(AllocationSpace space); |
| 865 static inline Failure* RetryAfterGC(); // NEW_SPACE | 867 static inline Failure* RetryAfterGC(); // NEW_SPACE |
| 866 static inline Failure* Exception(); | 868 static inline Failure* Exception(); |
| 867 static inline Failure* InternalError(); | 869 static inline Failure* InternalError(); |
| 868 static inline Failure* OutOfMemoryException(); | 870 static inline Failure* OutOfMemoryException(); |
| 869 // Casting. | 871 // Casting. |
| 870 static inline Failure* cast(MaybeObject* object); | 872 static inline Failure* cast(MaybeObject* object); |
| 871 | 873 |
| 872 // Dispatched behavior. | 874 // Dispatched behavior. |
| 873 void FailurePrint(); | 875 void FailurePrint(FILE* out); |
| 874 void FailurePrint(StringStream* accumulator); | 876 void FailurePrint(StringStream* accumulator); |
| 875 #ifdef DEBUG | 877 #ifdef DEBUG |
| 876 void FailureVerify(); | 878 void FailureVerify(); |
| 877 #endif | 879 #endif |
| 878 | 880 |
| 879 private: | 881 private: |
| 880 inline intptr_t value() const; | 882 inline intptr_t value() const; |
| 881 static inline Failure* Construct(Type type, intptr_t value = 0); | 883 static inline Failure* Construct(Type type, intptr_t value = 0); |
| 882 | 884 |
| 883 DISALLOW_IMPLICIT_CONSTRUCTORS(Failure); | 885 DISALLOW_IMPLICIT_CONSTRUCTORS(Failure); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1092 | 1094 |
| 1093 // Return the write barrier mode for this. Callers of this function | 1095 // Return the write barrier mode for this. Callers of this function |
| 1094 // must be able to present a reference to an AssertNoAllocation | 1096 // must be able to present a reference to an AssertNoAllocation |
| 1095 // object as a sign that they are not going to use this function | 1097 // object as a sign that they are not going to use this function |
| 1096 // from code that allocates and thus invalidates the returned write | 1098 // from code that allocates and thus invalidates the returned write |
| 1097 // barrier mode. | 1099 // barrier mode. |
| 1098 inline WriteBarrierMode GetWriteBarrierMode(const AssertNoAllocation&); | 1100 inline WriteBarrierMode GetWriteBarrierMode(const AssertNoAllocation&); |
| 1099 | 1101 |
| 1100 // Dispatched behavior. | 1102 // Dispatched behavior. |
| 1101 void HeapObjectShortPrint(StringStream* accumulator); | 1103 void HeapObjectShortPrint(StringStream* accumulator); |
| 1104 #ifdef OBJECT_PRINT | |
| 1105 void HeapObjectPrint(FILE* out = stdout); | |
| 1106 #endif | |
| 1102 #ifdef DEBUG | 1107 #ifdef DEBUG |
| 1103 void HeapObjectPrint(); | |
| 1104 void HeapObjectVerify(); | 1108 void HeapObjectVerify(); |
| 1105 inline void VerifyObjectField(int offset); | 1109 inline void VerifyObjectField(int offset); |
| 1106 inline void VerifySmiField(int offset); | 1110 inline void VerifySmiField(int offset); |
| 1111 #endif | |
| 1107 | 1112 |
| 1108 void PrintHeader(const char* id); | 1113 #ifdef OBJECT_PRINT |
| 1114 void PrintHeader(FILE* out, const char* id); | |
| 1115 #endif | |
| 1109 | 1116 |
| 1117 #ifdef DEBUG | |
| 1110 // Verify a pointer is a valid HeapObject pointer that points to object | 1118 // Verify a pointer is a valid HeapObject pointer that points to object |
| 1111 // areas in the heap. | 1119 // areas in the heap. |
| 1112 static void VerifyHeapPointer(Object* p); | 1120 static void VerifyHeapPointer(Object* p); |
| 1113 #endif | 1121 #endif |
| 1114 | 1122 |
| 1115 // Layout description. | 1123 // Layout description. |
| 1116 // First field in a heap object is map. | 1124 // First field in a heap object is map. |
| 1117 static const int kMapOffset = Object::kHeaderSize; | 1125 static const int kMapOffset = Object::kHeaderSize; |
| 1118 static const int kHeaderSize = kMapOffset + kPointerSize; | 1126 static const int kHeaderSize = kMapOffset + kPointerSize; |
| 1119 | 1127 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1182 public: | 1190 public: |
| 1183 // [value]: number value. | 1191 // [value]: number value. |
| 1184 inline double value(); | 1192 inline double value(); |
| 1185 inline void set_value(double value); | 1193 inline void set_value(double value); |
| 1186 | 1194 |
| 1187 // Casting. | 1195 // Casting. |
| 1188 static inline HeapNumber* cast(Object* obj); | 1196 static inline HeapNumber* cast(Object* obj); |
| 1189 | 1197 |
| 1190 // Dispatched behavior. | 1198 // Dispatched behavior. |
| 1191 Object* HeapNumberToBoolean(); | 1199 Object* HeapNumberToBoolean(); |
| 1192 void HeapNumberPrint(); | 1200 void HeapNumberPrint(FILE* out = stdout); |
| 1193 void HeapNumberPrint(StringStream* accumulator); | 1201 void HeapNumberPrint(StringStream* accumulator); |
| 1194 #ifdef DEBUG | 1202 #ifdef DEBUG |
| 1195 void HeapNumberVerify(); | 1203 void HeapNumberVerify(); |
| 1196 #endif | 1204 #endif |
| 1197 | 1205 |
| 1198 inline int get_exponent(); | 1206 inline int get_exponent(); |
| 1199 inline int get_sign(); | 1207 inline int get_sign(); |
| 1200 | 1208 |
| 1201 // Layout description. | 1209 // Layout description. |
| 1202 static const int kValueOffset = HeapObject::kHeaderSize; | 1210 static const int kValueOffset = HeapObject::kHeaderSize; |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1642 | 1650 |
| 1643 // Casting. | 1651 // Casting. |
| 1644 static inline JSObject* cast(Object* obj); | 1652 static inline JSObject* cast(Object* obj); |
| 1645 | 1653 |
| 1646 // Disalow further properties to be added to the object. | 1654 // Disalow further properties to be added to the object. |
| 1647 MUST_USE_RESULT MaybeObject* PreventExtensions(); | 1655 MUST_USE_RESULT MaybeObject* PreventExtensions(); |
| 1648 | 1656 |
| 1649 | 1657 |
| 1650 // Dispatched behavior. | 1658 // Dispatched behavior. |
| 1651 void JSObjectShortPrint(StringStream* accumulator); | 1659 void JSObjectShortPrint(StringStream* accumulator); |
| 1660 #ifdef OBJECT_PRINT | |
| 1661 void JSObjectPrint(FILE* out = stdout); | |
| 1662 #endif | |
| 1652 #ifdef DEBUG | 1663 #ifdef DEBUG |
| 1653 void JSObjectPrint(); | |
| 1654 void JSObjectVerify(); | 1664 void JSObjectVerify(); |
| 1655 void PrintProperties(); | 1665 #endif |
| 1656 void PrintElements(); | 1666 #ifdef OBJECT_PRINT |
| 1667 void PrintProperties(FILE* out = stdout); | |
| 1668 void PrintElements(FILE* out = stdout); | |
| 1669 #endif | |
| 1657 | 1670 |
| 1671 #ifdef DEBUG | |
| 1658 // Structure for collecting spill information about JSObjects. | 1672 // Structure for collecting spill information about JSObjects. |
| 1659 class SpillInformation { | 1673 class SpillInformation { |
| 1660 public: | 1674 public: |
| 1661 void Clear(); | 1675 void Clear(); |
| 1662 void Print(); | 1676 void Print(); |
| 1663 int number_of_objects_; | 1677 int number_of_objects_; |
| 1664 int number_of_objects_with_fast_properties_; | 1678 int number_of_objects_with_fast_properties_; |
| 1665 int number_of_objects_with_fast_elements_; | 1679 int number_of_objects_with_fast_elements_; |
| 1666 int number_of_fast_used_fields_; | 1680 int number_of_fast_used_fields_; |
| 1667 int number_of_fast_unused_fields_; | 1681 int number_of_fast_unused_fields_; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1828 static const int kHeaderSize = kLengthOffset + kPointerSize; | 1842 static const int kHeaderSize = kLengthOffset + kPointerSize; |
| 1829 | 1843 |
| 1830 // Maximal allowed size, in bytes, of a single FixedArray. | 1844 // Maximal allowed size, in bytes, of a single FixedArray. |
| 1831 // Prevents overflowing size computations, as well as extreme memory | 1845 // Prevents overflowing size computations, as well as extreme memory |
| 1832 // consumption. | 1846 // consumption. |
| 1833 static const int kMaxSize = 512 * MB; | 1847 static const int kMaxSize = 512 * MB; |
| 1834 // Maximally allowed length of a FixedArray. | 1848 // Maximally allowed length of a FixedArray. |
| 1835 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; | 1849 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; |
| 1836 | 1850 |
| 1837 // Dispatched behavior. | 1851 // Dispatched behavior. |
| 1852 #ifdef OBJECT_PRINT | |
| 1853 void FixedArrayPrint(FILE* out = stdout); | |
| 1854 #endif | |
| 1838 #ifdef DEBUG | 1855 #ifdef DEBUG |
| 1839 void FixedArrayPrint(); | |
| 1840 void FixedArrayVerify(); | 1856 void FixedArrayVerify(); |
| 1841 // Checks if two FixedArrays have identical contents. | 1857 // Checks if two FixedArrays have identical contents. |
| 1842 bool IsEqualTo(FixedArray* other); | 1858 bool IsEqualTo(FixedArray* other); |
| 1843 #endif | 1859 #endif |
| 1844 | 1860 |
| 1845 // Swap two elements in a pair of arrays. If this array and the | 1861 // Swap two elements in a pair of arrays. If this array and the |
| 1846 // numbers array are the same object, the elements are only swapped | 1862 // numbers array are the same object, the elements are only swapped |
| 1847 // once. | 1863 // once. |
| 1848 void SwapPairs(FixedArray* numbers, int i, int j); | 1864 void SwapPairs(FixedArray* numbers, int i, int j); |
| 1849 | 1865 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2005 // Layout description. | 2021 // Layout description. |
| 2006 static const int kContentArrayOffset = FixedArray::kHeaderSize; | 2022 static const int kContentArrayOffset = FixedArray::kHeaderSize; |
| 2007 static const int kEnumerationIndexOffset = kContentArrayOffset + kPointerSize; | 2023 static const int kEnumerationIndexOffset = kContentArrayOffset + kPointerSize; |
| 2008 static const int kFirstOffset = kEnumerationIndexOffset + kPointerSize; | 2024 static const int kFirstOffset = kEnumerationIndexOffset + kPointerSize; |
| 2009 | 2025 |
| 2010 // Layout description for the bridge array. | 2026 // Layout description for the bridge array. |
| 2011 static const int kEnumCacheBridgeEnumOffset = FixedArray::kHeaderSize; | 2027 static const int kEnumCacheBridgeEnumOffset = FixedArray::kHeaderSize; |
| 2012 static const int kEnumCacheBridgeCacheOffset = | 2028 static const int kEnumCacheBridgeCacheOffset = |
| 2013 kEnumCacheBridgeEnumOffset + kPointerSize; | 2029 kEnumCacheBridgeEnumOffset + kPointerSize; |
| 2014 | 2030 |
| 2031 #ifdef OBJECT_PRINT | |
| 2032 // Print all the descriptors. | |
| 2033 void PrintDescriptors(FILE* out = stdout); | |
| 2034 #endif | |
| 2035 | |
| 2015 #ifdef DEBUG | 2036 #ifdef DEBUG |
| 2016 // Print all the descriptors. | |
| 2017 void PrintDescriptors(); | |
| 2018 | |
| 2019 // Is the descriptor array sorted and without duplicates? | 2037 // Is the descriptor array sorted and without duplicates? |
| 2020 bool IsSortedNoDuplicates(); | 2038 bool IsSortedNoDuplicates(); |
| 2021 | 2039 |
| 2022 // Are two DescriptorArrays equal? | 2040 // Are two DescriptorArrays equal? |
| 2023 bool IsEqualTo(DescriptorArray* other); | 2041 bool IsEqualTo(DescriptorArray* other); |
| 2024 #endif | 2042 #endif |
| 2025 | 2043 |
| 2026 // The maximum number of descriptors we want in a descriptor array (should | 2044 // The maximum number of descriptors we want in a descriptor array (should |
| 2027 // fit in a page). | 2045 // fit in a page). |
| 2028 static const int kMaxNumberOfDescriptors = 1024 + 512; | 2046 static const int kMaxNumberOfDescriptors = 1024 + 512; |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2389 int NextEnumerationIndex() { | 2407 int NextEnumerationIndex() { |
| 2390 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value(); | 2408 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value(); |
| 2391 } | 2409 } |
| 2392 | 2410 |
| 2393 // Returns a new array for dictionary usage. Might return Failure. | 2411 // Returns a new array for dictionary usage. Might return Failure. |
| 2394 MUST_USE_RESULT static MaybeObject* Allocate(int at_least_space_for); | 2412 MUST_USE_RESULT static MaybeObject* Allocate(int at_least_space_for); |
| 2395 | 2413 |
| 2396 // Ensure enough space for n additional elements. | 2414 // Ensure enough space for n additional elements. |
| 2397 MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key); | 2415 MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key); |
| 2398 | 2416 |
| 2399 #ifdef DEBUG | 2417 #ifdef OBJECT_PRINT |
| 2400 void Print(); | 2418 void Print(FILE* out = stdout); |
| 2401 #endif | 2419 #endif |
| 2402 // Returns the key (slow). | 2420 // Returns the key (slow). |
| 2403 Object* SlowReverseLookup(Object* value); | 2421 Object* SlowReverseLookup(Object* value); |
| 2404 | 2422 |
| 2405 // Sets the entry to (key, value) pair. | 2423 // Sets the entry to (key, value) pair. |
| 2406 inline void SetEntry(int entry, | 2424 inline void SetEntry(int entry, |
| 2407 Object* key, | 2425 Object* key, |
| 2408 Object* value, | 2426 Object* value, |
| 2409 PropertyDetails details); | 2427 PropertyDetails details); |
| 2410 | 2428 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2612 // Returns a pointer to the ByteArray object for a given data start address. | 2630 // Returns a pointer to the ByteArray object for a given data start address. |
| 2613 static inline ByteArray* FromDataStartAddress(Address address); | 2631 static inline ByteArray* FromDataStartAddress(Address address); |
| 2614 | 2632 |
| 2615 // Casting. | 2633 // Casting. |
| 2616 static inline ByteArray* cast(Object* obj); | 2634 static inline ByteArray* cast(Object* obj); |
| 2617 | 2635 |
| 2618 // Dispatched behavior. | 2636 // Dispatched behavior. |
| 2619 inline int ByteArraySize() { | 2637 inline int ByteArraySize() { |
| 2620 return SizeFor(this->length()); | 2638 return SizeFor(this->length()); |
| 2621 } | 2639 } |
| 2640 #ifdef OBJECT_PRINT | |
| 2641 void ByteArrayPrint(FILE* out = stdout); | |
| 2642 #endif | |
| 2622 #ifdef DEBUG | 2643 #ifdef DEBUG |
| 2623 void ByteArrayPrint(); | |
| 2624 void ByteArrayVerify(); | 2644 void ByteArrayVerify(); |
| 2625 #endif | 2645 #endif |
| 2626 | 2646 |
| 2627 // Layout description. | 2647 // Layout description. |
| 2628 // Length is smi tagged when it is stored. | 2648 // Length is smi tagged when it is stored. |
| 2629 static const int kLengthOffset = HeapObject::kHeaderSize; | 2649 static const int kLengthOffset = HeapObject::kHeaderSize; |
| 2630 static const int kHeaderSize = kLengthOffset + kPointerSize; | 2650 static const int kHeaderSize = kLengthOffset + kPointerSize; |
| 2631 | 2651 |
| 2632 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 2652 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
| 2633 | 2653 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 2662 inline uint8_t get(int index); | 2682 inline uint8_t get(int index); |
| 2663 inline void set(int index, uint8_t value); | 2683 inline void set(int index, uint8_t value); |
| 2664 | 2684 |
| 2665 // This accessor applies the correct conversion from Smi, HeapNumber and | 2685 // This accessor applies the correct conversion from Smi, HeapNumber and |
| 2666 // undefined and clamps the converted value between 0 and 255. | 2686 // undefined and clamps the converted value between 0 and 255. |
| 2667 Object* SetValue(uint32_t index, Object* value); | 2687 Object* SetValue(uint32_t index, Object* value); |
| 2668 | 2688 |
| 2669 // Casting. | 2689 // Casting. |
| 2670 static inline PixelArray* cast(Object* obj); | 2690 static inline PixelArray* cast(Object* obj); |
| 2671 | 2691 |
| 2692 #ifdef OBJECT_PRINT | |
| 2693 void PixelArrayPrint(FILE* out = stdout); | |
| 2694 #endif | |
| 2672 #ifdef DEBUG | 2695 #ifdef DEBUG |
| 2673 void PixelArrayPrint(); | |
| 2674 void PixelArrayVerify(); | 2696 void PixelArrayVerify(); |
| 2675 #endif // DEBUG | 2697 #endif // DEBUG |
| 2676 | 2698 |
| 2677 // Maximal acceptable length for a pixel array. | 2699 // Maximal acceptable length for a pixel array. |
| 2678 static const int kMaxLength = 0x3fffffff; | 2700 static const int kMaxLength = 0x3fffffff; |
| 2679 | 2701 |
| 2680 // PixelArray headers are not quadword aligned. | 2702 // PixelArray headers are not quadword aligned. |
| 2681 static const int kLengthOffset = HeapObject::kHeaderSize; | 2703 static const int kLengthOffset = HeapObject::kHeaderSize; |
| 2682 static const int kExternalPointerOffset = | 2704 static const int kExternalPointerOffset = |
| 2683 POINTER_SIZE_ALIGN(kLengthOffset + kIntSize); | 2705 POINTER_SIZE_ALIGN(kLengthOffset + kIntSize); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2734 inline int8_t get(int index); | 2756 inline int8_t get(int index); |
| 2735 inline void set(int index, int8_t value); | 2757 inline void set(int index, int8_t value); |
| 2736 | 2758 |
| 2737 // This accessor applies the correct conversion from Smi, HeapNumber | 2759 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2738 // and undefined. | 2760 // and undefined. |
| 2739 MaybeObject* SetValue(uint32_t index, Object* value); | 2761 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2740 | 2762 |
| 2741 // Casting. | 2763 // Casting. |
| 2742 static inline ExternalByteArray* cast(Object* obj); | 2764 static inline ExternalByteArray* cast(Object* obj); |
| 2743 | 2765 |
| 2766 #ifdef OBJECT_PRINT | |
| 2767 void ExternalByteArrayPrint(FILE* out = stdout); | |
| 2768 #endif | |
| 2744 #ifdef DEBUG | 2769 #ifdef DEBUG |
| 2745 void ExternalByteArrayPrint(); | |
| 2746 void ExternalByteArrayVerify(); | 2770 void ExternalByteArrayVerify(); |
| 2747 #endif // DEBUG | 2771 #endif // DEBUG |
| 2748 | 2772 |
| 2749 private: | 2773 private: |
| 2750 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalByteArray); | 2774 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalByteArray); |
| 2751 }; | 2775 }; |
| 2752 | 2776 |
| 2753 | 2777 |
| 2754 class ExternalUnsignedByteArray: public ExternalArray { | 2778 class ExternalUnsignedByteArray: public ExternalArray { |
| 2755 public: | 2779 public: |
| 2756 // Setter and getter. | 2780 // Setter and getter. |
| 2757 inline uint8_t get(int index); | 2781 inline uint8_t get(int index); |
| 2758 inline void set(int index, uint8_t value); | 2782 inline void set(int index, uint8_t value); |
| 2759 | 2783 |
| 2760 // This accessor applies the correct conversion from Smi, HeapNumber | 2784 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2761 // and undefined. | 2785 // and undefined. |
| 2762 MaybeObject* SetValue(uint32_t index, Object* value); | 2786 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2763 | 2787 |
| 2764 // Casting. | 2788 // Casting. |
| 2765 static inline ExternalUnsignedByteArray* cast(Object* obj); | 2789 static inline ExternalUnsignedByteArray* cast(Object* obj); |
| 2766 | 2790 |
| 2791 #ifdef OBJECT_PRINT | |
| 2792 void ExternalUnsignedByteArrayPrint(FILE* out = stdout); | |
| 2793 #endif | |
| 2767 #ifdef DEBUG | 2794 #ifdef DEBUG |
| 2768 void ExternalUnsignedByteArrayPrint(); | |
| 2769 void ExternalUnsignedByteArrayVerify(); | 2795 void ExternalUnsignedByteArrayVerify(); |
| 2770 #endif // DEBUG | 2796 #endif // DEBUG |
| 2771 | 2797 |
| 2772 private: | 2798 private: |
| 2773 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedByteArray); | 2799 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedByteArray); |
| 2774 }; | 2800 }; |
| 2775 | 2801 |
| 2776 | 2802 |
| 2777 class ExternalShortArray: public ExternalArray { | 2803 class ExternalShortArray: public ExternalArray { |
| 2778 public: | 2804 public: |
| 2779 // Setter and getter. | 2805 // Setter and getter. |
| 2780 inline int16_t get(int index); | 2806 inline int16_t get(int index); |
| 2781 inline void set(int index, int16_t value); | 2807 inline void set(int index, int16_t value); |
| 2782 | 2808 |
| 2783 // This accessor applies the correct conversion from Smi, HeapNumber | 2809 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2784 // and undefined. | 2810 // and undefined. |
| 2785 MaybeObject* SetValue(uint32_t index, Object* value); | 2811 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2786 | 2812 |
| 2787 // Casting. | 2813 // Casting. |
| 2788 static inline ExternalShortArray* cast(Object* obj); | 2814 static inline ExternalShortArray* cast(Object* obj); |
| 2789 | 2815 |
| 2816 #ifdef OBJECT_PRINT | |
| 2817 void ExternalShortArrayPrint(FILE* out = stdout); | |
| 2818 #endif | |
| 2790 #ifdef DEBUG | 2819 #ifdef DEBUG |
| 2791 void ExternalShortArrayPrint(); | |
| 2792 void ExternalShortArrayVerify(); | 2820 void ExternalShortArrayVerify(); |
| 2793 #endif // DEBUG | 2821 #endif // DEBUG |
| 2794 | 2822 |
| 2795 private: | 2823 private: |
| 2796 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalShortArray); | 2824 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalShortArray); |
| 2797 }; | 2825 }; |
| 2798 | 2826 |
| 2799 | 2827 |
| 2800 class ExternalUnsignedShortArray: public ExternalArray { | 2828 class ExternalUnsignedShortArray: public ExternalArray { |
| 2801 public: | 2829 public: |
| 2802 // Setter and getter. | 2830 // Setter and getter. |
| 2803 inline uint16_t get(int index); | 2831 inline uint16_t get(int index); |
| 2804 inline void set(int index, uint16_t value); | 2832 inline void set(int index, uint16_t value); |
| 2805 | 2833 |
| 2806 // This accessor applies the correct conversion from Smi, HeapNumber | 2834 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2807 // and undefined. | 2835 // and undefined. |
| 2808 MaybeObject* SetValue(uint32_t index, Object* value); | 2836 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2809 | 2837 |
| 2810 // Casting. | 2838 // Casting. |
| 2811 static inline ExternalUnsignedShortArray* cast(Object* obj); | 2839 static inline ExternalUnsignedShortArray* cast(Object* obj); |
| 2812 | 2840 |
| 2841 #ifdef OBJECT_PRINT | |
| 2842 void ExternalUnsignedShortArrayPrint(FILE* out = stdout); | |
| 2843 #endif | |
| 2813 #ifdef DEBUG | 2844 #ifdef DEBUG |
| 2814 void ExternalUnsignedShortArrayPrint(); | |
| 2815 void ExternalUnsignedShortArrayVerify(); | 2845 void ExternalUnsignedShortArrayVerify(); |
| 2816 #endif // DEBUG | 2846 #endif // DEBUG |
| 2817 | 2847 |
| 2818 private: | 2848 private: |
| 2819 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedShortArray); | 2849 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedShortArray); |
| 2820 }; | 2850 }; |
| 2821 | 2851 |
| 2822 | 2852 |
| 2823 class ExternalIntArray: public ExternalArray { | 2853 class ExternalIntArray: public ExternalArray { |
| 2824 public: | 2854 public: |
| 2825 // Setter and getter. | 2855 // Setter and getter. |
| 2826 inline int32_t get(int index); | 2856 inline int32_t get(int index); |
| 2827 inline void set(int index, int32_t value); | 2857 inline void set(int index, int32_t value); |
| 2828 | 2858 |
| 2829 // This accessor applies the correct conversion from Smi, HeapNumber | 2859 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2830 // and undefined. | 2860 // and undefined. |
| 2831 MaybeObject* SetValue(uint32_t index, Object* value); | 2861 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2832 | 2862 |
| 2833 // Casting. | 2863 // Casting. |
| 2834 static inline ExternalIntArray* cast(Object* obj); | 2864 static inline ExternalIntArray* cast(Object* obj); |
| 2835 | 2865 |
| 2866 #ifdef OBJECT_PRINT | |
| 2867 void ExternalIntArrayPrint(FILE* out = stdout); | |
| 2868 #endif | |
| 2836 #ifdef DEBUG | 2869 #ifdef DEBUG |
| 2837 void ExternalIntArrayPrint(); | |
| 2838 void ExternalIntArrayVerify(); | 2870 void ExternalIntArrayVerify(); |
| 2839 #endif // DEBUG | 2871 #endif // DEBUG |
| 2840 | 2872 |
| 2841 private: | 2873 private: |
| 2842 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalIntArray); | 2874 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalIntArray); |
| 2843 }; | 2875 }; |
| 2844 | 2876 |
| 2845 | 2877 |
| 2846 class ExternalUnsignedIntArray: public ExternalArray { | 2878 class ExternalUnsignedIntArray: public ExternalArray { |
| 2847 public: | 2879 public: |
| 2848 // Setter and getter. | 2880 // Setter and getter. |
| 2849 inline uint32_t get(int index); | 2881 inline uint32_t get(int index); |
| 2850 inline void set(int index, uint32_t value); | 2882 inline void set(int index, uint32_t value); |
| 2851 | 2883 |
| 2852 // This accessor applies the correct conversion from Smi, HeapNumber | 2884 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2853 // and undefined. | 2885 // and undefined. |
| 2854 MaybeObject* SetValue(uint32_t index, Object* value); | 2886 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2855 | 2887 |
| 2856 // Casting. | 2888 // Casting. |
| 2857 static inline ExternalUnsignedIntArray* cast(Object* obj); | 2889 static inline ExternalUnsignedIntArray* cast(Object* obj); |
| 2858 | 2890 |
| 2891 #ifdef OBJECT_PRINT | |
| 2892 void ExternalUnsignedIntArrayPrint(FILE* out = stdout); | |
| 2893 #endif | |
| 2859 #ifdef DEBUG | 2894 #ifdef DEBUG |
| 2860 void ExternalUnsignedIntArrayPrint(); | |
| 2861 void ExternalUnsignedIntArrayVerify(); | 2895 void ExternalUnsignedIntArrayVerify(); |
| 2862 #endif // DEBUG | 2896 #endif // DEBUG |
| 2863 | 2897 |
| 2864 private: | 2898 private: |
| 2865 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedIntArray); | 2899 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedIntArray); |
| 2866 }; | 2900 }; |
| 2867 | 2901 |
| 2868 | 2902 |
| 2869 class ExternalFloatArray: public ExternalArray { | 2903 class ExternalFloatArray: public ExternalArray { |
| 2870 public: | 2904 public: |
| 2871 // Setter and getter. | 2905 // Setter and getter. |
| 2872 inline float get(int index); | 2906 inline float get(int index); |
| 2873 inline void set(int index, float value); | 2907 inline void set(int index, float value); |
| 2874 | 2908 |
| 2875 // This accessor applies the correct conversion from Smi, HeapNumber | 2909 // This accessor applies the correct conversion from Smi, HeapNumber |
| 2876 // and undefined. | 2910 // and undefined. |
| 2877 MaybeObject* SetValue(uint32_t index, Object* value); | 2911 MaybeObject* SetValue(uint32_t index, Object* value); |
| 2878 | 2912 |
| 2879 // Casting. | 2913 // Casting. |
| 2880 static inline ExternalFloatArray* cast(Object* obj); | 2914 static inline ExternalFloatArray* cast(Object* obj); |
| 2881 | 2915 |
| 2916 #ifdef OBJECT_PRINT | |
| 2917 void ExternalFloatArrayPrint(FILE* out = stdout); | |
| 2918 #endif | |
| 2882 #ifdef DEBUG | 2919 #ifdef DEBUG |
| 2883 void ExternalFloatArrayPrint(); | |
| 2884 void ExternalFloatArrayVerify(); | 2920 void ExternalFloatArrayVerify(); |
| 2885 #endif // DEBUG | 2921 #endif // DEBUG |
| 2886 | 2922 |
| 2887 private: | 2923 private: |
| 2888 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); | 2924 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); |
| 2889 }; | 2925 }; |
| 2890 | 2926 |
| 2891 | 2927 |
| 2892 // DeoptimizationInputData is a fixed array used to hold the deoptimization | 2928 // DeoptimizationInputData is a fixed array used to hold the deoptimization |
| 2893 // data for code generated by the Hydrogen/Lithium compiler. It also | 2929 // data for code generated by the Hydrogen/Lithium compiler. It also |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2953 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; | 2989 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; |
| 2954 } | 2990 } |
| 2955 | 2991 |
| 2956 // Allocates a DeoptimizationInputData. | 2992 // Allocates a DeoptimizationInputData. |
| 2957 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, | 2993 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, |
| 2958 PretenureFlag pretenure); | 2994 PretenureFlag pretenure); |
| 2959 | 2995 |
| 2960 // Casting. | 2996 // Casting. |
| 2961 static inline DeoptimizationInputData* cast(Object* obj); | 2997 static inline DeoptimizationInputData* cast(Object* obj); |
| 2962 | 2998 |
| 2963 #ifdef DEBUG | 2999 #ifdef OBJECT_PRINT |
| 2964 void DeoptimizationInputDataPrint(); | 3000 void DeoptimizationInputDataPrint(FILE* out); |
| 2965 #endif | 3001 #endif |
| 2966 | 3002 |
| 2967 private: | 3003 private: |
| 2968 static int IndexForEntry(int i) { | 3004 static int IndexForEntry(int i) { |
| 2969 return kFirstDeoptEntryIndex + (i * kDeoptEntrySize); | 3005 return kFirstDeoptEntryIndex + (i * kDeoptEntrySize); |
| 2970 } | 3006 } |
| 2971 | 3007 |
| 2972 static int LengthFor(int entry_count) { | 3008 static int LengthFor(int entry_count) { |
| 2973 return IndexForEntry(entry_count); | 3009 return IndexForEntry(entry_count); |
| 2974 } | 3010 } |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 2992 return deopt_points * 2; | 3028 return deopt_points * 2; |
| 2993 } | 3029 } |
| 2994 | 3030 |
| 2995 // Allocates a DeoptimizationOutputData. | 3031 // Allocates a DeoptimizationOutputData. |
| 2996 MUST_USE_RESULT static MaybeObject* Allocate(int number_of_deopt_points, | 3032 MUST_USE_RESULT static MaybeObject* Allocate(int number_of_deopt_points, |
| 2997 PretenureFlag pretenure); | 3033 PretenureFlag pretenure); |
| 2998 | 3034 |
| 2999 // Casting. | 3035 // Casting. |
| 3000 static inline DeoptimizationOutputData* cast(Object* obj); | 3036 static inline DeoptimizationOutputData* cast(Object* obj); |
| 3001 | 3037 |
| 3002 #ifdef DEBUG | 3038 #ifdef OBJECT_PRINT |
| 3003 void DeoptimizationOutputDataPrint(); | 3039 void DeoptimizationOutputDataPrint(FILE* out); |
| 3004 #endif | 3040 #endif |
| 3005 }; | 3041 }; |
| 3006 | 3042 |
| 3007 | 3043 |
| 3008 // Code describes objects with on-the-fly generated machine code. | 3044 // Code describes objects with on-the-fly generated machine code. |
| 3009 class Code: public HeapObject { | 3045 class Code: public HeapObject { |
| 3010 public: | 3046 public: |
| 3011 // Opaque data type for encapsulating code flags like kind, inline | 3047 // Opaque data type for encapsulating code flags like kind, inline |
| 3012 // cache state, and arguments count. | 3048 // cache state, and arguments count. |
| 3013 // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that | 3049 // FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 3042 | 3078 |
| 3043 enum { | 3079 enum { |
| 3044 NUMBER_OF_KINDS = LAST_IC_KIND + 1 | 3080 NUMBER_OF_KINDS = LAST_IC_KIND + 1 |
| 3045 }; | 3081 }; |
| 3046 | 3082 |
| 3047 #ifdef ENABLE_DISASSEMBLER | 3083 #ifdef ENABLE_DISASSEMBLER |
| 3048 // Printing | 3084 // Printing |
| 3049 static const char* Kind2String(Kind kind); | 3085 static const char* Kind2String(Kind kind); |
| 3050 static const char* ICState2String(InlineCacheState state); | 3086 static const char* ICState2String(InlineCacheState state); |
| 3051 static const char* PropertyType2String(PropertyType type); | 3087 static const char* PropertyType2String(PropertyType type); |
| 3052 void Disassemble(const char* name); | 3088 void Disassemble(const char* name, FILE* out = stdout); |
| 3053 #endif // ENABLE_DISASSEMBLER | 3089 #endif // ENABLE_DISASSEMBLER |
| 3054 | 3090 |
| 3055 // [instruction_size]: Size of the native instructions | 3091 // [instruction_size]: Size of the native instructions |
| 3056 inline int instruction_size(); | 3092 inline int instruction_size(); |
| 3057 inline void set_instruction_size(int value); | 3093 inline void set_instruction_size(int value); |
| 3058 | 3094 |
| 3059 // [relocation_info]: Code relocation information | 3095 // [relocation_info]: Code relocation information |
| 3060 DECL_ACCESSORS(relocation_info, ByteArray) | 3096 DECL_ACCESSORS(relocation_info, ByteArray) |
| 3061 void InvalidateRelocation(); | 3097 void InvalidateRelocation(); |
| 3062 | 3098 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3235 | 3271 |
| 3236 // Casting. | 3272 // Casting. |
| 3237 static inline Code* cast(Object* obj); | 3273 static inline Code* cast(Object* obj); |
| 3238 | 3274 |
| 3239 // Dispatched behavior. | 3275 // Dispatched behavior. |
| 3240 int CodeSize() { return SizeFor(body_size()); } | 3276 int CodeSize() { return SizeFor(body_size()); } |
| 3241 inline void CodeIterateBody(ObjectVisitor* v); | 3277 inline void CodeIterateBody(ObjectVisitor* v); |
| 3242 | 3278 |
| 3243 template<typename StaticVisitor> | 3279 template<typename StaticVisitor> |
| 3244 inline void CodeIterateBody(); | 3280 inline void CodeIterateBody(); |
| 3281 #ifdef OBJECT_PRINT | |
| 3282 void CodePrint(FILE* out = stdout); | |
| 3283 #endif | |
| 3245 #ifdef DEBUG | 3284 #ifdef DEBUG |
| 3246 void CodePrint(); | |
| 3247 void CodeVerify(); | 3285 void CodeVerify(); |
| 3248 #endif | 3286 #endif |
| 3249 | 3287 |
| 3250 // Max loop nesting marker used to postpose OSR. We don't take loop | 3288 // Max loop nesting marker used to postpose OSR. We don't take loop |
| 3251 // nesting that is deeper than 5 levels into account. | 3289 // nesting that is deeper than 5 levels into account. |
| 3252 static const int kMaxLoopNestingMarker = 6; | 3290 static const int kMaxLoopNestingMarker = 6; |
| 3253 | 3291 |
| 3254 // Layout description. | 3292 // Layout description. |
| 3255 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; | 3293 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; |
| 3256 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; | 3294 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3524 // This is undone in MarkCompactCollector::ClearNonLiveTransitions(). | 3562 // This is undone in MarkCompactCollector::ClearNonLiveTransitions(). |
| 3525 void CreateBackPointers(); | 3563 void CreateBackPointers(); |
| 3526 | 3564 |
| 3527 // Set all map transitions from this map to dead maps to null. | 3565 // Set all map transitions from this map to dead maps to null. |
| 3528 // Also, restore the original prototype on the targets of these | 3566 // Also, restore the original prototype on the targets of these |
| 3529 // transitions, so that we do not process this map again while | 3567 // transitions, so that we do not process this map again while |
| 3530 // following back pointers. | 3568 // following back pointers. |
| 3531 void ClearNonLiveTransitions(Object* real_prototype); | 3569 void ClearNonLiveTransitions(Object* real_prototype); |
| 3532 | 3570 |
| 3533 // Dispatched behavior. | 3571 // Dispatched behavior. |
| 3572 #ifdef OBJECT_PRINT | |
| 3573 void MapPrint(FILE* out = stdout); | |
| 3574 #endif | |
| 3534 #ifdef DEBUG | 3575 #ifdef DEBUG |
| 3535 void MapPrint(); | |
| 3536 void MapVerify(); | 3576 void MapVerify(); |
| 3537 void SharedMapVerify(); | 3577 void SharedMapVerify(); |
| 3538 #endif | 3578 #endif |
| 3539 | 3579 |
| 3540 inline int visitor_id(); | 3580 inline int visitor_id(); |
| 3541 inline void set_visitor_id(int visitor_id); | 3581 inline void set_visitor_id(int visitor_id); |
| 3542 | 3582 |
| 3543 typedef void (*TraverseCallback)(Map* map, void* data); | 3583 typedef void (*TraverseCallback)(Map* map, void* data); |
| 3544 | 3584 |
| 3545 void TraverseTransitionTree(TraverseCallback callback, void* data); | 3585 void TraverseTransitionTree(TraverseCallback callback, void* data); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3681 // [eval_from_instructions_offset]: the instruction offset in the code for the | 3721 // [eval_from_instructions_offset]: the instruction offset in the code for the |
| 3682 // function from which eval was called where eval was called. | 3722 // function from which eval was called where eval was called. |
| 3683 DECL_ACCESSORS(eval_from_instructions_offset, Smi) | 3723 DECL_ACCESSORS(eval_from_instructions_offset, Smi) |
| 3684 | 3724 |
| 3685 static inline Script* cast(Object* obj); | 3725 static inline Script* cast(Object* obj); |
| 3686 | 3726 |
| 3687 // If script source is an external string, check that the underlying | 3727 // If script source is an external string, check that the underlying |
| 3688 // resource is accessible. Otherwise, always return true. | 3728 // resource is accessible. Otherwise, always return true. |
| 3689 inline bool HasValidSource(); | 3729 inline bool HasValidSource(); |
| 3690 | 3730 |
| 3731 #ifdef OBJECT_PRINT | |
| 3732 void ScriptPrint(FILE* out = stdout); | |
| 3733 #endif | |
| 3691 #ifdef DEBUG | 3734 #ifdef DEBUG |
| 3692 void ScriptPrint(); | |
| 3693 void ScriptVerify(); | 3735 void ScriptVerify(); |
| 3694 #endif | 3736 #endif |
| 3695 | 3737 |
| 3696 static const int kSourceOffset = HeapObject::kHeaderSize; | 3738 static const int kSourceOffset = HeapObject::kHeaderSize; |
| 3697 static const int kNameOffset = kSourceOffset + kPointerSize; | 3739 static const int kNameOffset = kSourceOffset + kPointerSize; |
| 3698 static const int kLineOffsetOffset = kNameOffset + kPointerSize; | 3740 static const int kLineOffsetOffset = kNameOffset + kPointerSize; |
| 3699 static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize; | 3741 static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize; |
| 3700 static const int kDataOffset = kColumnOffsetOffset + kPointerSize; | 3742 static const int kDataOffset = kColumnOffsetOffset + kPointerSize; |
| 3701 static const int kContextOffset = kDataOffset + kPointerSize; | 3743 static const int kContextOffset = kDataOffset + kPointerSize; |
| 3702 static const int kWrapperOffset = kContextOffset + kPointerSize; | 3744 static const int kWrapperOffset = kContextOffset + kPointerSize; |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4045 | 4087 |
| 4046 // Calculate the instance size. | 4088 // Calculate the instance size. |
| 4047 int CalculateInstanceSize(); | 4089 int CalculateInstanceSize(); |
| 4048 | 4090 |
| 4049 // Calculate the number of in-object properties. | 4091 // Calculate the number of in-object properties. |
| 4050 int CalculateInObjectProperties(); | 4092 int CalculateInObjectProperties(); |
| 4051 | 4093 |
| 4052 // Dispatched behavior. | 4094 // Dispatched behavior. |
| 4053 // Set max_length to -1 for unlimited length. | 4095 // Set max_length to -1 for unlimited length. |
| 4054 void SourceCodePrint(StringStream* accumulator, int max_length); | 4096 void SourceCodePrint(StringStream* accumulator, int max_length); |
| 4097 #ifdef OBJECT_PRINT | |
| 4098 void SharedFunctionInfoPrint(FILE* out = stdout); | |
| 4099 #endif | |
| 4055 #ifdef DEBUG | 4100 #ifdef DEBUG |
| 4056 void SharedFunctionInfoPrint(); | |
| 4057 void SharedFunctionInfoVerify(); | 4101 void SharedFunctionInfoVerify(); |
| 4058 #endif | 4102 #endif |
| 4059 | 4103 |
| 4060 // Casting. | 4104 // Casting. |
| 4061 static inline SharedFunctionInfo* cast(Object* obj); | 4105 static inline SharedFunctionInfo* cast(Object* obj); |
| 4062 | 4106 |
| 4063 // Constants. | 4107 // Constants. |
| 4064 static const int kDontAdaptArgumentsSentinel = -1; | 4108 static const int kDontAdaptArgumentsSentinel = -1; |
| 4065 | 4109 |
| 4066 // Layout description. | 4110 // Layout description. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4278 Object* SetInstanceClassName(String* name); | 4322 Object* SetInstanceClassName(String* name); |
| 4279 | 4323 |
| 4280 // Returns if this function has been compiled to native code yet. | 4324 // Returns if this function has been compiled to native code yet. |
| 4281 inline bool is_compiled(); | 4325 inline bool is_compiled(); |
| 4282 | 4326 |
| 4283 // [next_function_link]: Field for linking functions. This list is treated as | 4327 // [next_function_link]: Field for linking functions. This list is treated as |
| 4284 // a weak list by the GC. | 4328 // a weak list by the GC. |
| 4285 DECL_ACCESSORS(next_function_link, Object) | 4329 DECL_ACCESSORS(next_function_link, Object) |
| 4286 | 4330 |
| 4287 // Prints the name of the function using PrintF. | 4331 // Prints the name of the function using PrintF. |
| 4288 void PrintName(); | 4332 void PrintName(FILE* out = stdout); |
| 4289 | 4333 |
| 4290 // Casting. | 4334 // Casting. |
| 4291 static inline JSFunction* cast(Object* obj); | 4335 static inline JSFunction* cast(Object* obj); |
| 4292 | 4336 |
| 4293 // Iterates the objects, including code objects indirectly referenced | 4337 // Iterates the objects, including code objects indirectly referenced |
| 4294 // through pointers to the first instruction in the code object. | 4338 // through pointers to the first instruction in the code object. |
| 4295 void JSFunctionIterateBody(int object_size, ObjectVisitor* v); | 4339 void JSFunctionIterateBody(int object_size, ObjectVisitor* v); |
| 4296 | 4340 |
| 4297 // Dispatched behavior. | 4341 // Dispatched behavior. |
| 4342 #ifdef OBJECT_PRINT | |
| 4343 void JSFunctionPrint(FILE* out = stdout); | |
| 4344 #endif | |
| 4298 #ifdef DEBUG | 4345 #ifdef DEBUG |
| 4299 void JSFunctionPrint(); | |
| 4300 void JSFunctionVerify(); | 4346 void JSFunctionVerify(); |
| 4301 #endif | 4347 #endif |
| 4302 | 4348 |
| 4303 // Returns the number of allocated literals. | 4349 // Returns the number of allocated literals. |
| 4304 inline int NumberOfLiterals(); | 4350 inline int NumberOfLiterals(); |
| 4305 | 4351 |
| 4306 // Retrieve the global context from a function's literal array. | 4352 // Retrieve the global context from a function's literal array. |
| 4307 static Context* GlobalContextFromLiterals(FixedArray* literals); | 4353 static Context* GlobalContextFromLiterals(FixedArray* literals); |
| 4308 | 4354 |
| 4309 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to | 4355 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 4338 class JSGlobalProxy : public JSObject { | 4384 class JSGlobalProxy : public JSObject { |
| 4339 public: | 4385 public: |
| 4340 // [context]: the owner global context of this proxy object. | 4386 // [context]: the owner global context of this proxy object. |
| 4341 // It is null value if this object is not used by any context. | 4387 // It is null value if this object is not used by any context. |
| 4342 DECL_ACCESSORS(context, Object) | 4388 DECL_ACCESSORS(context, Object) |
| 4343 | 4389 |
| 4344 // Casting. | 4390 // Casting. |
| 4345 static inline JSGlobalProxy* cast(Object* obj); | 4391 static inline JSGlobalProxy* cast(Object* obj); |
| 4346 | 4392 |
| 4347 // Dispatched behavior. | 4393 // Dispatched behavior. |
| 4394 #ifdef OBJECT_PRINT | |
| 4395 void JSGlobalProxyPrint(FILE* out = stdout); | |
| 4396 #endif | |
| 4348 #ifdef DEBUG | 4397 #ifdef DEBUG |
| 4349 void JSGlobalProxyPrint(); | |
| 4350 void JSGlobalProxyVerify(); | 4398 void JSGlobalProxyVerify(); |
| 4351 #endif | 4399 #endif |
| 4352 | 4400 |
| 4353 // Layout description. | 4401 // Layout description. |
| 4354 static const int kContextOffset = JSObject::kHeaderSize; | 4402 static const int kContextOffset = JSObject::kHeaderSize; |
| 4355 static const int kSize = kContextOffset + kPointerSize; | 4403 static const int kSize = kContextOffset + kPointerSize; |
| 4356 | 4404 |
| 4357 private: | 4405 private: |
| 4358 | 4406 |
| 4359 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); | 4407 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalProxy); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4409 | 4457 |
| 4410 | 4458 |
| 4411 // JavaScript global object. | 4459 // JavaScript global object. |
| 4412 class JSGlobalObject: public GlobalObject { | 4460 class JSGlobalObject: public GlobalObject { |
| 4413 public: | 4461 public: |
| 4414 | 4462 |
| 4415 // Casting. | 4463 // Casting. |
| 4416 static inline JSGlobalObject* cast(Object* obj); | 4464 static inline JSGlobalObject* cast(Object* obj); |
| 4417 | 4465 |
| 4418 // Dispatched behavior. | 4466 // Dispatched behavior. |
| 4467 #ifdef OBJECT_PRINT | |
| 4468 void JSGlobalObjectPrint(FILE* out = stdout); | |
| 4469 #endif | |
| 4419 #ifdef DEBUG | 4470 #ifdef DEBUG |
| 4420 void JSGlobalObjectPrint(); | |
| 4421 void JSGlobalObjectVerify(); | 4471 void JSGlobalObjectVerify(); |
| 4422 #endif | 4472 #endif |
| 4423 | 4473 |
| 4424 // Layout description. | 4474 // Layout description. |
| 4425 static const int kSize = GlobalObject::kHeaderSize; | 4475 static const int kSize = GlobalObject::kHeaderSize; |
| 4426 | 4476 |
| 4427 private: | 4477 private: |
| 4428 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); | 4478 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalObject); |
| 4429 }; | 4479 }; |
| 4430 | 4480 |
| 4431 | 4481 |
| 4432 // Builtins global object which holds the runtime routines written in | 4482 // Builtins global object which holds the runtime routines written in |
| 4433 // JavaScript. | 4483 // JavaScript. |
| 4434 class JSBuiltinsObject: public GlobalObject { | 4484 class JSBuiltinsObject: public GlobalObject { |
| 4435 public: | 4485 public: |
| 4436 // Accessors for the runtime routines written in JavaScript. | 4486 // Accessors for the runtime routines written in JavaScript. |
| 4437 inline Object* javascript_builtin(Builtins::JavaScript id); | 4487 inline Object* javascript_builtin(Builtins::JavaScript id); |
| 4438 inline void set_javascript_builtin(Builtins::JavaScript id, Object* value); | 4488 inline void set_javascript_builtin(Builtins::JavaScript id, Object* value); |
| 4439 | 4489 |
| 4440 // Accessors for code of the runtime routines written in JavaScript. | 4490 // Accessors for code of the runtime routines written in JavaScript. |
| 4441 inline Code* javascript_builtin_code(Builtins::JavaScript id); | 4491 inline Code* javascript_builtin_code(Builtins::JavaScript id); |
| 4442 inline void set_javascript_builtin_code(Builtins::JavaScript id, Code* value); | 4492 inline void set_javascript_builtin_code(Builtins::JavaScript id, Code* value); |
| 4443 | 4493 |
| 4444 // Casting. | 4494 // Casting. |
| 4445 static inline JSBuiltinsObject* cast(Object* obj); | 4495 static inline JSBuiltinsObject* cast(Object* obj); |
| 4446 | 4496 |
| 4447 // Dispatched behavior. | 4497 // Dispatched behavior. |
| 4498 #ifdef OBJECT_PRINT | |
| 4499 void JSBuiltinsObjectPrint(FILE* out = stdout); | |
| 4500 #endif | |
| 4448 #ifdef DEBUG | 4501 #ifdef DEBUG |
| 4449 void JSBuiltinsObjectPrint(); | |
| 4450 void JSBuiltinsObjectVerify(); | 4502 void JSBuiltinsObjectVerify(); |
| 4451 #endif | 4503 #endif |
| 4452 | 4504 |
| 4453 // Layout description. The size of the builtins object includes | 4505 // Layout description. The size of the builtins object includes |
| 4454 // room for two pointers per runtime routine written in javascript | 4506 // room for two pointers per runtime routine written in javascript |
| 4455 // (function and code object). | 4507 // (function and code object). |
| 4456 static const int kJSBuiltinsCount = Builtins::id_count; | 4508 static const int kJSBuiltinsCount = Builtins::id_count; |
| 4457 static const int kJSBuiltinsOffset = GlobalObject::kHeaderSize; | 4509 static const int kJSBuiltinsOffset = GlobalObject::kHeaderSize; |
| 4458 static const int kJSBuiltinsCodeOffset = | 4510 static const int kJSBuiltinsCodeOffset = |
| 4459 GlobalObject::kHeaderSize + (kJSBuiltinsCount * kPointerSize); | 4511 GlobalObject::kHeaderSize + (kJSBuiltinsCount * kPointerSize); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 4476 // Representation for JS Wrapper objects, String, Number, Boolean, Date, etc. | 4528 // Representation for JS Wrapper objects, String, Number, Boolean, Date, etc. |
| 4477 class JSValue: public JSObject { | 4529 class JSValue: public JSObject { |
| 4478 public: | 4530 public: |
| 4479 // [value]: the object being wrapped. | 4531 // [value]: the object being wrapped. |
| 4480 DECL_ACCESSORS(value, Object) | 4532 DECL_ACCESSORS(value, Object) |
| 4481 | 4533 |
| 4482 // Casting. | 4534 // Casting. |
| 4483 static inline JSValue* cast(Object* obj); | 4535 static inline JSValue* cast(Object* obj); |
| 4484 | 4536 |
| 4485 // Dispatched behavior. | 4537 // Dispatched behavior. |
| 4538 #ifdef OBJECT_PRINT | |
| 4539 void JSValuePrint(FILE* out = stdout); | |
| 4540 #endif | |
| 4486 #ifdef DEBUG | 4541 #ifdef DEBUG |
| 4487 void JSValuePrint(); | |
| 4488 void JSValueVerify(); | 4542 void JSValueVerify(); |
| 4489 #endif | 4543 #endif |
| 4490 | 4544 |
| 4491 // Layout description. | 4545 // Layout description. |
| 4492 static const int kValueOffset = JSObject::kHeaderSize; | 4546 static const int kValueOffset = JSObject::kHeaderSize; |
| 4493 static const int kSize = kValueOffset + kPointerSize; | 4547 static const int kSize = kValueOffset + kPointerSize; |
| 4494 | 4548 |
| 4495 private: | 4549 private: |
| 4496 DISALLOW_IMPLICIT_CONSTRUCTORS(JSValue); | 4550 DISALLOW_IMPLICIT_CONSTRUCTORS(JSValue); |
| 4497 }; | 4551 }; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4666 // code object is not in that cache. This index can be used to later call | 4720 // code object is not in that cache. This index can be used to later call |
| 4667 // RemoveByIndex. The cache cannot be modified between a call to GetIndex and | 4721 // RemoveByIndex. The cache cannot be modified between a call to GetIndex and |
| 4668 // RemoveByIndex. | 4722 // RemoveByIndex. |
| 4669 int GetIndex(Object* name, Code* code); | 4723 int GetIndex(Object* name, Code* code); |
| 4670 | 4724 |
| 4671 // Remove an object from the cache with the provided internal index. | 4725 // Remove an object from the cache with the provided internal index. |
| 4672 void RemoveByIndex(Object* name, Code* code, int index); | 4726 void RemoveByIndex(Object* name, Code* code, int index); |
| 4673 | 4727 |
| 4674 static inline CodeCache* cast(Object* obj); | 4728 static inline CodeCache* cast(Object* obj); |
| 4675 | 4729 |
| 4730 #ifdef OBJECT_PRINT | |
| 4731 void CodeCachePrint(FILE* out = stdout); | |
| 4732 #endif | |
| 4676 #ifdef DEBUG | 4733 #ifdef DEBUG |
| 4677 void CodeCachePrint(); | |
| 4678 void CodeCacheVerify(); | 4734 void CodeCacheVerify(); |
| 4679 #endif | 4735 #endif |
| 4680 | 4736 |
| 4681 static const int kDefaultCacheOffset = HeapObject::kHeaderSize; | 4737 static const int kDefaultCacheOffset = HeapObject::kHeaderSize; |
| 4682 static const int kNormalTypeCacheOffset = | 4738 static const int kNormalTypeCacheOffset = |
| 4683 kDefaultCacheOffset + kPointerSize; | 4739 kDefaultCacheOffset + kPointerSize; |
| 4684 static const int kSize = kNormalTypeCacheOffset + kPointerSize; | 4740 static const int kSize = kNormalTypeCacheOffset + kPointerSize; |
| 4685 | 4741 |
| 4686 private: | 4742 private: |
| 4687 MUST_USE_RESULT MaybeObject* UpdateDefaultCache(String* name, Code* code); | 4743 MUST_USE_RESULT MaybeObject* UpdateDefaultCache(String* name, Code* code); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4968 // Casting. | 5024 // Casting. |
| 4969 static inline String* cast(Object* obj); | 5025 static inline String* cast(Object* obj); |
| 4970 | 5026 |
| 4971 void PrintOn(FILE* out); | 5027 void PrintOn(FILE* out); |
| 4972 | 5028 |
| 4973 // For use during stack traces. Performs rudimentary sanity check. | 5029 // For use during stack traces. Performs rudimentary sanity check. |
| 4974 bool LooksValid(); | 5030 bool LooksValid(); |
| 4975 | 5031 |
| 4976 // Dispatched behavior. | 5032 // Dispatched behavior. |
| 4977 void StringShortPrint(StringStream* accumulator); | 5033 void StringShortPrint(StringStream* accumulator); |
| 5034 #ifdef OBJECT_PRINT | |
| 5035 void StringPrint(FILE* out = stdout); | |
| 5036 #endif | |
| 4978 #ifdef DEBUG | 5037 #ifdef DEBUG |
| 4979 void StringPrint(); | |
| 4980 void StringVerify(); | 5038 void StringVerify(); |
| 4981 #endif | 5039 #endif |
| 4982 inline bool IsFlat(); | 5040 inline bool IsFlat(); |
| 4983 | 5041 |
| 4984 // Layout description. | 5042 // Layout description. |
| 4985 static const int kLengthOffset = HeapObject::kHeaderSize; | 5043 static const int kLengthOffset = HeapObject::kHeaderSize; |
| 4986 static const int kHashFieldOffset = kLengthOffset + kPointerSize; | 5044 static const int kHashFieldOffset = kLengthOffset + kPointerSize; |
| 4987 static const int kSize = kHashFieldOffset + kPointerSize; | 5045 static const int kSize = kHashFieldOffset + kPointerSize; |
| 4988 | 5046 |
| 4989 // Maximum number of characters to consider when trying to convert a string | 5047 // Maximum number of characters to consider when trying to convert a string |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5524 class JSGlobalPropertyCell: public HeapObject { | 5582 class JSGlobalPropertyCell: public HeapObject { |
| 5525 public: | 5583 public: |
| 5526 // [value]: value of the global property. | 5584 // [value]: value of the global property. |
| 5527 DECL_ACCESSORS(value, Object) | 5585 DECL_ACCESSORS(value, Object) |
| 5528 | 5586 |
| 5529 // Casting. | 5587 // Casting. |
| 5530 static inline JSGlobalPropertyCell* cast(Object* obj); | 5588 static inline JSGlobalPropertyCell* cast(Object* obj); |
| 5531 | 5589 |
| 5532 #ifdef DEBUG | 5590 #ifdef DEBUG |
| 5533 void JSGlobalPropertyCellVerify(); | 5591 void JSGlobalPropertyCellVerify(); |
| 5534 void JSGlobalPropertyCellPrint(); | 5592 #endif |
| 5593 #ifdef OBJECT_PRINT | |
| 5594 void JSGlobalPropertyCellPrint(FILE* out = stdout); | |
| 5535 #endif | 5595 #endif |
| 5536 | 5596 |
| 5537 // Layout description. | 5597 // Layout description. |
| 5538 static const int kValueOffset = HeapObject::kHeaderSize; | 5598 static const int kValueOffset = HeapObject::kHeaderSize; |
| 5539 static const int kSize = kValueOffset + kPointerSize; | 5599 static const int kSize = kValueOffset + kPointerSize; |
| 5540 | 5600 |
| 5541 typedef FixedBodyDescriptor<kValueOffset, | 5601 typedef FixedBodyDescriptor<kValueOffset, |
| 5542 kValueOffset + kPointerSize, | 5602 kValueOffset + kPointerSize, |
| 5543 kSize> BodyDescriptor; | 5603 kSize> BodyDescriptor; |
| 5544 | 5604 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 5559 | 5619 |
| 5560 // Casting. | 5620 // Casting. |
| 5561 static inline Proxy* cast(Object* obj); | 5621 static inline Proxy* cast(Object* obj); |
| 5562 | 5622 |
| 5563 // Dispatched behavior. | 5623 // Dispatched behavior. |
| 5564 inline void ProxyIterateBody(ObjectVisitor* v); | 5624 inline void ProxyIterateBody(ObjectVisitor* v); |
| 5565 | 5625 |
| 5566 template<typename StaticVisitor> | 5626 template<typename StaticVisitor> |
| 5567 inline void ProxyIterateBody(); | 5627 inline void ProxyIterateBody(); |
| 5568 | 5628 |
| 5629 #ifdef OBJECT_PRINT | |
| 5630 void ProxyPrint(FILE* out = stdout); | |
| 5631 #endif | |
| 5569 #ifdef DEBUG | 5632 #ifdef DEBUG |
| 5570 void ProxyPrint(); | |
| 5571 void ProxyVerify(); | 5633 void ProxyVerify(); |
| 5572 #endif | 5634 #endif |
| 5573 | 5635 |
| 5574 // Layout description. | 5636 // Layout description. |
| 5575 | 5637 |
| 5576 static const int kProxyOffset = HeapObject::kHeaderSize; | 5638 static const int kProxyOffset = HeapObject::kHeaderSize; |
| 5577 static const int kSize = kProxyOffset + kPointerSize; | 5639 static const int kSize = kProxyOffset + kPointerSize; |
| 5578 | 5640 |
| 5579 STATIC_CHECK(kProxyOffset == Internals::kProxyProxyOffset); | 5641 STATIC_CHECK(kProxyOffset == Internals::kProxyProxyOffset); |
| 5580 | 5642 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 5609 inline void SetContent(FixedArray* storage); | 5671 inline void SetContent(FixedArray* storage); |
| 5610 | 5672 |
| 5611 // Casting. | 5673 // Casting. |
| 5612 static inline JSArray* cast(Object* obj); | 5674 static inline JSArray* cast(Object* obj); |
| 5613 | 5675 |
| 5614 // Uses handles. Ensures that the fixed array backing the JSArray has at | 5676 // Uses handles. Ensures that the fixed array backing the JSArray has at |
| 5615 // least the stated size. | 5677 // least the stated size. |
| 5616 inline void EnsureSize(int minimum_size_of_backing_fixed_array); | 5678 inline void EnsureSize(int minimum_size_of_backing_fixed_array); |
| 5617 | 5679 |
| 5618 // Dispatched behavior. | 5680 // Dispatched behavior. |
| 5681 #ifdef OBJECT_PRINT | |
| 5682 void JSArrayPrint(FILE* out = stdout); | |
| 5683 #endif | |
| 5619 #ifdef DEBUG | 5684 #ifdef DEBUG |
| 5620 void JSArrayPrint(); | |
| 5621 void JSArrayVerify(); | 5685 void JSArrayVerify(); |
| 5622 #endif | 5686 #endif |
| 5623 | 5687 |
| 5624 // Number of element slots to pre-allocate for an empty array. | 5688 // Number of element slots to pre-allocate for an empty array. |
| 5625 static const int kPreallocatedArrayElements = 4; | 5689 static const int kPreallocatedArrayElements = 4; |
| 5626 | 5690 |
| 5627 // Layout description. | 5691 // Layout description. |
| 5628 static const int kLengthOffset = JSObject::kHeaderSize; | 5692 static const int kLengthOffset = JSObject::kHeaderSize; |
| 5629 static const int kSize = kLengthOffset + kPointerSize; | 5693 static const int kSize = kLengthOffset + kPointerSize; |
| 5630 | 5694 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5681 inline void set_all_can_write(bool value); | 5745 inline void set_all_can_write(bool value); |
| 5682 | 5746 |
| 5683 inline bool prohibits_overwriting(); | 5747 inline bool prohibits_overwriting(); |
| 5684 inline void set_prohibits_overwriting(bool value); | 5748 inline void set_prohibits_overwriting(bool value); |
| 5685 | 5749 |
| 5686 inline PropertyAttributes property_attributes(); | 5750 inline PropertyAttributes property_attributes(); |
| 5687 inline void set_property_attributes(PropertyAttributes attributes); | 5751 inline void set_property_attributes(PropertyAttributes attributes); |
| 5688 | 5752 |
| 5689 static inline AccessorInfo* cast(Object* obj); | 5753 static inline AccessorInfo* cast(Object* obj); |
| 5690 | 5754 |
| 5755 #ifdef OBJECT_PRINT | |
| 5756 void AccessorInfoPrint(FILE* out = stdout); | |
| 5757 #endif | |
| 5691 #ifdef DEBUG | 5758 #ifdef DEBUG |
| 5692 void AccessorInfoPrint(); | |
| 5693 void AccessorInfoVerify(); | 5759 void AccessorInfoVerify(); |
| 5694 #endif | 5760 #endif |
| 5695 | 5761 |
| 5696 static const int kGetterOffset = HeapObject::kHeaderSize; | 5762 static const int kGetterOffset = HeapObject::kHeaderSize; |
| 5697 static const int kSetterOffset = kGetterOffset + kPointerSize; | 5763 static const int kSetterOffset = kGetterOffset + kPointerSize; |
| 5698 static const int kDataOffset = kSetterOffset + kPointerSize; | 5764 static const int kDataOffset = kSetterOffset + kPointerSize; |
| 5699 static const int kNameOffset = kDataOffset + kPointerSize; | 5765 static const int kNameOffset = kDataOffset + kPointerSize; |
| 5700 static const int kFlagOffset = kNameOffset + kPointerSize; | 5766 static const int kFlagOffset = kNameOffset + kPointerSize; |
| 5701 static const int kSize = kFlagOffset + kPointerSize; | 5767 static const int kSize = kFlagOffset + kPointerSize; |
| 5702 | 5768 |
| 5703 private: | 5769 private: |
| 5704 // Bit positions in flag. | 5770 // Bit positions in flag. |
| 5705 static const int kAllCanReadBit = 0; | 5771 static const int kAllCanReadBit = 0; |
| 5706 static const int kAllCanWriteBit = 1; | 5772 static const int kAllCanWriteBit = 1; |
| 5707 static const int kProhibitsOverwritingBit = 2; | 5773 static const int kProhibitsOverwritingBit = 2; |
| 5708 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; | 5774 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; |
| 5709 | 5775 |
| 5710 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); | 5776 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); |
| 5711 }; | 5777 }; |
| 5712 | 5778 |
| 5713 | 5779 |
| 5714 class AccessCheckInfo: public Struct { | 5780 class AccessCheckInfo: public Struct { |
| 5715 public: | 5781 public: |
| 5716 DECL_ACCESSORS(named_callback, Object) | 5782 DECL_ACCESSORS(named_callback, Object) |
| 5717 DECL_ACCESSORS(indexed_callback, Object) | 5783 DECL_ACCESSORS(indexed_callback, Object) |
| 5718 DECL_ACCESSORS(data, Object) | 5784 DECL_ACCESSORS(data, Object) |
| 5719 | 5785 |
| 5720 static inline AccessCheckInfo* cast(Object* obj); | 5786 static inline AccessCheckInfo* cast(Object* obj); |
| 5721 | 5787 |
| 5788 #ifdef OBJECT_PRINT | |
| 5789 void AccessCheckInfoPrint(FILE* out = stdout); | |
| 5790 #endif | |
| 5722 #ifdef DEBUG | 5791 #ifdef DEBUG |
| 5723 void AccessCheckInfoPrint(); | |
| 5724 void AccessCheckInfoVerify(); | 5792 void AccessCheckInfoVerify(); |
| 5725 #endif | 5793 #endif |
| 5726 | 5794 |
| 5727 static const int kNamedCallbackOffset = HeapObject::kHeaderSize; | 5795 static const int kNamedCallbackOffset = HeapObject::kHeaderSize; |
| 5728 static const int kIndexedCallbackOffset = kNamedCallbackOffset + kPointerSize; | 5796 static const int kIndexedCallbackOffset = kNamedCallbackOffset + kPointerSize; |
| 5729 static const int kDataOffset = kIndexedCallbackOffset + kPointerSize; | 5797 static const int kDataOffset = kIndexedCallbackOffset + kPointerSize; |
| 5730 static const int kSize = kDataOffset + kPointerSize; | 5798 static const int kSize = kDataOffset + kPointerSize; |
| 5731 | 5799 |
| 5732 private: | 5800 private: |
| 5733 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); | 5801 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); |
| 5734 }; | 5802 }; |
| 5735 | 5803 |
| 5736 | 5804 |
| 5737 class InterceptorInfo: public Struct { | 5805 class InterceptorInfo: public Struct { |
| 5738 public: | 5806 public: |
| 5739 DECL_ACCESSORS(getter, Object) | 5807 DECL_ACCESSORS(getter, Object) |
| 5740 DECL_ACCESSORS(setter, Object) | 5808 DECL_ACCESSORS(setter, Object) |
| 5741 DECL_ACCESSORS(query, Object) | 5809 DECL_ACCESSORS(query, Object) |
| 5742 DECL_ACCESSORS(deleter, Object) | 5810 DECL_ACCESSORS(deleter, Object) |
| 5743 DECL_ACCESSORS(enumerator, Object) | 5811 DECL_ACCESSORS(enumerator, Object) |
| 5744 DECL_ACCESSORS(data, Object) | 5812 DECL_ACCESSORS(data, Object) |
| 5745 | 5813 |
| 5746 static inline InterceptorInfo* cast(Object* obj); | 5814 static inline InterceptorInfo* cast(Object* obj); |
| 5747 | 5815 |
| 5816 #ifdef OBJECT_PRINT | |
| 5817 void InterceptorInfoPrint(FILE* out = stdout); | |
| 5818 #endif | |
| 5748 #ifdef DEBUG | 5819 #ifdef DEBUG |
| 5749 void InterceptorInfoPrint(); | |
| 5750 void InterceptorInfoVerify(); | 5820 void InterceptorInfoVerify(); |
| 5751 #endif | 5821 #endif |
| 5752 | 5822 |
| 5753 static const int kGetterOffset = HeapObject::kHeaderSize; | 5823 static const int kGetterOffset = HeapObject::kHeaderSize; |
| 5754 static const int kSetterOffset = kGetterOffset + kPointerSize; | 5824 static const int kSetterOffset = kGetterOffset + kPointerSize; |
| 5755 static const int kQueryOffset = kSetterOffset + kPointerSize; | 5825 static const int kQueryOffset = kSetterOffset + kPointerSize; |
| 5756 static const int kDeleterOffset = kQueryOffset + kPointerSize; | 5826 static const int kDeleterOffset = kQueryOffset + kPointerSize; |
| 5757 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize; | 5827 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize; |
| 5758 static const int kDataOffset = kEnumeratorOffset + kPointerSize; | 5828 static const int kDataOffset = kEnumeratorOffset + kPointerSize; |
| 5759 static const int kSize = kDataOffset + kPointerSize; | 5829 static const int kSize = kDataOffset + kPointerSize; |
| 5760 | 5830 |
| 5761 private: | 5831 private: |
| 5762 DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo); | 5832 DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo); |
| 5763 }; | 5833 }; |
| 5764 | 5834 |
| 5765 | 5835 |
| 5766 class CallHandlerInfo: public Struct { | 5836 class CallHandlerInfo: public Struct { |
| 5767 public: | 5837 public: |
| 5768 DECL_ACCESSORS(callback, Object) | 5838 DECL_ACCESSORS(callback, Object) |
| 5769 DECL_ACCESSORS(data, Object) | 5839 DECL_ACCESSORS(data, Object) |
| 5770 | 5840 |
| 5771 static inline CallHandlerInfo* cast(Object* obj); | 5841 static inline CallHandlerInfo* cast(Object* obj); |
| 5772 | 5842 |
| 5843 #ifdef OBJECT_PRINT | |
| 5844 void CallHandlerInfoPrint(FILE* out = stdout); | |
| 5845 #endif | |
| 5773 #ifdef DEBUG | 5846 #ifdef DEBUG |
| 5774 void CallHandlerInfoPrint(); | |
| 5775 void CallHandlerInfoVerify(); | 5847 void CallHandlerInfoVerify(); |
| 5776 #endif | 5848 #endif |
| 5777 | 5849 |
| 5778 static const int kCallbackOffset = HeapObject::kHeaderSize; | 5850 static const int kCallbackOffset = HeapObject::kHeaderSize; |
| 5779 static const int kDataOffset = kCallbackOffset + kPointerSize; | 5851 static const int kDataOffset = kCallbackOffset + kPointerSize; |
| 5780 static const int kSize = kDataOffset + kPointerSize; | 5852 static const int kSize = kDataOffset + kPointerSize; |
| 5781 | 5853 |
| 5782 private: | 5854 private: |
| 5783 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); | 5855 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); |
| 5784 }; | 5856 }; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5820 | 5892 |
| 5821 // Following properties use flag bits. | 5893 // Following properties use flag bits. |
| 5822 DECL_BOOLEAN_ACCESSORS(hidden_prototype) | 5894 DECL_BOOLEAN_ACCESSORS(hidden_prototype) |
| 5823 DECL_BOOLEAN_ACCESSORS(undetectable) | 5895 DECL_BOOLEAN_ACCESSORS(undetectable) |
| 5824 // If the bit is set, object instances created by this function | 5896 // If the bit is set, object instances created by this function |
| 5825 // requires access check. | 5897 // requires access check. |
| 5826 DECL_BOOLEAN_ACCESSORS(needs_access_check) | 5898 DECL_BOOLEAN_ACCESSORS(needs_access_check) |
| 5827 | 5899 |
| 5828 static inline FunctionTemplateInfo* cast(Object* obj); | 5900 static inline FunctionTemplateInfo* cast(Object* obj); |
| 5829 | 5901 |
| 5902 #ifdef OBJECT_PRINT | |
| 5903 void FunctionTemplateInfoPrint(FILE* out = stdout); | |
| 5904 #endif | |
| 5830 #ifdef DEBUG | 5905 #ifdef DEBUG |
| 5831 void FunctionTemplateInfoPrint(); | |
| 5832 void FunctionTemplateInfoVerify(); | 5906 void FunctionTemplateInfoVerify(); |
| 5833 #endif | 5907 #endif |
| 5834 | 5908 |
| 5835 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; | 5909 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; |
| 5836 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; | 5910 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; |
| 5837 static const int kPropertyAccessorsOffset = kCallCodeOffset + kPointerSize; | 5911 static const int kPropertyAccessorsOffset = kCallCodeOffset + kPointerSize; |
| 5838 static const int kPrototypeTemplateOffset = | 5912 static const int kPrototypeTemplateOffset = |
| 5839 kPropertyAccessorsOffset + kPointerSize; | 5913 kPropertyAccessorsOffset + kPointerSize; |
| 5840 static const int kParentTemplateOffset = | 5914 static const int kParentTemplateOffset = |
| 5841 kPrototypeTemplateOffset + kPointerSize; | 5915 kPrototypeTemplateOffset + kPointerSize; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 5863 }; | 5937 }; |
| 5864 | 5938 |
| 5865 | 5939 |
| 5866 class ObjectTemplateInfo: public TemplateInfo { | 5940 class ObjectTemplateInfo: public TemplateInfo { |
| 5867 public: | 5941 public: |
| 5868 DECL_ACCESSORS(constructor, Object) | 5942 DECL_ACCESSORS(constructor, Object) |
| 5869 DECL_ACCESSORS(internal_field_count, Object) | 5943 DECL_ACCESSORS(internal_field_count, Object) |
| 5870 | 5944 |
| 5871 static inline ObjectTemplateInfo* cast(Object* obj); | 5945 static inline ObjectTemplateInfo* cast(Object* obj); |
| 5872 | 5946 |
| 5947 #ifdef OBJECT_PRINT | |
| 5948 void ObjectTemplateInfoPrint(FILE* out = stdout); | |
| 5949 #endif | |
| 5873 #ifdef DEBUG | 5950 #ifdef DEBUG |
| 5874 void ObjectTemplateInfoPrint(); | |
| 5875 void ObjectTemplateInfoVerify(); | 5951 void ObjectTemplateInfoVerify(); |
| 5876 #endif | 5952 #endif |
| 5877 | 5953 |
| 5878 static const int kConstructorOffset = TemplateInfo::kHeaderSize; | 5954 static const int kConstructorOffset = TemplateInfo::kHeaderSize; |
| 5879 static const int kInternalFieldCountOffset = | 5955 static const int kInternalFieldCountOffset = |
| 5880 kConstructorOffset + kPointerSize; | 5956 kConstructorOffset + kPointerSize; |
| 5881 static const int kSize = kInternalFieldCountOffset + kPointerSize; | 5957 static const int kSize = kInternalFieldCountOffset + kPointerSize; |
| 5882 }; | 5958 }; |
| 5883 | 5959 |
| 5884 | 5960 |
| 5885 class SignatureInfo: public Struct { | 5961 class SignatureInfo: public Struct { |
| 5886 public: | 5962 public: |
| 5887 DECL_ACCESSORS(receiver, Object) | 5963 DECL_ACCESSORS(receiver, Object) |
| 5888 DECL_ACCESSORS(args, Object) | 5964 DECL_ACCESSORS(args, Object) |
| 5889 | 5965 |
| 5890 static inline SignatureInfo* cast(Object* obj); | 5966 static inline SignatureInfo* cast(Object* obj); |
| 5891 | 5967 |
| 5968 #ifdef OBJECT_PRINT | |
| 5969 void SignatureInfoPrint(FILE* out = stdout); | |
| 5970 #endif | |
| 5892 #ifdef DEBUG | 5971 #ifdef DEBUG |
| 5893 void SignatureInfoPrint(); | |
| 5894 void SignatureInfoVerify(); | 5972 void SignatureInfoVerify(); |
| 5895 #endif | 5973 #endif |
| 5896 | 5974 |
| 5897 static const int kReceiverOffset = Struct::kHeaderSize; | 5975 static const int kReceiverOffset = Struct::kHeaderSize; |
| 5898 static const int kArgsOffset = kReceiverOffset + kPointerSize; | 5976 static const int kArgsOffset = kReceiverOffset + kPointerSize; |
| 5899 static const int kSize = kArgsOffset + kPointerSize; | 5977 static const int kSize = kArgsOffset + kPointerSize; |
| 5900 | 5978 |
| 5901 private: | 5979 private: |
| 5902 DISALLOW_IMPLICIT_CONSTRUCTORS(SignatureInfo); | 5980 DISALLOW_IMPLICIT_CONSTRUCTORS(SignatureInfo); |
| 5903 }; | 5981 }; |
| 5904 | 5982 |
| 5905 | 5983 |
| 5906 class TypeSwitchInfo: public Struct { | 5984 class TypeSwitchInfo: public Struct { |
| 5907 public: | 5985 public: |
| 5908 DECL_ACCESSORS(types, Object) | 5986 DECL_ACCESSORS(types, Object) |
| 5909 | 5987 |
| 5910 static inline TypeSwitchInfo* cast(Object* obj); | 5988 static inline TypeSwitchInfo* cast(Object* obj); |
| 5911 | 5989 |
| 5990 #ifdef OBJECT_PRINT | |
| 5991 void TypeSwitchInfoPrint(FILE* out = stdout); | |
| 5992 #endif | |
| 5912 #ifdef DEBUG | 5993 #ifdef DEBUG |
| 5913 void TypeSwitchInfoPrint(); | |
| 5914 void TypeSwitchInfoVerify(); | 5994 void TypeSwitchInfoVerify(); |
| 5915 #endif | 5995 #endif |
| 5916 | 5996 |
| 5917 static const int kTypesOffset = Struct::kHeaderSize; | 5997 static const int kTypesOffset = Struct::kHeaderSize; |
| 5918 static const int kSize = kTypesOffset + kPointerSize; | 5998 static const int kSize = kTypesOffset + kPointerSize; |
| 5919 }; | 5999 }; |
| 5920 | 6000 |
| 5921 | 6001 |
| 5922 #ifdef ENABLE_DEBUGGER_SUPPORT | 6002 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 5923 // The DebugInfo class holds additional information for a function being | 6003 // The DebugInfo class holds additional information for a function being |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 5949 // Get the break point objects for a code position. | 6029 // Get the break point objects for a code position. |
| 5950 Object* GetBreakPointObjects(int code_position); | 6030 Object* GetBreakPointObjects(int code_position); |
| 5951 // Find the break point info holding this break point object. | 6031 // Find the break point info holding this break point object. |
| 5952 static Object* FindBreakPointInfo(Handle<DebugInfo> debug_info, | 6032 static Object* FindBreakPointInfo(Handle<DebugInfo> debug_info, |
| 5953 Handle<Object> break_point_object); | 6033 Handle<Object> break_point_object); |
| 5954 // Get the number of break points for this function. | 6034 // Get the number of break points for this function. |
| 5955 int GetBreakPointCount(); | 6035 int GetBreakPointCount(); |
| 5956 | 6036 |
| 5957 static inline DebugInfo* cast(Object* obj); | 6037 static inline DebugInfo* cast(Object* obj); |
| 5958 | 6038 |
| 6039 #ifdef OBJECT_PRINT | |
| 6040 void DebugInfoPrint(FILE* out = stdout); | |
| 6041 #endif | |
| 5959 #ifdef DEBUG | 6042 #ifdef DEBUG |
| 5960 void DebugInfoPrint(); | |
| 5961 void DebugInfoVerify(); | 6043 void DebugInfoVerify(); |
| 5962 #endif | 6044 #endif |
| 5963 | 6045 |
| 5964 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; | 6046 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; |
| 5965 static const int kOriginalCodeIndex = kSharedFunctionInfoIndex + kPointerSize; | 6047 static const int kOriginalCodeIndex = kSharedFunctionInfoIndex + kPointerSize; |
| 5966 static const int kPatchedCodeIndex = kOriginalCodeIndex + kPointerSize; | 6048 static const int kPatchedCodeIndex = kOriginalCodeIndex + kPointerSize; |
| 5967 static const int kActiveBreakPointsCountIndex = | 6049 static const int kActiveBreakPointsCountIndex = |
| 5968 kPatchedCodeIndex + kPointerSize; | 6050 kPatchedCodeIndex + kPointerSize; |
| 5969 static const int kBreakPointsStateIndex = | 6051 static const int kBreakPointsStateIndex = |
| 5970 kActiveBreakPointsCountIndex + kPointerSize; | 6052 kActiveBreakPointsCountIndex + kPointerSize; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6002 static void SetBreakPoint(Handle<BreakPointInfo> info, | 6084 static void SetBreakPoint(Handle<BreakPointInfo> info, |
| 6003 Handle<Object> break_point_object); | 6085 Handle<Object> break_point_object); |
| 6004 // Check if break point info has this break point object. | 6086 // Check if break point info has this break point object. |
| 6005 static bool HasBreakPointObject(Handle<BreakPointInfo> info, | 6087 static bool HasBreakPointObject(Handle<BreakPointInfo> info, |
| 6006 Handle<Object> break_point_object); | 6088 Handle<Object> break_point_object); |
| 6007 // Get the number of break points for this code position. | 6089 // Get the number of break points for this code position. |
| 6008 int GetBreakPointCount(); | 6090 int GetBreakPointCount(); |
| 6009 | 6091 |
| 6010 static inline BreakPointInfo* cast(Object* obj); | 6092 static inline BreakPointInfo* cast(Object* obj); |
| 6011 | 6093 |
| 6094 #ifdef OBJECT_PRINT | |
| 6095 void BreakPointInfoPrint(FILE* out = stdout); | |
| 6096 #endif | |
| 6012 #ifdef DEBUG | 6097 #ifdef DEBUG |
| 6013 void BreakPointInfoPrint(); | |
| 6014 void BreakPointInfoVerify(); | 6098 void BreakPointInfoVerify(); |
| 6015 #endif | 6099 #endif |
| 6016 | 6100 |
| 6017 static const int kCodePositionIndex = Struct::kHeaderSize; | 6101 static const int kCodePositionIndex = Struct::kHeaderSize; |
| 6018 static const int kSourcePositionIndex = kCodePositionIndex + kPointerSize; | 6102 static const int kSourcePositionIndex = kCodePositionIndex + kPointerSize; |
| 6019 static const int kStatementPositionIndex = | 6103 static const int kStatementPositionIndex = |
| 6020 kSourcePositionIndex + kPointerSize; | 6104 kSourcePositionIndex + kPointerSize; |
| 6021 static const int kBreakPointObjectsIndex = | 6105 static const int kBreakPointObjectsIndex = |
| 6022 kStatementPositionIndex + kPointerSize; | 6106 kStatementPositionIndex + kPointerSize; |
| 6023 static const int kSize = kBreakPointObjectsIndex + kPointerSize; | 6107 static const int kSize = kBreakPointObjectsIndex + kPointerSize; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6119 } else { | 6203 } else { |
| 6120 value &= ~(1 << bit_position); | 6204 value &= ~(1 << bit_position); |
| 6121 } | 6205 } |
| 6122 return value; | 6206 return value; |
| 6123 } | 6207 } |
| 6124 }; | 6208 }; |
| 6125 | 6209 |
| 6126 } } // namespace v8::internal | 6210 } } // namespace v8::internal |
| 6127 | 6211 |
| 6128 #endif // V8_OBJECTS_H_ | 6212 #endif // V8_OBJECTS_H_ |
| OLD | NEW |