Index: src/property.cc |
diff --git a/src/property.cc b/src/property.cc |
index 1c2666b00ac436893c81db3da6280fd8b8b8b6be..1ff1dc63a0796ceb91c70635c416e190f44e23c9 100644 |
--- a/src/property.cc |
+++ b/src/property.cc |
@@ -25,13 +25,25 @@ std::ostream& operator<<(std::ostream& os, |
Descriptor Descriptor::DataField(Handle<Name> key, int field_index, |
PropertyAttributes attributes, |
Representation representation) { |
- return DataField(key, field_index, FieldType::Any(key->GetIsolate()), |
- attributes, representation); |
+ return DataField(key, field_index, attributes, kMutable, representation, |
+ FieldType::Any(key->GetIsolate())); |
+} |
+ |
+Descriptor Descriptor::DataField(Handle<Name> key, int field_index, |
+ PropertyAttributes attributes, |
+ PropertyConstness constness, |
+ Representation representation, |
+ Handle<Object> wrapped_field_type) { |
+ DCHECK(wrapped_field_type->IsSmi() || wrapped_field_type->IsWeakCell()); |
+ PropertyDetails details(kData, attributes, kField, constness, representation, |
+ field_index); |
+ return Descriptor(key, wrapped_field_type, details); |
} |
// Outputs PropertyDetails as a dictionary details. |
void PropertyDetails::PrintAsSlowTo(std::ostream& os) { |
os << "("; |
+ if (constness() == kConst) os << "const "; |
os << (kind() == kData ? "data" : "accessor"); |
os << ", dictionary_index: " << dictionary_index(); |
os << ", attrs: " << attributes() << ")"; |
@@ -40,6 +52,7 @@ void PropertyDetails::PrintAsSlowTo(std::ostream& os) { |
// Outputs PropertyDetails as a descriptor array details. |
void PropertyDetails::PrintAsFastTo(std::ostream& os, PrintMode mode) { |
os << "("; |
+ if (constness() == kConst) os << "const "; |
os << (kind() == kData ? "data" : "accessor"); |
if (location() == kField) { |
os << " field"; |