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

Side by Side Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10119010: Start propagating non-primitive types in the backend, and fold instructions that know about the typ… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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) 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 9
10 String generateMethod(WorkItem work, HGraph graph) { 10 String generateMethod(WorkItem work, HGraph graph) {
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 int argumentCount = node.inputs.length - 1; 999 int argumentCount = node.inputs.length - 1;
1000 1000
1001 // TODO(ahe): The constructor name was statically resolved in 1001 // TODO(ahe): The constructor name was statically resolved in
1002 // SsaBuilder.buildFactory. Is there a cleaner way to do this? 1002 // SsaBuilder.buildFactory. Is there a cleaner way to do this?
1003 node.name.printOn(buffer); 1003 node.name.printOn(buffer);
1004 visitArguments(node.inputs); 1004 visitArguments(node.inputs);
1005 } else { 1005 } else {
1006 buffer.add(compiler.namer.instanceMethodInvocationName( 1006 buffer.add(compiler.namer.instanceMethodInvocationName(
1007 currentLibrary, node.name, node.selector)); 1007 currentLibrary, node.name, node.selector));
1008 visitArguments(node.inputs); 1008 visitArguments(node.inputs);
1009 compiler.registerDynamicInvocation(node.name, node.selector); 1009 if (node.element !== null) {
1010 // If we know we're calling a specific method, register that
1011 // method only.
1012 compiler.registerDynamicInvocationOf(node.element);
1013 } else {
1014 compiler.registerDynamicInvocation(node.name, node.selector);
1015 }
1010 } 1016 }
1011 endExpression(JSPrecedence.CALL_PRECEDENCE); 1017 endExpression(JSPrecedence.CALL_PRECEDENCE);
1012 } 1018 }
1013 1019
1014 visitInvokeDynamicSetter(HInvokeDynamicSetter node) { 1020 visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
1015 beginExpression(JSPrecedence.CALL_PRECEDENCE); 1021 beginExpression(JSPrecedence.CALL_PRECEDENCE);
1016 use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE); 1022 use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE);
1017 buffer.add('.'); 1023 buffer.add('.');
1018 buffer.add(compiler.namer.setterName(currentLibrary, node.name)); 1024 buffer.add(compiler.namer.setterName(currentLibrary, node.name));
1019 visitArguments(node.inputs); 1025 visitArguments(node.inputs);
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 startBailoutSwitch(); 1918 startBailoutSwitch();
1913 } 1919 }
1914 } 1920 }
1915 1921
1916 void endElse(HIf node) { 1922 void endElse(HIf node) {
1917 if (node.elseBlock.hasGuards()) { 1923 if (node.elseBlock.hasGuards()) {
1918 endBailoutSwitch(); 1924 endBailoutSwitch();
1919 } 1925 }
1920 } 1926 }
1921 } 1927 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698