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

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: Merge to head 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') | no next file with comments »
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698