Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: src/transitions.h

Issue 771323006: Make it possible to turn on OBJECT_PRINT without DEBUG (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TRANSITIONS_H_ 5 #ifndef V8_TRANSITIONS_H_
6 #define V8_TRANSITIONS_H_ 6 #define V8_TRANSITIONS_H_
7 7
8 #include "src/checks.h" 8 #include "src/checks.h"
9 #include "src/elements-kind.h" 9 #include "src/elements-kind.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 static const int kPrototypeTransitionsOffset = kBackPointerStorageOffset + 148 static const int kPrototypeTransitionsOffset = kBackPointerStorageOffset +
149 kPointerSize; 149 kPointerSize;
150 static const int kTransitionLengthOffset = 150 static const int kTransitionLengthOffset =
151 kPrototypeTransitionsOffset + kPointerSize; 151 kPrototypeTransitionsOffset + kPointerSize;
152 152
153 // Layout of map transition entries in full transition arrays. 153 // Layout of map transition entries in full transition arrays.
154 static const int kTransitionKey = 0; 154 static const int kTransitionKey = 0;
155 static const int kTransitionTarget = 1; 155 static const int kTransitionTarget = 1;
156 static const int kTransitionSize = 2; 156 static const int kTransitionSize = 2;
157 157
158 #ifdef DEBUG 158 #if defined(DEBUG) || defined(OBJECT_PRINT)
159 // For our gdb macros, we should perhaps change these in the future. 159 // For our gdb macros, we should perhaps change these in the future.
160 void Print(); 160 void Print();
161 161
162 // Print all the transitions. 162 // Print all the transitions.
163 void PrintTransitions(std::ostream& os, bool print_header = true); // NOLINT 163 void PrintTransitions(std::ostream& os, bool print_header = true); // NOLINT
164 #endif
164 165
166 #ifdef DEBUG
165 bool IsSortedNoDuplicates(int valid_entries = -1); 167 bool IsSortedNoDuplicates(int valid_entries = -1);
166 bool IsConsistentWithBackPointers(Map* current_map); 168 bool IsConsistentWithBackPointers(Map* current_map);
167 bool IsEqualTo(TransitionArray* other); 169 bool IsEqualTo(TransitionArray* other);
168 #endif 170 #endif
169 171
170 // The maximum number of transitions we want in a transition array (should 172 // The maximum number of transitions we want in a transition array (should
171 // fit in a page). 173 // fit in a page).
172 static const int kMaxNumberOfTransitions = 1024 + 512; 174 static const int kMaxNumberOfTransitions = 1024 + 512;
173 175
174 // Returns the fixed array length required to hold number_of_transitions 176 // Returns the fixed array length required to hold number_of_transitions
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 int origin_transition, 211 int origin_transition,
210 int target_transition); 212 int target_transition);
211 213
212 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); 214 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray);
213 }; 215 };
214 216
215 217
216 } } // namespace v8::internal 218 } } // namespace v8::internal
217 219
218 #endif // V8_TRANSITIONS_H_ 220 #endif // V8_TRANSITIONS_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698