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

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

Issue 538703002: Enable await in while and do-while. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 3 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/flow_graph_builder.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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 947
948 DISALLOW_IMPLICIT_CONSTRUCTORS(SwitchNode); 948 DISALLOW_IMPLICIT_CONSTRUCTORS(SwitchNode);
949 }; 949 };
950 950
951 951
952 class WhileNode : public AstNode { 952 class WhileNode : public AstNode {
953 public: 953 public:
954 WhileNode(intptr_t token_pos, 954 WhileNode(intptr_t token_pos,
955 SourceLabel* label, 955 SourceLabel* label,
956 AstNode* condition, 956 AstNode* condition,
957 SequenceNode* condition_preamble,
957 SequenceNode* body) 958 SequenceNode* body)
958 : AstNode(token_pos), 959 : AstNode(token_pos),
959 label_(label), 960 label_(label),
960 condition_(condition), 961 condition_(condition),
962 condition_preamble_(condition_preamble),
961 body_(body) { 963 body_(body) {
962 ASSERT(label_ != NULL); 964 ASSERT(label_ != NULL);
963 ASSERT(condition_ != NULL); 965 ASSERT(condition_ != NULL);
964 ASSERT(body_ != NULL); 966 ASSERT(body_ != NULL);
965 } 967 }
966 968
967 SourceLabel* label() const { return label_; } 969 SourceLabel* label() const { return label_; }
968 AstNode* condition() const { return condition_; } 970 AstNode* condition() const { return condition_; }
969 SequenceNode* body() const { return body_; } 971 SequenceNode* body() const { return body_; }
972 SequenceNode* condition_preamble() const { return condition_preamble_; }
970 973
971 virtual void VisitChildren(AstNodeVisitor* visitor) const { 974 virtual void VisitChildren(AstNodeVisitor* visitor) const {
975 if (condition_preamble() != NULL) {
976 condition_preamble()->Visit(visitor);
977 }
972 condition()->Visit(visitor); 978 condition()->Visit(visitor);
973 body()->Visit(visitor); 979 body()->Visit(visitor);
974 } 980 }
975 981
976 DECLARE_COMMON_NODE_FUNCTIONS(WhileNode); 982 DECLARE_COMMON_NODE_FUNCTIONS(WhileNode);
977 983
978 private: 984 private:
979 SourceLabel* label_; 985 SourceLabel* label_;
980 AstNode* condition_; 986 AstNode* condition_;
987 SequenceNode* condition_preamble_;
981 SequenceNode* body_; 988 SequenceNode* body_;
982 989
983 DISALLOW_IMPLICIT_CONSTRUCTORS(WhileNode); 990 DISALLOW_IMPLICIT_CONSTRUCTORS(WhileNode);
984 }; 991 };
985 992
986 993
987 class DoWhileNode : public AstNode { 994 class DoWhileNode : public AstNode {
988 public: 995 public:
989 DoWhileNode(intptr_t token_pos, 996 DoWhileNode(intptr_t token_pos,
990 SourceLabel* label, 997 SourceLabel* label,
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 const intptr_t try_index_; 1905 const intptr_t try_index_;
1899 1906
1900 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1907 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1901 }; 1908 };
1902 1909
1903 } // namespace dart 1910 } // namespace dart
1904 1911
1905 #undef DECLARE_COMMON_NODE_FUNCTIONS 1912 #undef DECLARE_COMMON_NODE_FUNCTIONS
1906 1913
1907 #endif // VM_AST_H_ 1914 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698