Chromium Code Reviews| Index: runtime/vm/ast.h |
| =================================================================== |
| --- runtime/vm/ast.h (revision 26025) |
| +++ runtime/vm/ast.h (working copy) |
| @@ -569,7 +569,11 @@ |
| Token::Kind kind, |
| AstNode* left, |
| AstNode* right) |
| - : AstNode(token_pos), kind_(kind), left_(left), right_(right) { |
| + : AstNode(token_pos), |
| + kind_(kind), |
| + left_(left), |
| + right_(right), |
| + mask32_(-1) { |
| ASSERT(left_ != NULL); |
| ASSERT(right_ != NULL); |
| ASSERT(IsKindValid()); |
| @@ -579,6 +583,17 @@ |
| AstNode* left() const { return left_; } |
| AstNode* right() const { return right_; } |
| + // The optional 32-bit mask must be a an unsigned 32-bit value. |
| + bool has_mask32() const { return mask32_ >= 0; } |
| + int64_t mask32() const { |
| + ASSERT(has_mask32()); |
| + return mask32_; |
| + } |
| + void set_mask32(int64_t value) { |
| + ASSERT(Utils::IsUint(32, value)); |
| + mask32_ = value; |
| + } |
| + |
| virtual void VisitChildren(AstNodeVisitor* visitor) const { |
| left()->Visit(visitor); |
| right()->Visit(visitor); |
| @@ -594,6 +609,8 @@ |
| const Token::Kind kind_; |
| AstNode* left_; |
| AstNode* right_; |
| + // Optional unsigned 32 bit mask applied on result. No mask: -1. |
| + int64_t mask32_; |
|
Florian Schneider
2013/08/13 15:29:52
I think it would be cleaner to have a separate AST
srdjan
2013/08/13 18:44:59
Done.
|
| bool IsKindValid() const; |