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

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

Issue 9301038: Support named arguments for statically resolved calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/leg/universe.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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 visitInvokeSuper(HInvokeSuper node) { 449 visitInvokeSuper(HInvokeSuper node) {
450 Element superMethod = node.element; 450 Element superMethod = node.element;
451 Element superClass = superMethod.enclosingElement; 451 Element superClass = superMethod.enclosingElement;
452 // Remove the element and 'this'. 452 // Remove the element and 'this'.
453 int argumentCount = node.inputs.length - 2; 453 int argumentCount = node.inputs.length - 2;
454 String className = compiler.namer.isolatePropertyAccess(superClass); 454 String className = compiler.namer.isolatePropertyAccess(superClass);
455 String methodName = compiler.namer.instanceMethodName( 455 String methodName = compiler.namer.instanceMethodName(
456 superMethod.name, argumentCount); 456 superMethod.name, argumentCount);
457 buffer.add('$className.prototype.$methodName.call'); 457 buffer.add('$className.prototype.$methodName.call');
458 visitArguments(node.inputs); 458 visitArguments(node.inputs);
459 compiler.registerStaticUse(superMethod);
459 } 460 }
460 461
461 visitForeign(HForeign node) { 462 visitForeign(HForeign node) {
462 String code = '${node.code}'; 463 String code = '${node.code}';
463 List<HInstruction> inputs = node.inputs; 464 List<HInstruction> inputs = node.inputs;
464 for (int i = 0; i < inputs.length; i++) { 465 for (int i = 0; i < inputs.length; i++) {
465 HInstruction input = inputs[i]; 466 HInstruction input = inputs[i];
466 String name; 467 String name;
467 if (input is HParameterValue) { 468 if (input is HParameterValue) {
468 name = parameter(input); 469 name = parameter(input);
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 startBailoutSwitch(); 1083 startBailoutSwitch();
1083 } 1084 }
1084 } 1085 }
1085 1086
1086 void endElse(HIf node) { 1087 void endElse(HIf node) {
1087 if (node.elseBlock.hasBailouts()) { 1088 if (node.elseBlock.hasBailouts()) {
1088 endBailoutSwitch(); 1089 endBailoutSwitch();
1089 } 1090 }
1090 } 1091 }
1091 } 1092 }
OLDNEW
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/leg/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698