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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js/template.dart

Issue 260233003: Remove js.Sequence and use binary comma operator instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 js; 5 part of js;
6 6
7 class TemplateManager { 7 class TemplateManager {
8 Map<String, Template> expressionTemplates = new Map<String, Template>(); 8 Map<String, Template> expressionTemplates = new Map<String, Template>();
9 Map<String, Template> statementTemplates = new Map<String, Template>(); 9 Map<String, Template> statementTemplates = new Map<String, Template>();
10 10
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 return (arguments) { 447 return (arguments) {
448 List<VariableInitialization> declarations = <VariableInitialization>[]; 448 List<VariableInitialization> declarations = <VariableInitialization>[];
449 for (Instantiator instantiator in declarationMakers) { 449 for (Instantiator instantiator in declarationMakers) {
450 var result = instantiator(arguments); 450 var result = instantiator(arguments);
451 declarations.add(result); 451 declarations.add(result);
452 } 452 }
453 return new VariableDeclarationList(declarations); 453 return new VariableDeclarationList(declarations);
454 }; 454 };
455 } 455 }
456 456
457 Instantiator visitSequence(Sequence node) => TODO('visitSequence');
458
459 Instantiator visitAssignment(Assignment node) { 457 Instantiator visitAssignment(Assignment node) {
460 Instantiator makeLeftHandSide = visit(node.leftHandSide); 458 Instantiator makeLeftHandSide = visit(node.leftHandSide);
461 String op = node.op; 459 String op = node.op;
462 Instantiator makeValue = visitNullable(node.value); 460 Instantiator makeValue = visitNullable(node.value);
463 return (arguments) { 461 return (arguments) {
464 return new Assignment.compound( 462 return new Assignment.compound(
465 makeLeftHandSide(arguments), 463 makeLeftHandSide(arguments),
466 op, 464 op,
467 makeValue(arguments)); 465 makeValue(arguments));
468 }; 466 };
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 if (count != before) containsInterpolatedNode.add(node); 665 if (count != before) containsInterpolatedNode.add(node);
668 return null; 666 return null;
669 } 667 }
670 668
671 visitInterpolatedNode(InterpolatedNode node) { 669 visitInterpolatedNode(InterpolatedNode node) {
672 interpolatedNodes.add(node); 670 interpolatedNodes.add(node);
673 containsInterpolatedNode.add(node); 671 containsInterpolatedNode.add(node);
674 ++count; 672 ++count;
675 } 673 }
676 } 674 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js/printer.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698