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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart

Issue 1092023002: CPS implementation of throw and rethrow. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
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 part of dart2js.cps_ir.optimizers; 5 part of dart2js.cps_ir.optimizers;
6 6
7 /** 7 /**
8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described 8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described
9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy. 9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy.
10 */ 10 */
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 node.body.parent = node; 594 node.body.parent = node;
595 node.value.parent = node; 595 node.value.parent = node;
596 } 596 }
597 597
598 processDeclareFunction(DeclareFunction node) { 598 processDeclareFunction(DeclareFunction node) {
599 node.variable.parent = node; 599 node.variable.parent = node;
600 node.definition.parent = node; 600 node.definition.parent = node;
601 node.body.parent = node; 601 node.body.parent = node;
602 } 602 }
603 603
604 processThrow(Throw node) {
605 node.value.parent = node;
606 }
607
604 // Definitions. 608 // Definitions.
605 609
606 processLiteralList(LiteralList node) { 610 processLiteralList(LiteralList node) {
607 node.values.forEach((Reference ref) => ref.parent = node); 611 node.values.forEach((Reference ref) => ref.parent = node);
608 } 612 }
609 613
610 processLiteralMap(LiteralMap node) { 614 processLiteralMap(LiteralMap node) {
611 node.entries.forEach((LiteralMapEntry entry) { 615 node.entries.forEach((LiteralMapEntry entry) {
612 entry.key.parent = node; 616 entry.key.parent = node;
613 entry.value.parent = node; 617 entry.value.parent = node;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 } 720 }
717 721
718 String toString() => "$kind: $node"; 722 String toString() => "$kind: $node";
719 } 723 }
720 724
721 /// A dummy class used solely to mark nodes as deleted once they are removed 725 /// A dummy class used solely to mark nodes as deleted once they are removed
722 /// from a term. 726 /// from a term.
723 class _DeletedNode extends Node { 727 class _DeletedNode extends Node {
724 accept(_) => null; 728 accept(_) => null;
725 } 729 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698