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

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

Issue 3454035: Revert attempt to make heap size 32/64 clean. This change needs to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/regexp-macro-assembler-tracer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ASSERT(IsSmi()); 82 ASSERT(IsSmi());
83 } 83 }
84 84
85 85
86 void Failure::FailureVerify() { 86 void Failure::FailureVerify() {
87 ASSERT(IsFailure()); 87 ASSERT(IsFailure());
88 } 88 }
89 89
90 90
91 void HeapObject::PrintHeader(const char* id) { 91 void HeapObject::PrintHeader(const char* id) {
92 PrintF("%p: [%s]\n", reinterpret_cast<void*>(this), id); 92 PrintF("%p: [%s]\n", this, id);
93 } 93 }
94 94
95 95
96 void HeapObject::HeapObjectPrint() { 96 void HeapObject::HeapObjectPrint() {
97 InstanceType instance_type = map()->instance_type(); 97 InstanceType instance_type = map()->instance_type();
98 98
99 HandleScope scope; 99 HandleScope scope;
100 if (instance_type < FIRST_NONSTRING_TYPE) { 100 if (instance_type < FIRST_NONSTRING_TYPE) {
101 String::cast(this)->StringPrint(); 101 String::cast(this)->StringPrint();
102 return; 102 return;
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 elements()->Print(); 515 elements()->Print();
516 break; 516 break;
517 default: 517 default:
518 UNREACHABLE(); 518 UNREACHABLE();
519 break; 519 break;
520 } 520 }
521 } 521 }
522 522
523 523
524 void JSObject::JSObjectPrint() { 524 void JSObject::JSObjectPrint() {
525 PrintF("%p: [JSObject]\n", reinterpret_cast<void*>(this)); 525 PrintF("%p: [JSObject]\n", this);
526 PrintF(" - map = %p\n", reinterpret_cast<void*>(map())); 526 PrintF(" - map = %p\n", map());
527 PrintF(" - prototype = %p\n", reinterpret_cast<void*>(GetPrototype())); 527 PrintF(" - prototype = %p\n", GetPrototype());
528 PrintF(" {\n"); 528 PrintF(" {\n");
529 PrintProperties(); 529 PrintProperties();
530 PrintElements(); 530 PrintElements();
531 PrintF(" }\n"); 531 PrintF(" }\n");
532 } 532 }
533 533
534 534
535 void JSObject::JSObjectVerify() { 535 void JSObject::JSObjectVerify() {
536 VerifyHeapPointer(properties()); 536 VerifyHeapPointer(properties());
537 VerifyHeapPointer(elements()); 537 VerifyHeapPointer(elements());
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 CHECK(IsString()); 737 CHECK(IsString());
738 CHECK(length() >= 0 && length() <= Smi::kMaxValue); 738 CHECK(length() >= 0 && length() <= Smi::kMaxValue);
739 if (IsSymbol()) { 739 if (IsSymbol()) {
740 CHECK(!Heap::InNewSpace(this)); 740 CHECK(!Heap::InNewSpace(this));
741 } 741 }
742 } 742 }
743 743
744 744
745 void JSFunction::JSFunctionPrint() { 745 void JSFunction::JSFunctionPrint() {
746 HeapObject::PrintHeader("Function"); 746 HeapObject::PrintHeader("Function");
747 PrintF(" - map = 0x%p\n", reinterpret_cast<void*>(map())); 747 PrintF(" - map = 0x%p\n", map());
748 PrintF(" - initial_map = "); 748 PrintF(" - initial_map = ");
749 if (has_initial_map()) { 749 if (has_initial_map()) {
750 initial_map()->ShortPrint(); 750 initial_map()->ShortPrint();
751 } 751 }
752 PrintF("\n - shared_info = "); 752 PrintF("\n - shared_info = ");
753 shared()->ShortPrint(); 753 shared()->ShortPrint();
754 PrintF("\n - name = "); 754 PrintF("\n - name = ");
755 shared()->name()->Print(); 755 shared()->name()->Print();
756 PrintF("\n - context = "); 756 PrintF("\n - context = ");
757 unchecked_context()->ShortPrint(); 757 unchecked_context()->ShortPrint();
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 CHECK(IsBreakPointInfo()); 1217 CHECK(IsBreakPointInfo());
1218 code_position()->SmiVerify(); 1218 code_position()->SmiVerify();
1219 source_position()->SmiVerify(); 1219 source_position()->SmiVerify();
1220 statement_position()->SmiVerify(); 1220 statement_position()->SmiVerify();
1221 VerifyPointer(break_point_objects()); 1221 VerifyPointer(break_point_objects());
1222 } 1222 }
1223 1223
1224 1224
1225 void BreakPointInfo::BreakPointInfoPrint() { 1225 void BreakPointInfo::BreakPointInfoPrint() {
1226 HeapObject::PrintHeader("BreakPointInfo"); 1226 HeapObject::PrintHeader("BreakPointInfo");
1227 PrintF("\n - code_position: %d", code_position()->value()); 1227 PrintF("\n - code_position: %d", code_position());
1228 PrintF("\n - source_position: %d", source_position()->value()); 1228 PrintF("\n - source_position: %d", source_position());
1229 PrintF("\n - statement_position: %d", statement_position()->value()); 1229 PrintF("\n - statement_position: %d", statement_position());
1230 PrintF("\n - break_point_objects: "); 1230 PrintF("\n - break_point_objects: ");
1231 break_point_objects()->ShortPrint(); 1231 break_point_objects()->ShortPrint();
1232 } 1232 }
1233 #endif 1233 #endif
1234 1234
1235 1235
1236 void JSObject::IncrementSpillStatistics(SpillInformation* info) { 1236 void JSObject::IncrementSpillStatistics(SpillInformation* info) {
1237 info->number_of_objects_++; 1237 info->number_of_objects_++;
1238 // Named properties 1238 // Named properties
1239 if (HasFastProperties()) { 1239 if (HasFastProperties()) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 ASSERT(e->IsUndefined()); 1387 ASSERT(e->IsUndefined());
1388 } 1388 }
1389 } 1389 }
1390 } 1390 }
1391 } 1391 }
1392 1392
1393 1393
1394 #endif // DEBUG 1394 #endif // DEBUG
1395 1395
1396 } } // namespace v8::internal 1396 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/regexp-macro-assembler-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698