| 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 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 DECLARE_CAST(JSObject) | 2136 DECLARE_CAST(JSObject) |
| 2137 | 2137 |
| 2138 // Dispatched behavior. | 2138 // Dispatched behavior. |
| 2139 void JSObjectShortPrint(StringStream* accumulator); | 2139 void JSObjectShortPrint(StringStream* accumulator); |
| 2140 DECLARE_PRINTER(JSObject) | 2140 DECLARE_PRINTER(JSObject) |
| 2141 DECLARE_VERIFIER(JSObject) | 2141 DECLARE_VERIFIER(JSObject) |
| 2142 #ifdef OBJECT_PRINT | 2142 #ifdef OBJECT_PRINT |
| 2143 void PrintProperties(std::ostream& os); // NOLINT | 2143 void PrintProperties(std::ostream& os); // NOLINT |
| 2144 void PrintElements(std::ostream& os); // NOLINT | 2144 void PrintElements(std::ostream& os); // NOLINT |
| 2145 #endif | 2145 #endif |
| 2146 #ifdef DEBUG | 2146 #if defined(DEBUG) || defined(OBJECT_PRINT) |
| 2147 void PrintTransitions(std::ostream& os); // NOLINT | 2147 void PrintTransitions(std::ostream& os); // NOLINT |
| 2148 #endif | 2148 #endif |
| 2149 | 2149 |
| 2150 static void PrintElementsTransition( | 2150 static void PrintElementsTransition( |
| 2151 FILE* file, Handle<JSObject> object, | 2151 FILE* file, Handle<JSObject> object, |
| 2152 ElementsKind from_kind, Handle<FixedArrayBase> from_elements, | 2152 ElementsKind from_kind, Handle<FixedArrayBase> from_elements, |
| 2153 ElementsKind to_kind, Handle<FixedArrayBase> to_elements); | 2153 ElementsKind to_kind, Handle<FixedArrayBase> to_elements); |
| 2154 | 2154 |
| 2155 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map); | 2155 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map); |
| 2156 | 2156 |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3063 | 3063 |
| 3064 // Layout description for the bridge array. | 3064 // Layout description for the bridge array. |
| 3065 static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize; | 3065 static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize; |
| 3066 | 3066 |
| 3067 // Layout of descriptor. | 3067 // Layout of descriptor. |
| 3068 static const int kDescriptorKey = 0; | 3068 static const int kDescriptorKey = 0; |
| 3069 static const int kDescriptorDetails = 1; | 3069 static const int kDescriptorDetails = 1; |
| 3070 static const int kDescriptorValue = 2; | 3070 static const int kDescriptorValue = 2; |
| 3071 static const int kDescriptorSize = 3; | 3071 static const int kDescriptorSize = 3; |
| 3072 | 3072 |
| 3073 #ifdef DEBUG | 3073 #if defined(DEBUG) || defined(OBJECT_PRINT) |
| 3074 // For our gdb macros, we should perhaps change these in the future. | 3074 // For our gdb macros, we should perhaps change these in the future. |
| 3075 void Print(); | 3075 void Print(); |
| 3076 | 3076 |
| 3077 // Print all the descriptors. | 3077 // Print all the descriptors. |
| 3078 void PrintDescriptors(std::ostream& os); // NOLINT | 3078 void PrintDescriptors(std::ostream& os); // NOLINT |
| 3079 #endif |
| 3079 | 3080 |
| 3081 #ifdef DEBUG |
| 3080 // Is the descriptor array sorted and without duplicates? | 3082 // Is the descriptor array sorted and without duplicates? |
| 3081 bool IsSortedNoDuplicates(int valid_descriptors = -1); | 3083 bool IsSortedNoDuplicates(int valid_descriptors = -1); |
| 3082 | 3084 |
| 3083 // Is the descriptor array consistent with the back pointers in targets? | 3085 // Is the descriptor array consistent with the back pointers in targets? |
| 3084 bool IsConsistentWithBackPointers(Map* current_map); | 3086 bool IsConsistentWithBackPointers(Map* current_map); |
| 3085 | 3087 |
| 3086 // Are two DescriptorArrays equal? | 3088 // Are two DescriptorArrays equal? |
| 3087 bool IsEqualTo(DescriptorArray* other); | 3089 bool IsEqualTo(DescriptorArray* other); |
| 3088 #endif | 3090 #endif |
| 3089 | 3091 |
| (...skipping 5861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8951 DECLARE_CAST(String) | 8953 DECLARE_CAST(String) |
| 8952 | 8954 |
| 8953 void PrintOn(FILE* out); | 8955 void PrintOn(FILE* out); |
| 8954 | 8956 |
| 8955 // For use during stack traces. Performs rudimentary sanity check. | 8957 // For use during stack traces. Performs rudimentary sanity check. |
| 8956 bool LooksValid(); | 8958 bool LooksValid(); |
| 8957 | 8959 |
| 8958 // Dispatched behavior. | 8960 // Dispatched behavior. |
| 8959 void StringShortPrint(StringStream* accumulator); | 8961 void StringShortPrint(StringStream* accumulator); |
| 8960 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT | 8962 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT |
| 8961 #ifdef DEBUG | 8963 #if defined(DEBUG) || defined(OBJECT_PRINT) |
| 8962 char* ToAsciiArray(); | 8964 char* ToAsciiArray(); |
| 8963 #endif | 8965 #endif |
| 8964 DECLARE_PRINTER(String) | 8966 DECLARE_PRINTER(String) |
| 8965 DECLARE_VERIFIER(String) | 8967 DECLARE_VERIFIER(String) |
| 8966 | 8968 |
| 8967 inline bool IsFlat(); | 8969 inline bool IsFlat(); |
| 8968 | 8970 |
| 8969 // Layout description. | 8971 // Layout description. |
| 8970 static const int kLengthOffset = Name::kSize; | 8972 static const int kLengthOffset = Name::kSize; |
| 8971 static const int kSize = kLengthOffset + kPointerSize; | 8973 static const int kSize = kLengthOffset + kPointerSize; |
| (...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11007 } else { | 11009 } else { |
| 11008 value &= ~(1 << bit_position); | 11010 value &= ~(1 << bit_position); |
| 11009 } | 11011 } |
| 11010 return value; | 11012 return value; |
| 11011 } | 11013 } |
| 11012 }; | 11014 }; |
| 11013 | 11015 |
| 11014 } } // namespace v8::internal | 11016 } } // namespace v8::internal |
| 11015 | 11017 |
| 11016 #endif // V8_OBJECTS_H_ | 11018 #endif // V8_OBJECTS_H_ |
| OLD | NEW |