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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1243063002: dart2js cps: Remove NonTailThrow. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 5 years, 5 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 | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../dart2jslib.dart' as dart2js; 7 import '../dart2jslib.dart' as dart2js;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; 10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE;
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 380
381 Statement visitRethrow(cps_ir.Rethrow node) { 381 Statement visitRethrow(cps_ir.Rethrow node) {
382 return new Rethrow(); 382 return new Rethrow();
383 } 383 }
384 384
385 Statement visitUnreachable(cps_ir.Unreachable node) { 385 Statement visitUnreachable(cps_ir.Unreachable node) {
386 return new Unreachable(); 386 return new Unreachable();
387 } 387 }
388 388
389 Expression visitNonTailThrow(cps_ir.NonTailThrow node) {
390 return unexpectedNode(node);
391 }
392
393 Statement continueWithExpression(cps_ir.Reference continuation, 389 Statement continueWithExpression(cps_ir.Reference continuation,
394 Expression expression) { 390 Expression expression) {
395 cps_ir.Continuation cont = continuation.definition; 391 cps_ir.Continuation cont = continuation.definition;
396 if (cont == returnContinuation) { 392 if (cont == returnContinuation) {
397 return new Return(expression); 393 return new Return(expression);
398 } else { 394 } else {
399 assert(cont.parameters.length == 1); 395 assert(cont.parameters.length == 1);
400 Function nextBuilder = cont.hasExactlyOneUse ? 396 Function nextBuilder = cont.hasExactlyOneUse ?
401 () => visit(cont.body) : () => new Break(labels[cont]); 397 () => visit(cont.body) : () => new Break(labels[cont]);
402 return buildContinuationAssignment(cont.parameters.single, expression, 398 return buildContinuationAssignment(cont.parameters.single, expression,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 getVariableUse(node.index)); 625 getVariableUse(node.index));
630 } 626 }
631 627
632 Expression visitSetIndex(cps_ir.SetIndex node) { 628 Expression visitSetIndex(cps_ir.SetIndex node) {
633 return new SetIndex(getVariableUse(node.object), 629 return new SetIndex(getVariableUse(node.object),
634 getVariableUse(node.index), 630 getVariableUse(node.index),
635 getVariableUse(node.value)); 631 getVariableUse(node.value));
636 } 632 }
637 } 633 }
638 634
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698