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

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

Issue 1033653002: Move prototype metadata from internal properties to prototype maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: small fixes Created 5 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/transitions.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 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/v8.h" 5 #include "src/v8.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/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 HeapObject::PrintHeader(os, "Map"); 409 HeapObject::PrintHeader(os, "Map");
410 os << " - type: " << TypeToString(instance_type()) << "\n"; 410 os << " - type: " << TypeToString(instance_type()) << "\n";
411 os << " - instance size: " << instance_size() << "\n"; 411 os << " - instance size: " << instance_size() << "\n";
412 os << " - inobject properties: " << inobject_properties() << "\n"; 412 os << " - inobject properties: " << inobject_properties() << "\n";
413 os << " - elements kind: " << ElementsKindToString(elements_kind()); 413 os << " - elements kind: " << ElementsKindToString(elements_kind());
414 os << "\n - pre-allocated property fields: " 414 os << "\n - pre-allocated property fields: "
415 << pre_allocated_property_fields() << "\n"; 415 << pre_allocated_property_fields() << "\n";
416 os << " - unused property fields: " << unused_property_fields() << "\n"; 416 os << " - unused property fields: " << unused_property_fields() << "\n";
417 if (is_deprecated()) os << " - deprecated_map\n"; 417 if (is_deprecated()) os << " - deprecated_map\n";
418 if (is_dictionary_map()) os << " - dictionary_map\n"; 418 if (is_dictionary_map()) os << " - dictionary_map\n";
419 if (is_prototype_map()) os << " - prototype_map\n"; 419 if (is_prototype_map()) {
420 os << " - prototype_map\n";
421 os << " - prototype info: " << Brief(prototype_info());
422 } else {
423 os << " - back pointer: " << Brief(GetBackPointer());
424 }
420 if (is_hidden_prototype()) os << " - hidden_prototype\n"; 425 if (is_hidden_prototype()) os << " - hidden_prototype\n";
421 if (has_named_interceptor()) os << " - named_interceptor\n"; 426 if (has_named_interceptor()) os << " - named_interceptor\n";
422 if (has_indexed_interceptor()) os << " - indexed_interceptor\n"; 427 if (has_indexed_interceptor()) os << " - indexed_interceptor\n";
423 if (is_undetectable()) os << " - undetectable\n"; 428 if (is_undetectable()) os << " - undetectable\n";
424 if (has_instance_call_handler()) os << " - instance_call_handler\n"; 429 if (has_instance_call_handler()) os << " - instance_call_handler\n";
425 if (is_access_check_needed()) os << " - access_check_needed\n"; 430 if (is_access_check_needed()) os << " - access_check_needed\n";
426 if (!is_extensible()) os << " - non-extensible\n"; 431 if (!is_extensible()) os << " - non-extensible\n";
427 if (is_observed()) os << " - observed\n"; 432 if (is_observed()) os << " - observed\n";
428 os << " - back pointer: " << Brief(GetBackPointer());
429 os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "") 433 os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "")
430 << "#" << NumberOfOwnDescriptors() << ": " 434 << "#" << NumberOfOwnDescriptors() << ": "
431 << Brief(instance_descriptors()); 435 << Brief(instance_descriptors());
432 if (FLAG_unbox_double_fields) { 436 if (FLAG_unbox_double_fields) {
433 os << "\n - layout descriptor: " << Brief(layout_descriptor()); 437 os << "\n - layout descriptor: " << Brief(layout_descriptor());
434 } 438 }
435 if (TransitionArray::NumberOfTransitions(raw_transitions()) > 0) { 439 if (TransitionArray::NumberOfTransitions(raw_transitions()) > 0) {
436 os << "\n - transitions: "; 440 os << "\n - transitions: ";
437 TransitionArray::PrintTransitions(os, raw_transitions()); 441 TransitionArray::PrintTransitions(os, raw_transitions());
438 } 442 }
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 870 }
867 871
868 872
869 void Box::BoxPrint(std::ostream& os) { // NOLINT 873 void Box::BoxPrint(std::ostream& os) { // NOLINT
870 HeapObject::PrintHeader(os, "Box"); 874 HeapObject::PrintHeader(os, "Box");
871 os << "\n - value: " << Brief(value()); 875 os << "\n - value: " << Brief(value());
872 os << "\n"; 876 os << "\n";
873 } 877 }
874 878
875 879
880 void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT
881 HeapObject::PrintHeader(os, "PrototypeInfo");
882 os << "\n - prototype users: " << Brief(prototype_users());
883 os << "\n - validity cell: " << Brief(validity_cell());
884 os << "\n";
885 }
886
887
876 void AccessorPair::AccessorPairPrint(std::ostream& os) { // NOLINT 888 void AccessorPair::AccessorPairPrint(std::ostream& os) { // NOLINT
877 HeapObject::PrintHeader(os, "AccessorPair"); 889 HeapObject::PrintHeader(os, "AccessorPair");
878 os << "\n - getter: " << Brief(getter()); 890 os << "\n - getter: " << Brief(getter());
879 os << "\n - setter: " << Brief(setter()); 891 os << "\n - setter: " << Brief(setter());
880 os << "\n"; 892 os << "\n";
881 } 893 }
882 894
883 895
884 void AccessCheckInfo::AccessCheckInfoPrint(std::ostream& os) { // NOLINT 896 void AccessCheckInfo::AccessCheckInfoPrint(std::ostream& os) { // NOLINT
885 HeapObject::PrintHeader(os, "AccessCheckInfo"); 897 HeapObject::PrintHeader(os, "AccessCheckInfo");
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 os << " -> " << Brief(target) << "\n"; 1201 os << " -> " << Brief(target) << "\n";
1190 } 1202 }
1191 } 1203 }
1192 1204
1193 1205
1194 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1206 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1195 TransitionArray::PrintTransitions(os, map()->raw_transitions()); 1207 TransitionArray::PrintTransitions(os, map()->raw_transitions());
1196 } 1208 }
1197 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1209 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1198 } } // namespace v8::internal 1210 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698