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

Side by Side Diff: src/property.cc

Issue 659363002: More details printed for Map, DescriptorArray and TransitionArray. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: gdbinit updated Created 6 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/objects-printer.cc ('k') | src/property-details.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/property.h" 5 #include "src/property.h"
6 6
7 #include "src/handles-inl.h" 7 #include "src/handles-inl.h"
8 #include "src/ostreams.h" 8 #include "src/ostreams.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 13 matching lines...) Expand all
24 if (!r.IsFound()) return os << "Not Found\n"; 24 if (!r.IsFound()) return os << "Not Found\n";
25 25
26 os << "LookupResult:\n"; 26 os << "LookupResult:\n";
27 if (r.IsTransition()) { 27 if (r.IsTransition()) {
28 os << " -transition target:\n" << Brief(r.GetTransitionTarget()) << "\n"; 28 os << " -transition target:\n" << Brief(r.GetTransitionTarget()) << "\n";
29 } 29 }
30 return os; 30 return os;
31 } 31 }
32 32
33 33
34 std::ostream& operator<<(std::ostream& os,
35 const PropertyAttributes& attributes) {
36 os << "[";
37 os << (((attributes & READ_ONLY) == 0) ? "W" : "_"); // writable
38 os << (((attributes & DONT_ENUM) == 0) ? "E" : "_"); // enumerable
39 os << (((attributes & DONT_DELETE) == 0) ? "C" : "_"); // configurable
40 os << "]";
41 return os;
42 }
43
44
45 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details) {
46 os << "(";
47 switch (details.type()) {
48 case NORMAL:
49 os << "normal: dictionary_index: " << details.dictionary_index();
50 break;
51 case CONSTANT:
52 os << "constant: p: " << details.pointer();
53 break;
54 case FIELD:
55 os << "field: " << details.representation().Mnemonic()
56 << ", field_index: " << details.field_index()
57 << ", p: " << details.pointer();
58 break;
59 case CALLBACKS:
60 os << "callbacks: p: " << details.pointer();
61 break;
62 }
63 os << ", attrs: " << details.attributes() << ")";
64 return os;
65 }
66
67
34 std::ostream& operator<<(std::ostream& os, const Descriptor& d) { 68 std::ostream& operator<<(std::ostream& os, const Descriptor& d) {
35 return os << "Descriptor " << Brief(*d.GetKey()) << " @ " 69 return os << "Descriptor " << Brief(*d.GetKey()) << " @ "
36 << Brief(*d.GetValue()); 70 << Brief(*d.GetValue()) << " " << d.GetDetails();
37 } 71 }
38 72
39 } } // namespace v8::internal 73 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698