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

Unified Diff: src/ast/ast.h

Issue 2632503003: [runtime] Allocate space for computed property names (Closed)
Patch Set: Comments and reorder. 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 | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 9a87328a7b98ad1cb1fc62a9da26d03d1fdfc5cd..eadbd291afd8c7a1cff66341306ffde8fa3448f7 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -1402,6 +1402,9 @@ class ObjectLiteral final : public MaterializedLiteral {
bool has_rest_property() const {
return HasRestPropertyField::decode(bit_field_);
}
+ bool has_seen_proto() const {
+ return HasSeenProtoPropertyField::decode(bit_field_);
+ }
// Decide if a property should be in the object boilerplate.
static bool IsBoilerplateProperty(Property* property);
@@ -1473,7 +1476,7 @@ class ObjectLiteral final : public MaterializedLiteral {
friend class AstNodeFactory;
ObjectLiteral(ZoneList<Property*>* properties, int literal_index,
- uint32_t boilerplate_properties, int pos,
+ uint32_t boilerplate_properties, bool has_seen_proto, int pos,
bool has_rest_property)
: MaterializedLiteral(literal_index, pos, kObjectLiteral),
boilerplate_properties_(boilerplate_properties),
@@ -1481,7 +1484,8 @@ class ObjectLiteral final : public MaterializedLiteral {
bit_field_ |= FastElementsField::encode(false) |
HasElementsField::encode(false) |
MayStoreDoublesField::encode(false) |
- HasRestPropertyField::encode(has_rest_property);
+ HasRestPropertyField::encode(has_rest_property) |
+ HasSeenProtoPropertyField::encode(has_seen_proto);
}
static int parent_num_ids() { return MaterializedLiteral::num_ids(); }
@@ -1499,6 +1503,8 @@ class ObjectLiteral final : public MaterializedLiteral {
: public BitField<bool, HasElementsField::kNext, 1> {};
class HasRestPropertyField
: public BitField<bool, MayStoreDoublesField::kNext, 1> {};
+ class HasSeenProtoPropertyField
+ : public BitField<bool, HasRestPropertyField::kNext, 1> {};
};
@@ -3337,10 +3343,11 @@ class AstNodeFactory final BASE_EMBEDDED {
ObjectLiteral* NewObjectLiteral(
ZoneList<ObjectLiteral::Property*>* properties, int literal_index,
- uint32_t boilerplate_properties, int pos, bool has_rest_property) {
+ uint32_t boilerplate_properties, bool has_seen_proto, int pos,
+ bool has_rest_property) {
return new (zone_)
- ObjectLiteral(properties, literal_index, boilerplate_properties, pos,
- has_rest_property);
+ ObjectLiteral(properties, literal_index, boilerplate_properties,
+ has_seen_proto, pos, has_rest_property);
}
ObjectLiteral::Property* NewObjectLiteralProperty(
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698