Chromium Code Reviews| Index: src/ast/ast.h |
| diff --git a/src/ast/ast.h b/src/ast/ast.h |
| index a6a6afda5d49003dd6d6c997eb453bec57bd9d0d..9b0b070d7f8100ec729db4054408c1cb8f5523df 100644 |
| --- a/src/ast/ast.h |
| +++ b/src/ast/ast.h |
| @@ -365,6 +365,14 @@ class Expression : public AstNode { |
| BailoutId id() const { return BailoutId(local_id(0)); } |
| TypeFeedbackId test_id() const { return TypeFeedbackId(local_id(1)); } |
| + // Parenthesized expressions in the form `( Expression )`. |
| + void set_is_parenthesized() { |
| + bit_field_ |= ParenthesizedField::encode(true); |
|
adamk
2016/01/08 16:24:23
Please use ParenthesizedField::update() for consis
caitp (gmail)
2016/01/08 16:36:01
all of the other uses seem to use ::encode() when
|
| + } |
| + bool is_parenthesized() const { |
| + return ParenthesizedField::decode(bit_field_); |
| + } |
| + |
| protected: |
| Expression(Zone* zone, int pos) |
| : AstNode(pos), |
| @@ -387,6 +395,8 @@ class Expression : public AstNode { |
| int base_id_; |
| Bounds bounds_; |
| class ToBooleanTypesField : public BitField16<uint16_t, 0, 9> {}; |
| + class ParenthesizedField |
| + : public BitField16<bool, ToBooleanTypesField::kNext, 1> {}; |
| uint16_t bit_field_; |
| // Ends with 16-bit field; deriving classes in turn begin with |
| // 16-bit fields for optimum packing efficiency. |