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

Unified Diff: src/ast/ast.h

Issue 2632503003: [runtime] Allocate space for computed property names (Closed)
Patch Set: Fix some variable names. 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') | src/ast/ast.cc » ('J')
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 af561e0a3f99124542c9010b589ddaa37fe324d7..691fcb7016b52b1636d5155ed52d147b2f31d659 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -1469,9 +1469,11 @@ 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, uint32_t total_properties,
+ int pos)
: MaterializedLiteral(literal_index, pos, kObjectLiteral),
boilerplate_properties_(boilerplate_properties),
+ total_properties_(total_properties),
properties_(properties) {
bit_field_ |= FastElementsField::encode(false) |
HasElementsField::encode(false) |
@@ -1482,6 +1484,8 @@ class ObjectLiteral final : public MaterializedLiteral {
int local_id(int n) const { return base_id() + parent_num_ids() + n; }
uint32_t boilerplate_properties_;
+ // Includes properties with computed names.
+ uint32_t total_properties_;
Handle<FixedArray> constant_properties_;
ZoneList<Property*>* properties_;
@@ -3329,9 +3333,10 @@ class AstNodeFactory final BASE_EMBEDDED {
ObjectLiteral* NewObjectLiteral(
ZoneList<ObjectLiteral::Property*>* properties, int literal_index,
- uint32_t boilerplate_properties, int pos) {
+ uint32_t boilerplate_properties, uint32_t total_properties, int pos) {
return new (zone_)
- ObjectLiteral(properties, literal_index, boilerplate_properties, pos);
+ ObjectLiteral(properties, literal_index, boilerplate_properties,
+ total_properties, pos);
}
ObjectLiteral::Property* NewObjectLiteralProperty(
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | src/ast/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698