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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart

Issue 658103003: Support map and list literals in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use LiteralMapEntry to ensure build order Created 6 years, 1 month 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.optimizers; 5 part of dart2js.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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 node.body.parent = node; 364 node.body.parent = node;
365 } 365 }
366 366
367 // Definitions. 367 // Definitions.
368 368
369 processLiteralList(LiteralList node) { 369 processLiteralList(LiteralList node) {
370 node.values.forEach((Reference ref) => ref.parent = node); 370 node.values.forEach((Reference ref) => ref.parent = node);
371 } 371 }
372 372
373 processLiteralMap(LiteralMap node) { 373 processLiteralMap(LiteralMap node) {
374 node.values.forEach((Reference ref) => ref.parent = node); 374 node.entries.forEach((LiteralMapEntry entry) {
375 node.keys.forEach((Reference ref) => ref.parent = node); 375 entry.key.parent = node;
376 entry.value.parent = node;
377 });
376 } 378 }
377 379
378 processCreateFunction(CreateFunction node) { 380 processCreateFunction(CreateFunction node) {
379 node.definition.parent = node; 381 node.definition.parent = node;
380 } 382 }
381 383
382 processContinuation(Continuation node) { 384 processContinuation(Continuation node) {
383 node.body.parent = node; 385 node.body.parent = node;
384 node.parameters.forEach((Parameter param) => param.parent = node); 386 node.parameters.forEach((Parameter param) => param.parent = node);
385 } 387 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 430 }
429 431
430 String toString() => "$kind: $node"; 432 String toString() => "$kind: $node";
431 } 433 }
432 434
433 /// A dummy class used solely to mark nodes as deleted once they are removed 435 /// A dummy class used solely to mark nodes as deleted once they are removed
434 /// from a term. 436 /// from a term.
435 class _DeletedNode extends Node { 437 class _DeletedNode extends Node {
436 accept(_) => null; 438 accept(_) => null;
437 } 439 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698