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

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

Issue 856503002: Massive renaming of PropertyType values and other implied stuff. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Spurious file addition fixed Created 5 years, 11 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/ppc/macro-assembler-ppc.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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 225
226 void JSObject::PrintProperties(std::ostream& os) { // NOLINT 226 void JSObject::PrintProperties(std::ostream& os) { // NOLINT
227 if (HasFastProperties()) { 227 if (HasFastProperties()) {
228 DescriptorArray* descs = map()->instance_descriptors(); 228 DescriptorArray* descs = map()->instance_descriptors();
229 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { 229 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) {
230 os << " "; 230 os << " ";
231 descs->GetKey(i)->NamePrint(os); 231 descs->GetKey(i)->NamePrint(os);
232 os << ": "; 232 os << ": ";
233 switch (descs->GetType(i)) { 233 switch (descs->GetType(i)) {
234 case FIELD: { 234 case DATA: {
235 FieldIndex index = FieldIndex::ForDescriptor(map(), i); 235 FieldIndex index = FieldIndex::ForDescriptor(map(), i);
236 if (IsUnboxedDoubleField(index)) { 236 if (IsUnboxedDoubleField(index)) {
237 os << "<unboxed double> " << RawFastDoublePropertyAt(index); 237 os << "<unboxed double> " << RawFastDoublePropertyAt(index);
238 } else { 238 } else {
239 os << Brief(RawFastPropertyAt(index)); 239 os << Brief(RawFastPropertyAt(index));
240 } 240 }
241 os << " (field at offset " << index.property_index() << ")\n"; 241 os << " (data field at offset " << index.property_index() << ")\n";
242 break; 242 break;
243 } 243 }
244 case ACCESSOR_FIELD: { 244 case ACCESSOR: {
245 FieldIndex index = FieldIndex::ForDescriptor(map(), i); 245 FieldIndex index = FieldIndex::ForDescriptor(map(), i);
246 os << " (accessor at offset " << index.property_index() << ")\n"; 246 os << " (accessor field at offset " << index.property_index()
247 << ")\n";
247 break; 248 break;
248 } 249 }
249 case CONSTANT: 250 case DATA_CONSTANT:
250 os << Brief(descs->GetConstant(i)) << " (constant)\n"; 251 os << Brief(descs->GetConstant(i)) << " (data constant)\n";
251 break; 252 break;
252 case CALLBACKS: 253 case ACCESSOR_CONSTANT:
253 os << Brief(descs->GetCallbacksObject(i)) << " (callbacks)\n"; 254 os << Brief(descs->GetCallbacksObject(i)) << " (accessor constant)\n";
254 break; 255 break;
255 } 256 }
256 } 257 }
257 } else { 258 } else {
258 property_dictionary()->Print(os); 259 property_dictionary()->Print(os);
259 } 260 }
260 } 261 }
261 262
262 263
263 template <class T> 264 template <class T>
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 } else if (key == GetHeap()->frozen_symbol()) { 1171 } else if (key == GetHeap()->frozen_symbol()) {
1171 os << " (transition to frozen)"; 1172 os << " (transition to frozen)";
1172 } else if (key == GetHeap()->elements_transition_symbol()) { 1173 } else if (key == GetHeap()->elements_transition_symbol()) {
1173 os << " (transition to " << ElementsKindToString(target->elements_kind()) 1174 os << " (transition to " << ElementsKindToString(target->elements_kind())
1174 << ")"; 1175 << ")";
1175 } else if (key == GetHeap()->observed_symbol()) { 1176 } else if (key == GetHeap()->observed_symbol()) {
1176 os << " (transition to Object.observe)"; 1177 os << " (transition to Object.observe)";
1177 } else { 1178 } else {
1178 PropertyDetails details = GetTargetDetails(key, target); 1179 PropertyDetails details = GetTargetDetails(key, target);
1179 os << " (transition to "; 1180 os << " (transition to ";
1180 if (details.location() == IN_DESCRIPTOR) { 1181 if (details.location() == kDescriptor) {
1181 os << "immutable "; 1182 os << "immutable ";
1182 } 1183 }
1183 os << (details.kind() == DATA ? "data" : "accessor"); 1184 os << (details.kind() == kData ? "data" : "accessor");
1184 if (details.location() == IN_DESCRIPTOR) { 1185 if (details.location() == kDescriptor) {
1185 os << " " << Brief(GetTargetValue(i)); 1186 os << " " << Brief(GetTargetValue(i));
1186 } 1187 }
1187 os << "), attrs: " << details.attributes(); 1188 os << "), attrs: " << details.attributes();
1188 } 1189 }
1189 os << " -> " << Brief(target) << "\n"; 1190 os << " -> " << Brief(target) << "\n";
1190 } 1191 }
1191 } 1192 }
1192 1193
1193 1194
1194 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1195 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1195 if (!map()->HasTransitionArray()) return; 1196 if (!map()->HasTransitionArray()) return;
1196 map()->transitions()->PrintTransitions(os, false); 1197 map()->transitions()->PrintTransitions(os, false);
1197 } 1198 }
1198 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1199 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1199 } } // namespace v8::internal 1200 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698