| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_AST_H_ | 5 #ifndef VM_AST_H_ |
| 6 #define VM_AST_H_ | 6 #define VM_AST_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 class LoadLocalNode : public AstNode { | 939 class LoadLocalNode : public AstNode { |
| 940 public: | 940 public: |
| 941 LoadLocalNode(intptr_t token_pos, const LocalVariable* local) | 941 LoadLocalNode(intptr_t token_pos, const LocalVariable* local) |
| 942 : AstNode(token_pos), local_(*local), pseudo_(NULL) { | 942 : AstNode(token_pos), local_(*local), pseudo_(NULL) { |
| 943 ASSERT(local != NULL); | 943 ASSERT(local != NULL); |
| 944 } | 944 } |
| 945 | 945 |
| 946 // A local variable load can optionally be a pair of an arbitrary 'pseudo' | 946 // A local variable load can optionally be a pair of an arbitrary 'pseudo' |
| 947 // AST node followed by the load. The pseudo node is evaluated for its | 947 // AST node followed by the load. The pseudo node is evaluated for its |
| 948 // side-effects and the value of the expression is the value of the local | 948 // side-effects and the value of the expression is the value of the local |
| 949 // load after evaluating the pseudo node. Psuedo nodes are used, e.g., in | 949 // load after evaluating the pseudo node. Pseudo nodes are used, e.g., in |
| 950 // the desugaring of postincrement and cascade expressions. | 950 // the desugaring of postincrement and cascade expressions. |
| 951 LoadLocalNode(intptr_t token_pos, const LocalVariable* local, AstNode* pseudo) | 951 LoadLocalNode(intptr_t token_pos, const LocalVariable* local, AstNode* pseudo) |
| 952 : AstNode(token_pos), local_(*local), pseudo_(pseudo) { | 952 : AstNode(token_pos), local_(*local), pseudo_(pseudo) { |
| 953 ASSERT(local != NULL); | 953 ASSERT(local != NULL); |
| 954 } | 954 } |
| 955 | 955 |
| 956 const LocalVariable& local() const { return local_; } | 956 const LocalVariable& local() const { return local_; } |
| 957 AstNode* pseudo() const { return pseudo_; } // Can be NULL. | 957 AstNode* pseudo() const { return pseudo_; } // Can be NULL. |
| 958 bool HasPseudo() const { return pseudo_ != NULL; } | 958 bool HasPseudo() const { return pseudo_ != NULL; } |
| 959 | 959 |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 const LocalVariable& context_var_; | 1703 const LocalVariable& context_var_; |
| 1704 | 1704 |
| 1705 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 1705 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 1706 }; | 1706 }; |
| 1707 | 1707 |
| 1708 } // namespace dart | 1708 } // namespace dart |
| 1709 | 1709 |
| 1710 #undef DECLARE_COMMON_NODE_FUNCTIONS | 1710 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 1711 | 1711 |
| 1712 #endif // VM_AST_H_ | 1712 #endif // VM_AST_H_ |
| OLD | NEW |