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

Unified Diff: src/property.cc

Issue 805453002: Introduced PropertyType ACCESSOR_FIELD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-printer.cc ('k') | src/property-details.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.cc
diff --git a/src/property.cc b/src/property.cc
index 512527a5defff6cecf678fafab8473f3f5f6515e..d00998c2564d99e23f06bf0c1a3174d7dd7b68e0 100644
--- a/src/property.cc
+++ b/src/property.cc
@@ -51,18 +51,11 @@ struct FastPropertyDetails {
// Outputs PropertyDetails as a dictionary details.
std::ostream& operator<<(std::ostream& os, const PropertyDetails& details) {
os << "(";
- switch (details.type()) {
- case FIELD:
- os << "normal: ";
- break;
- case CALLBACKS:
- os << "callbacks: ";
- break;
- case CONSTANT:
- UNREACHABLE();
- break;
+ if (details.location() == IN_DESCRIPTOR) {
+ os << "immutable ";
}
- return os << " dictionary_index: " << details.dictionary_index()
+ os << (details.kind() == DATA ? "data" : "accessor");
+ return os << ", dictionary_index: " << details.dictionary_index()
<< ", attrs: " << details.attributes() << ")";
}
@@ -72,20 +65,16 @@ std::ostream& operator<<(std::ostream& os,
const FastPropertyDetails& details_fast) {
const PropertyDetails& details = details_fast.details;
os << "(";
- switch (details.type()) {
- case CONSTANT:
- os << "constant: p: " << details.pointer();
- break;
- case FIELD:
- os << "field: " << details.representation().Mnemonic()
- << ", field_index: " << details.field_index()
- << ", p: " << details.pointer();
- break;
- case CALLBACKS:
- os << "callbacks: p: " << details.pointer();
- break;
+ if (details.location() == IN_DESCRIPTOR) {
+ os << "immutable ";
}
- return os << ", attrs: " << details.attributes() << ")";
+ os << (details.kind() == DATA ? "data" : "accessor");
+ if (details.location() == IN_OBJECT) {
+ os << ": " << details.representation().Mnemonic()
+ << ", field_index: " << details.field_index();
+ }
+ return os << ", p: " << details.pointer()
+ << ", attrs: " << details.attributes() << ")";
}
« 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