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

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

Issue 867233004: Support constructor declarations in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 processRunnableBody(RunnableBody node) { 475 processRunnableBody(RunnableBody node) {
476 node.returnContinuation.parent = node; 476 node.returnContinuation.parent = node;
477 node.body.parent = node; 477 node.body.parent = node;
478 } 478 }
479 479
480 processConstructorDefinition(ConstructorDefinition node) { 480 processConstructorDefinition(ConstructorDefinition node) {
481 node.body.parent = node; 481 node.body.parent = node;
482 int index = 0; 482 int index = 0;
483 node.parameters.forEach((Parameter parameter) { 483 node.parameters.forEach((Definition parameter) {
484 parameter.parent = node; 484 parameter.parent = node;
485 parameter.parent_index = index++; 485 if (parameter is Parameter) parameter.parent_index = index++;
Johnni Winther 2015/01/28 13:38:02 Fixes a checked mode bug for the new dart2dart bac
herhut 2015/01/28 14:12:50 This still reads strange...
Johnni Winther 2015/01/29 07:51:07 Yes. But now its is valid, and all consistent with
486 }); 486 });
487 node.initializers.forEach((Initializer i) => i.parent = node); 487 node.initializers.forEach((Initializer i) => i.parent = node);
488 } 488 }
489 489
490 // Expressions. 490 // Expressions.
491 491
492 processFieldInitializer(FieldInitializer node) { 492 processFieldInitializer(FieldInitializer node) {
493 node.body.body.parent = node; 493 node.body.body.parent = node;
494 } 494 }
495 495
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 664
665 String toString() => "$kind: $node"; 665 String toString() => "$kind: $node";
666 } 666 }
667 667
668 /// A dummy class used solely to mark nodes as deleted once they are removed 668 /// A dummy class used solely to mark nodes as deleted once they are removed
669 /// from a term. 669 /// from a term.
670 class _DeletedNode extends Node { 670 class _DeletedNode extends Node {
671 accept(_) => null; 671 accept(_) => null;
672 } 672 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698