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

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

Issue 2811183005: Do not use new struct type where unnecessary. (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « src/objects-inl.h ('k') | src/objects/literal-objects.h » ('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 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 <iomanip> 7 #include <iomanip>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } 592 }
593 os << "\n - prototype: " << Brief(prototype()); 593 os << "\n - prototype: " << Brief(prototype());
594 os << "\n - constructor: " << Brief(GetConstructor()); 594 os << "\n - constructor: " << Brief(GetConstructor());
595 os << "\n - code cache: " << Brief(code_cache()); 595 os << "\n - code cache: " << Brief(code_cache());
596 os << "\n - dependent code: " << Brief(dependent_code()); 596 os << "\n - dependent code: " << Brief(dependent_code());
597 os << "\n - construction counter: " << construction_counter(); 597 os << "\n - construction counter: " << construction_counter();
598 os << "\n"; 598 os << "\n";
599 } 599 }
600 600
601 601
602 void TypeFeedbackInfo::TypeFeedbackInfoPrint(std::ostream& os) { // NOLINT
603 HeapObject::PrintHeader(os, "TypeFeedbackInfo");
604 os << "\n - ic_total_count: " << ic_total_count()
605 << ", ic_with_type_info_count: " << ic_with_type_info_count()
606 << ", ic_generic_count: " << ic_generic_count() << "\n";
607 }
608
609
610 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint( 602 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(
611 std::ostream& os) { // NOLINT 603 std::ostream& os) { // NOLINT
612 HeapObject::PrintHeader(os, "AliasedArgumentsEntry"); 604 HeapObject::PrintHeader(os, "AliasedArgumentsEntry");
613 os << "\n - aliased_context_slot: " << aliased_context_slot(); 605 os << "\n - aliased_context_slot: " << aliased_context_slot();
614 } 606 }
615 607
616 608
617 void FixedArray::FixedArrayPrint(std::ostream& os) { // NOLINT 609 void FixedArray::FixedArrayPrint(std::ostream& os) { // NOLINT
618 HeapObject::PrintHeader(os, "FixedArray"); 610 HeapObject::PrintHeader(os, "FixedArray");
619 os << "\n - map = " << Brief(map()); 611 os << "\n - map = " << Brief(map());
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 os << "\n"; 1323 os << "\n";
1332 } 1324 }
1333 1325
1334 void ContextExtension::ContextExtensionPrint(std::ostream& os) { // NOLINT 1326 void ContextExtension::ContextExtensionPrint(std::ostream& os) { // NOLINT
1335 HeapObject::PrintHeader(os, "ContextExtension"); 1327 HeapObject::PrintHeader(os, "ContextExtension");
1336 os << "\n - scope_info: " << Brief(scope_info()); 1328 os << "\n - scope_info: " << Brief(scope_info());
1337 os << "\n - extension: " << Brief(extension()); 1329 os << "\n - extension: " << Brief(extension());
1338 os << "\n"; 1330 os << "\n";
1339 } 1331 }
1340 1332
1341 void ConstantElementsPair::ConstantElementsPairPrint(
1342 std::ostream& os) { // NOLINT
1343 HeapObject::PrintHeader(os, "ConstantElementsPair");
1344 os << "\n - elements_kind: " << static_cast<ElementsKind>(elements_kind());
1345 os << "\n - constant_values: " << Brief(constant_values());
1346 os << "\n";
1347 }
1348
1349 void AccessorPair::AccessorPairPrint(std::ostream& os) { // NOLINT 1333 void AccessorPair::AccessorPairPrint(std::ostream& os) { // NOLINT
1350 HeapObject::PrintHeader(os, "AccessorPair"); 1334 HeapObject::PrintHeader(os, "AccessorPair");
1351 os << "\n - getter: " << Brief(getter()); 1335 os << "\n - getter: " << Brief(getter());
1352 os << "\n - setter: " << Brief(setter()); 1336 os << "\n - setter: " << Brief(setter());
1353 os << "\n"; 1337 os << "\n";
1354 } 1338 }
1355 1339
1356 1340
1357 void AccessCheckInfo::AccessCheckInfoPrint(std::ostream& os) { // NOLINT 1341 void AccessCheckInfo::AccessCheckInfoPrint(std::ostream& os) { // NOLINT
1358 HeapObject::PrintHeader(os, "AccessCheckInfo"); 1342 HeapObject::PrintHeader(os, "AccessCheckInfo");
(...skipping 10 matching lines...) Expand all
1369 os << "\n - getter: " << Brief(getter()); 1353 os << "\n - getter: " << Brief(getter());
1370 os << "\n - setter: " << Brief(setter()); 1354 os << "\n - setter: " << Brief(setter());
1371 os << "\n - query: " << Brief(query()); 1355 os << "\n - query: " << Brief(query());
1372 os << "\n - deleter: " << Brief(deleter()); 1356 os << "\n - deleter: " << Brief(deleter());
1373 os << "\n - enumerator: " << Brief(enumerator()); 1357 os << "\n - enumerator: " << Brief(enumerator());
1374 os << "\n - data: " << Brief(data()); 1358 os << "\n - data: " << Brief(data());
1375 os << "\n"; 1359 os << "\n";
1376 } 1360 }
1377 1361
1378 1362
1379 void CallHandlerInfo::CallHandlerInfoPrint(std::ostream& os) { // NOLINT
1380 HeapObject::PrintHeader(os, "CallHandlerInfo");
1381 os << "\n - callback: " << Brief(callback());
1382 os << "\n - data: " << Brief(data());
1383 os << "\n";
1384 }
1385
1386
1387 void FunctionTemplateInfo::FunctionTemplateInfoPrint( 1363 void FunctionTemplateInfo::FunctionTemplateInfoPrint(
1388 std::ostream& os) { // NOLINT 1364 std::ostream& os) { // NOLINT
1389 HeapObject::PrintHeader(os, "FunctionTemplateInfo"); 1365 HeapObject::PrintHeader(os, "FunctionTemplateInfo");
1390 os << "\n - class name: " << Brief(class_name()); 1366 os << "\n - class name: " << Brief(class_name());
1391 os << "\n - tag: " << Brief(tag()); 1367 os << "\n - tag: " << Brief(tag());
1392 os << "\n - serial_number: " << Brief(serial_number()); 1368 os << "\n - serial_number: " << Brief(serial_number());
1393 os << "\n - property_list: " << Brief(property_list()); 1369 os << "\n - property_list: " << Brief(property_list());
1394 os << "\n - call_code: " << Brief(call_code()); 1370 os << "\n - call_code: " << Brief(call_code());
1395 os << "\n - property_accessors: " << Brief(property_accessors()); 1371 os << "\n - property_accessors: " << Brief(property_accessors());
1396 os << "\n - prototype_template: " << Brief(prototype_template()); 1372 os << "\n - prototype_template: " << Brief(prototype_template());
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 1454
1479 void DebugInfo::DebugInfoPrint(std::ostream& os) { // NOLINT 1455 void DebugInfo::DebugInfoPrint(std::ostream& os) { // NOLINT
1480 HeapObject::PrintHeader(os, "DebugInfo"); 1456 HeapObject::PrintHeader(os, "DebugInfo");
1481 os << "\n - shared: " << Brief(shared()); 1457 os << "\n - shared: " << Brief(shared());
1482 os << "\n - debug bytecode array: " << Brief(debug_bytecode_array()); 1458 os << "\n - debug bytecode array: " << Brief(debug_bytecode_array());
1483 os << "\n - break_points: "; 1459 os << "\n - break_points: ";
1484 break_points()->Print(os); 1460 break_points()->Print(os);
1485 } 1461 }
1486 1462
1487 1463
1488 void BreakPointInfo::BreakPointInfoPrint(std::ostream& os) { // NOLINT
1489 HeapObject::PrintHeader(os, "BreakPointInfo");
1490 os << "\n - source_position: " << source_position();
1491 os << "\n - break_point_objects: " << Brief(break_point_objects());
1492 os << "\n";
1493 }
1494
1495 void StackFrameInfo::StackFrameInfoPrint(std::ostream& os) { // NOLINT 1464 void StackFrameInfo::StackFrameInfoPrint(std::ostream& os) { // NOLINT
1496 HeapObject::PrintHeader(os, "StackFrame"); 1465 HeapObject::PrintHeader(os, "StackFrame");
1497 os << "\n - line_number: " << line_number(); 1466 os << "\n - line_number: " << line_number();
1498 os << "\n - column_number: " << column_number(); 1467 os << "\n - column_number: " << column_number();
1499 os << "\n - script_id: " << script_id(); 1468 os << "\n - script_id: " << script_id();
1500 os << "\n - script_name: " << Brief(script_name()); 1469 os << "\n - script_name: " << Brief(script_name());
1501 os << "\n - script_name_or_source_url: " 1470 os << "\n - script_name_or_source_url: "
1502 << Brief(script_name_or_source_url()); 1471 << Brief(script_name_or_source_url());
1503 os << "\n - function_name: " << Brief(function_name()); 1472 os << "\n - function_name: " << Brief(function_name());
1504 os << "\n - is_eval: " << (is_eval() ? "true" : "false"); 1473 os << "\n - is_eval: " << (is_eval() ? "true" : "false");
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 printf("Not a transition array\n"); 1732 printf("Not a transition array\n");
1764 } else { 1733 } else {
1765 reinterpret_cast<i::TransitionArray*>(object)->Print(); 1734 reinterpret_cast<i::TransitionArray*>(object)->Print();
1766 } 1735 }
1767 } 1736 }
1768 1737
1769 extern void _v8_internal_Print_StackTrace() { 1738 extern void _v8_internal_Print_StackTrace() {
1770 i::Isolate* isolate = i::Isolate::Current(); 1739 i::Isolate* isolate = i::Isolate::Current();
1771 isolate->PrintStack(stdout); 1740 isolate->PrintStack(stdout);
1772 } 1741 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/objects/literal-objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698