Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: runtime/vm/ast.h

Issue 1575383002: Implement ?? as compile-time constant in VM. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/parser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698