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