OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/ast/ast-types.h" | 8 #include "src/ast/ast-types.h" |
9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 void set_var(Variable* v) { | 1655 void set_var(Variable* v) { |
1656 DCHECK(!is_resolved()); | 1656 DCHECK(!is_resolved()); |
1657 DCHECK_NOT_NULL(v); | 1657 DCHECK_NOT_NULL(v); |
1658 var_ = v; | 1658 var_ = v; |
1659 } | 1659 } |
1660 | 1660 |
1661 bool is_this() const { return IsThisField::decode(bit_field_); } | 1661 bool is_this() const { return IsThisField::decode(bit_field_); } |
1662 | 1662 |
1663 bool is_assigned() const { return IsAssignedField::decode(bit_field_); } | 1663 bool is_assigned() const { return IsAssignedField::decode(bit_field_); } |
1664 void set_is_assigned() { | 1664 void set_is_assigned() { |
| 1665 DCHECK(!is_resolved()); |
1665 bit_field_ = IsAssignedField::update(bit_field_, true); | 1666 bit_field_ = IsAssignedField::update(bit_field_, true); |
1666 } | 1667 } |
1667 | 1668 |
1668 bool is_resolved() const { return IsResolvedField::decode(bit_field_); } | 1669 bool is_resolved() const { return IsResolvedField::decode(bit_field_); } |
1669 void set_is_resolved() { | 1670 void set_is_resolved() { |
1670 bit_field_ = IsResolvedField::update(bit_field_, true); | 1671 bit_field_ = IsResolvedField::update(bit_field_, true); |
1671 } | 1672 } |
1672 | 1673 |
1673 bool is_new_target() const { return IsNewTargetField::decode(bit_field_); } | 1674 bool is_new_target() const { return IsNewTargetField::decode(bit_field_); } |
1674 void set_is_new_target() { | 1675 void set_is_new_target() { |
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3602 : NULL; \ | 3603 : NULL; \ |
3603 } | 3604 } |
3604 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3605 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
3605 #undef DECLARE_NODE_FUNCTIONS | 3606 #undef DECLARE_NODE_FUNCTIONS |
3606 | 3607 |
3607 | 3608 |
3608 } // namespace internal | 3609 } // namespace internal |
3609 } // namespace v8 | 3610 } // namespace v8 |
3610 | 3611 |
3611 #endif // V8_AST_AST_H_ | 3612 #endif // V8_AST_AST_H_ |
OLD | NEW |