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

Side by Side Diff: frog/leg/ssa/codegen.dart

Issue 9568011: Unify Date.fromString and support more Iso 8601. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 9 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
« no previous file with comments | « frog/leg/lib/mockimpl.dart ('k') | frog/lib/date_implementation.dart » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA code generator'; 7 String get name() => 'SSA code generator';
8 8
9 String generate(WorkItem work, HGraph graph) { 9 String generate(WorkItem work, HGraph graph) {
10 return measure(() { 10 return measure(() {
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 String code = '${node.code}'; 602 String code = '${node.code}';
603 List<HInstruction> inputs = node.inputs; 603 List<HInstruction> inputs = node.inputs;
604 for (int i = 0; i < inputs.length; i++) { 604 for (int i = 0; i < inputs.length; i++) {
605 HInstruction input = inputs[i]; 605 HInstruction input = inputs[i];
606 String name; 606 String name;
607 if (input is HThis) { 607 if (input is HThis) {
608 name = "this"; 608 name = "this";
609 } else if (input is HParameterValue) { 609 } else if (input is HParameterValue) {
610 HParameterValue parameter = input; 610 HParameterValue parameter = input;
611 name = parameterNames[parameter.element]; 611 name = parameterNames[parameter.element];
612 } else if (input is HLoad) {
613 Hload load = input;
614 name = local(input.local);
612 } else { 615 } else {
613 assert(!input.generateAtUseSite()); 616 assert(!input.generateAtUseSite());
614 name = temporary(input); 617 name = temporary(input);
615 } 618 }
616 code = code.replaceAll('\$$i', name); 619 code = code.replaceAll('\$$i', name);
617 } 620 }
618 beginExpression(JSPrecedence.EXPRESSION_PRECEDENCE); 621 beginExpression(JSPrecedence.EXPRESSION_PRECEDENCE);
619 buffer.add(code); 622 buffer.add(code);
620 endExpression(JSPrecedence.EXPRESSION_PRECEDENCE); 623 endExpression(JSPrecedence.EXPRESSION_PRECEDENCE);
621 } 624 }
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 startBailoutSwitch(); 1378 startBailoutSwitch();
1376 } 1379 }
1377 } 1380 }
1378 1381
1379 void endElse(HIf node) { 1382 void endElse(HIf node) {
1380 if (node.elseBlock.hasBailouts()) { 1383 if (node.elseBlock.hasBailouts()) {
1381 endBailoutSwitch(); 1384 endBailoutSwitch();
1382 } 1385 }
1383 } 1386 }
1384 } 1387 }
OLDNEW
« no previous file with comments | « frog/leg/lib/mockimpl.dart ('k') | frog/lib/date_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698