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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart

Issue 14211008: Add support for rethrow and start treating throw <expr> as an expression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use ?:. Created 7 years, 8 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 | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('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 part of dart_backend; 5 part of dart_backend;
6 6
7 class CloningVisitor implements Visitor<Node> { 7 class CloningVisitor implements Visitor<Node> {
8 final TreeElements originalTreeElements; 8 final TreeElements originalTreeElements;
9 final TreeElementMapping cloneTreeElements; 9 final TreeElementMapping cloneTreeElements;
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 builder.addLast(visit(n)); 156 builder.addLast(visit(n));
157 } 157 }
158 return rewriteNodeList(node, builder.toLink()); 158 return rewriteNodeList(node, builder.toLink());
159 } 159 }
160 160
161 visitOperator(Operator node) => new Operator(node.token); 161 visitOperator(Operator node) => new Operator(node.token);
162 162
163 visitParenthesizedExpression(ParenthesizedExpression node) => 163 visitParenthesizedExpression(ParenthesizedExpression node) =>
164 new ParenthesizedExpression(visit(node.expression), node.beginToken); 164 new ParenthesizedExpression(visit(node.expression), node.beginToken);
165 165
166 visitRethrow(Rethrow node) => new Rethrow(
167 node.throwToken, node.endToken);
168
166 visitReturn(Return node) => new Return( 169 visitReturn(Return node) => new Return(
167 node.beginToken, node.endToken, visit(node.expression)); 170 node.beginToken, node.endToken, visit(node.expression));
168 171
169 visitScriptTag(ScriptTag node) => new ScriptTag( 172 visitScriptTag(ScriptTag node) => new ScriptTag(
170 visit(node.tag), visit(node.argument), 173 visit(node.tag), visit(node.argument),
171 visit(node.prefixIdentifier), visit(node.prefix), 174 visit(node.prefixIdentifier), visit(node.prefix),
172 node.beginToken, node.endToken); 175 node.beginToken, node.endToken);
173 176
174 visitSend(Send node) => new Send( 177 visitSend(Send node) => new Send(
175 visit(node.receiver), visit(node.selector), visit(node.argumentsNode)); 178 visit(node.receiver), visit(node.selector), visit(node.argumentsNode));
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 286 }
284 287
285 Node visitStringNode(StringNode node) { 288 Node visitStringNode(StringNode node) {
286 unimplemented('visitNode', node: node); 289 unimplemented('visitNode', node: node);
287 } 290 }
288 291
289 unimplemented(String message, {Node node}) { 292 unimplemented(String message, {Node node}) {
290 throw message; 293 throw message;
291 } 294 }
292 } 295 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698