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

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

Issue 1575953005: Source position tests for switch and try catch finally (Closed) Base URL: git@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_transformer.cc » ('j') | runtime/vm/flow_graph_builder_test.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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // relies on. A marker indicates that a new await state needs to be 205 // relies on. A marker indicates that a new await state needs to be
206 // added to a function preamble. This type also triggers storing of the 206 // added to a function preamble. This type also triggers storing of the
207 // current context. 207 // current context.
208 // 208 //
209 // It is expected (ASSERT) that an AwaitMarker is followed by 209 // It is expected (ASSERT) that an AwaitMarker is followed by
210 // a return node of kind kContinuationTarget. That is: 210 // a return node of kind kContinuationTarget. That is:
211 // <AwaitMarker> -> <other nodes> -> <kContinuationTarget> -> <other nodes> -> 211 // <AwaitMarker> -> <other nodes> -> <kContinuationTarget> -> <other nodes> ->
212 // <AwaitMarker> -> ... 212 // <AwaitMarker> -> ...
213 class AwaitMarkerNode : public AstNode { 213 class AwaitMarkerNode : public AstNode {
214 public: 214 public:
215 AwaitMarkerNode(LocalScope* async_scope, LocalScope* await_scope) 215 AwaitMarkerNode(LocalScope* async_scope,
216 : AstNode(Scanner::kNoSourcePos), 216 LocalScope* await_scope,
217 intptr_t token_pos)
218 : AstNode(token_pos),
217 async_scope_(async_scope), 219 async_scope_(async_scope),
218 await_scope_(await_scope) { 220 await_scope_(await_scope) {
219 ASSERT(async_scope != NULL); 221 ASSERT(async_scope != NULL);
220 ASSERT(await_scope != NULL); 222 ASSERT(await_scope != NULL);
221 await_scope->CaptureLocalVariables(async_scope); 223 await_scope->CaptureLocalVariables(async_scope);
222 } 224 }
223 225
224 void VisitChildren(AstNodeVisitor* visitor) const { } 226 void VisitChildren(AstNodeVisitor* visitor) const { }
225 227
226 LocalScope* async_scope() const { return async_scope_; } 228 LocalScope* async_scope() const { return async_scope_; }
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 const intptr_t try_index_; 2026 const intptr_t try_index_;
2025 2027
2026 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 2028 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
2027 }; 2029 };
2028 2030
2029 } // namespace dart 2031 } // namespace dart
2030 2032
2031 #undef DECLARE_COMMON_NODE_FUNCTIONS 2033 #undef DECLARE_COMMON_NODE_FUNCTIONS
2032 2034
2033 #endif // VM_AST_H_ 2035 #endif // VM_AST_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast_transformer.cc » ('j') | runtime/vm/flow_graph_builder_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698