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

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

Issue 661133002: TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 1 month 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/objects-inl.h ('k') | src/transitions.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/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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 } 1083 }
1084 1084
1085 1085
1086 void TransitionArray::PrintTransitions(std::ostream& os, 1086 void TransitionArray::PrintTransitions(std::ostream& os,
1087 bool print_header) { // NOLINT 1087 bool print_header) { // NOLINT
1088 if (print_header) { 1088 if (print_header) {
1089 os << "Transition array " << number_of_transitions() << "\n"; 1089 os << "Transition array " << number_of_transitions() << "\n";
1090 } 1090 }
1091 for (int i = 0; i < number_of_transitions(); i++) { 1091 for (int i = 0; i < number_of_transitions(); i++) {
1092 Name* key = GetKey(i); 1092 Name* key = GetKey(i);
1093 Map* target = GetTarget(i);
1093 os << " "; 1094 os << " ";
1094 key->NamePrint(os); 1095 key->NamePrint(os);
1095 os << ": "; 1096 os << ": ";
1096 if (key == GetHeap()->frozen_symbol()) { 1097 if (key == GetHeap()->frozen_symbol()) {
1097 os << " (transition to frozen)"; 1098 os << " (transition to frozen)";
1098 } else if (key == GetHeap()->elements_transition_symbol()) { 1099 } else if (key == GetHeap()->elements_transition_symbol()) {
1099 os << " (transition to " 1100 os << " (transition to " << ElementsKindToString(target->elements_kind())
1100 << ElementsKindToString(GetTarget(i)->elements_kind()) << ")"; 1101 << ")";
1101 } else if (key == GetHeap()->observed_symbol()) { 1102 } else if (key == GetHeap()->observed_symbol()) {
1102 os << " (transition to Object.observe)"; 1103 os << " (transition to Object.observe)";
1103 } else { 1104 } else {
1104 PropertyDetails details = GetTargetDetails(i); 1105 PropertyDetails details = GetTargetDetails(key, target);
1105 switch (details.type()) { 1106 switch (details.type()) {
1106 case FIELD: { 1107 case FIELD: {
1107 os << " (transition to field)"; 1108 os << " (transition to field)";
1108 break; 1109 break;
1109 } 1110 }
1110 case CONSTANT: 1111 case CONSTANT:
1111 os << " (transition to constant " << Brief(GetTargetValue(i)) << ")"; 1112 os << " (transition to constant " << Brief(GetTargetValue(i)) << ")";
1112 break; 1113 break;
1113 case CALLBACKS: 1114 case CALLBACKS:
1114 os << " (transition to callback " << Brief(GetTargetValue(i)) << ")"; 1115 os << " (transition to callback " << Brief(GetTargetValue(i)) << ")";
1115 break; 1116 break;
1116 // Values below are never in the target descriptor array. 1117 // Values below are never in the target descriptor array.
1117 case NORMAL: 1118 case NORMAL:
1118 UNREACHABLE(); 1119 UNREACHABLE();
1119 break; 1120 break;
1120 } 1121 }
1121 os << ", attrs: " << details.attributes(); 1122 os << ", attrs: " << details.attributes();
1122 } 1123 }
1123 os << " -> " << Brief(GetTarget(i)) << "\n"; 1124 os << " -> " << Brief(target) << "\n";
1124 } 1125 }
1125 } 1126 }
1126 1127
1127 1128
1128 #endif // OBJECT_PRINT 1129 #endif // OBJECT_PRINT
1129 1130
1130 1131
1131 } } // namespace v8::internal 1132 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698