| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 }; | 321 }; |
| 322 | 322 |
| 323 | 323 |
| 324 class LetNode : public AstNode { | 324 class LetNode : public AstNode { |
| 325 public: | 325 public: |
| 326 explicit LetNode(intptr_t token_pos); | 326 explicit LetNode(intptr_t token_pos); |
| 327 | 327 |
| 328 LocalVariable* TempAt(intptr_t i) const { return vars_[i]; } | 328 LocalVariable* TempAt(intptr_t i) const { return vars_[i]; } |
| 329 AstNode* InitializerAt(intptr_t i) const { return initializers_[i]; } | 329 AstNode* InitializerAt(intptr_t i) const { return initializers_[i]; } |
| 330 | 330 |
| 331 virtual bool IsPotentiallyConst() const; |
| 332 virtual const Instance* EvalConstExpr() const; |
| 333 |
| 331 LocalVariable* AddInitializer(AstNode* node); | 334 LocalVariable* AddInitializer(AstNode* node); |
| 332 | 335 |
| 333 const GrowableArray<AstNode*>& nodes() const { return nodes_; } | 336 const GrowableArray<AstNode*>& nodes() const { return nodes_; } |
| 334 | 337 |
| 335 void AddNode(AstNode* node) { nodes_.Add(node); } | 338 void AddNode(AstNode* node) { nodes_.Add(node); } |
| 336 | 339 |
| 337 intptr_t num_temps() const { | 340 intptr_t num_temps() const { |
| 338 return vars_.length(); | 341 return vars_.length(); |
| 339 } | 342 } |
| 340 | 343 |
| (...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 const intptr_t try_index_; | 2030 const intptr_t try_index_; |
| 2028 | 2031 |
| 2029 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); | 2032 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); |
| 2030 }; | 2033 }; |
| 2031 | 2034 |
| 2032 } // namespace dart | 2035 } // namespace dart |
| 2033 | 2036 |
| 2034 #undef DECLARE_COMMON_NODE_FUNCTIONS | 2037 #undef DECLARE_COMMON_NODE_FUNCTIONS |
| 2035 | 2038 |
| 2036 #endif // VM_AST_H_ | 2039 #endif // VM_AST_H_ |
| OLD | NEW |