Chromium Code Reviews| Index: src/ast/ast.h |
| diff --git a/src/ast/ast.h b/src/ast/ast.h |
| index 12e8de97158c3d44c8b6c28f469aec59b3642461..c05d303e2d1a26e94831278907b2933c0b50b16f 100644 |
| --- a/src/ast/ast.h |
| +++ b/src/ast/ast.h |
| @@ -1454,14 +1454,18 @@ class ObjectLiteral final : public MaterializedLiteral { |
| void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, |
| FeedbackVectorSlotCache* cache); |
| + bool has_rest_property() const { return has_rest_property_; } |
| + |
| private: |
| 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) { |
| + properties_(properties), |
| + has_rest_property_(has_rest_property) { |
| bit_field_ |= FastElementsField::encode(false) | |
| HasElementsField::encode(false) | |
| MayStoreDoublesField::encode(false); |
| @@ -1473,6 +1477,7 @@ class ObjectLiteral final : public MaterializedLiteral { |
| uint32_t boilerplate_properties_; |
| Handle<FixedArray> constant_properties_; |
| ZoneList<Property*>* properties_; |
| + bool has_rest_property_; |
|
adamk
2017/01/10 23:22:55
This should be stored in the bit_field_, like the
gsathya
2017/01/12 21:27:41
Done.
|
| class FastElementsField |
| : public BitField<bool, MaterializedLiteral::kNextBitFieldIndex, 1> {}; |
| @@ -3311,9 +3316,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( |