| Index: src/ast/ast.h
|
| diff --git a/src/ast/ast.h b/src/ast/ast.h
|
| index 158336973749424cc525d3eb40c4990af22843c0..eb19a9040ba45bd3ede84e75df26794094f40a93 100644
|
| --- a/src/ast/ast.h
|
| +++ b/src/ast/ast.h
|
| @@ -1399,6 +1399,9 @@ class ObjectLiteral final : public MaterializedLiteral {
|
| bool has_shallow_properties() const {
|
| return depth() == 1 && !has_elements() && !may_store_doubles();
|
| }
|
| + bool has_rest_property() const {
|
| + return HasRestPropertyField::decode(bit_field_);
|
| + }
|
|
|
| // Decide if a property should be in the object boilerplate.
|
| static bool IsBoilerplateProperty(Property* property);
|
| @@ -1430,7 +1433,8 @@ class ObjectLiteral final : public MaterializedLiteral {
|
| kNoFlags = 0,
|
| kFastElements = 1,
|
| kShallowProperties = 1 << 1,
|
| - kDisableMementos = 1 << 2
|
| + kDisableMementos = 1 << 2,
|
| + kHasRestProperty = 1 << 3
|
| };
|
|
|
| struct Accessors: public ZoneObject {
|
| @@ -1458,13 +1462,15 @@ 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, int pos,
|
| + bool has_rest_property)
|
| : MaterializedLiteral(literal_index, pos, kObjectLiteral),
|
| boilerplate_properties_(boilerplate_properties),
|
| properties_(properties) {
|
| bit_field_ |= FastElementsField::encode(false) |
|
| HasElementsField::encode(false) |
|
| - MayStoreDoublesField::encode(false);
|
| + MayStoreDoublesField::encode(false) |
|
| + HasRestPropertyField::encode(has_rest_property);
|
| }
|
|
|
| static int parent_num_ids() { return MaterializedLiteral::num_ids(); }
|
| @@ -1480,6 +1486,8 @@ class ObjectLiteral final : public MaterializedLiteral {
|
| };
|
| class MayStoreDoublesField
|
| : public BitField<bool, HasElementsField::kNext, 1> {};
|
| + class HasRestPropertyField
|
| + : public BitField<bool, MayStoreDoublesField::kNext, 1> {};
|
| };
|
|
|
|
|
| @@ -3307,9 +3315,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, int pos, bool has_rest_property) {
|
| return new (zone_)
|
| - ObjectLiteral(properties, literal_index, boilerplate_properties, pos);
|
| + ObjectLiteral(properties, literal_index, boilerplate_properties, pos,
|
| + has_rest_property);
|
| }
|
|
|
| ObjectLiteral::Property* NewObjectLiteralProperty(
|
|
|