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

Side by Side Diff: src/objects-printer.cc

Issue 2043183003: Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplifying checks Created 4 years, 6 months 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
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 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 1184
1185 void LayoutDescriptor::Print() { 1185 void LayoutDescriptor::Print() {
1186 OFStream os(stdout); 1186 OFStream os(stdout);
1187 this->Print(os); 1187 this->Print(os);
1188 os << std::flush; 1188 os << std::flush;
1189 } 1189 }
1190 1190
1191 1191
1192 void LayoutDescriptor::Print(std::ostream& os) { // NOLINT 1192 void LayoutDescriptor::Print(std::ostream& os) { // NOLINT
1193 os << "Layout descriptor: "; 1193 os << "Layout descriptor: ";
1194 if (IsUninitialized()) { 1194 if (IsOddball() && IsUninitialized(HeapObject::cast(this)->GetIsolate())) {
1195 os << "<uninitialized>"; 1195 os << "<uninitialized>";
1196 } else if (IsFastPointerLayout()) { 1196 } else if (IsFastPointerLayout()) {
1197 os << "<all tagged>"; 1197 os << "<all tagged>";
1198 } else if (IsSmi()) { 1198 } else if (IsSmi()) {
1199 os << "fast"; 1199 os << "fast";
1200 PrintBitMask(os, static_cast<uint32_t>(Smi::cast(this)->value())); 1200 PrintBitMask(os, static_cast<uint32_t>(Smi::cast(this)->value()));
1201 } else { 1201 } else {
1202 os << "slow"; 1202 os << "slow";
1203 int len = length(); 1203 int len = length();
1204 for (int i = 0; i < len; i++) { 1204 for (int i = 0; i < len; i++) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1341 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1342 Object* transitions = map()->raw_transitions(); 1342 Object* transitions = map()->raw_transitions();
1343 int num_transitions = TransitionArray::NumberOfTransitions(transitions); 1343 int num_transitions = TransitionArray::NumberOfTransitions(transitions);
1344 if (num_transitions == 0) return; 1344 if (num_transitions == 0) return;
1345 os << "\n - transitions"; 1345 os << "\n - transitions";
1346 TransitionArray::PrintTransitions(os, transitions, false); 1346 TransitionArray::PrintTransitions(os, transitions, false);
1347 } 1347 }
1348 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1348 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1349 } // namespace internal 1349 } // namespace internal
1350 } // namespace v8 1350 } // namespace v8
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | src/prototype.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698