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

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

Issue 10446102: Insert closure calls in conditional expression of assert (issue 1584). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 false_expr_(false_expr) { 651 false_expr_(false_expr) {
652 ASSERT(condition_ != NULL); 652 ASSERT(condition_ != NULL);
653 ASSERT(true_expr_ != NULL); 653 ASSERT(true_expr_ != NULL);
654 ASSERT(false_expr_ != NULL); 654 ASSERT(false_expr_ != NULL);
655 } 655 }
656 656
657 AstNode* condition() const { return condition_; } 657 AstNode* condition() const { return condition_; }
658 AstNode* true_expr() const { return true_expr_; } 658 AstNode* true_expr() const { return true_expr_; }
659 AstNode* false_expr() const { return false_expr_; } 659 AstNode* false_expr() const { return false_expr_; }
660 660
661 void set_true_expr(AstNode* true_expr) {
662 ASSERT(true_expr != NULL);
663 true_expr_ = true_expr;
664 }
665 void set_false_expr(AstNode* false_expr) {
666 ASSERT(false_expr != NULL);
667 false_expr_ = false_expr;
668 }
669
661 virtual void VisitChildren(AstNodeVisitor* visitor) const { 670 virtual void VisitChildren(AstNodeVisitor* visitor) const {
662 condition()->Visit(visitor); 671 condition()->Visit(visitor);
663 true_expr()->Visit(visitor); 672 true_expr()->Visit(visitor);
664 false_expr()->Visit(visitor); 673 false_expr()->Visit(visitor);
665 } 674 }
666 675
667 DECLARE_COMMON_NODE_FUNCTIONS(ConditionalExprNode); 676 DECLARE_COMMON_NODE_FUNCTIONS(ConditionalExprNode);
668 677
669 private: 678 private:
670 AstNode* condition_; 679 AstNode* condition_;
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 const LocalVariable& context_var_; 1670 const LocalVariable& context_var_;
1662 1671
1663 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1672 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1664 }; 1673 };
1665 1674
1666 } // namespace dart 1675 } // namespace dart
1667 1676
1668 #undef DECLARE_COMMON_NODE_FUNCTIONS 1677 #undef DECLARE_COMMON_NODE_FUNCTIONS
1669 1678
1670 #endif // VM_AST_H_ 1679 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698