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

Unified Diff: src/property.h

Issue 2591233002: [runtime] Add PropertyConstness bit to PropertyDetails. (Closed)
Patch Set: Addressed comments, used better name: IsGeneralizableTo Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index 177f06b7694094700fdc4a6591c67e7d289af2aa..779afeeac5275a1fa1f66408dea2b5478a359514 100644
--- a/src/property.h
+++ b/src/property.h
@@ -33,24 +33,21 @@ class Descriptor final BASE_EMBEDDED {
Representation representation);
static Descriptor DataField(Handle<Name> key, int field_index,
- Handle<Object> wrapped_field_type,
PropertyAttributes attributes,
- Representation representation) {
- DCHECK(wrapped_field_type->IsSmi() || wrapped_field_type->IsWeakCell());
- return Descriptor(key, wrapped_field_type, kData, attributes, kField,
- representation, field_index);
- }
+ PropertyConstness constness,
+ Representation representation,
+ Handle<Object> wrapped_field_type);
static Descriptor DataConstant(Handle<Name> key, Handle<Object> value,
PropertyAttributes attributes) {
- return Descriptor(key, value, kData, attributes, kDescriptor,
- value->OptimalRepresentation());
+ return Descriptor(key, value, kData, attributes, kDescriptor, kConst,
+ value->OptimalRepresentation(), 0);
}
static Descriptor AccessorConstant(Handle<Name> key, Handle<Object> foreign,
PropertyAttributes attributes) {
- return Descriptor(key, foreign, kAccessor, attributes, kDescriptor,
- Representation::Tagged());
+ return Descriptor(key, foreign, kAccessor, attributes, kDescriptor, kConst,
+ Representation::Tagged(), 0);
}
private:
@@ -75,10 +72,12 @@ class Descriptor final BASE_EMBEDDED {
Descriptor(Handle<Name> key, Handle<Object> value, PropertyKind kind,
PropertyAttributes attributes, PropertyLocation location,
- Representation representation, int field_index = 0)
+ PropertyConstness constness, Representation representation,
+ int field_index)
: key_(key),
value_(value),
- details_(kind, attributes, location, representation, field_index) {
+ details_(kind, attributes, location, constness, representation,
+ field_index) {
DCHECK(key->IsUniqueName());
DCHECK_IMPLIES(key->IsPrivate(), !details_.IsEnumerable());
}
« no previous file with comments | « src/objects.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698