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

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

Issue 10180001: Introduce typed selectors to do better tree shaking based on calls on 'this'. Getters and setters w… (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
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/codegen.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 Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1846 HInstruction compileArgument(Node argument) { 1846 HInstruction compileArgument(Node argument) {
1847 visit(argument); 1847 visit(argument);
1848 return pop(); 1848 return pop();
1849 } 1849 }
1850 1850
1851 HInstruction compileConstant(Element constantElement) { 1851 HInstruction compileConstant(Element constantElement) {
1852 Constant constant = compiler.compileVariable(constantElement); 1852 Constant constant = compiler.compileVariable(constantElement);
1853 return graph.addConstant(constant); 1853 return graph.addConstant(constant);
1854 } 1854 }
1855 1855
1856 FunctionParameters parameters = element.computeParameters(compiler); 1856 return selector.addArgumentsToList(arguments,
1857 return selector.addArgumentsToList(arguments, list, parameters, 1857 list,
1858 compileArgument, compileConstant); 1858 element,
1859 compileArgument,
1860 compileConstant,
1861 compiler);
1859 } 1862 }
1860 1863
1861 void addGenericSendArgumentsToList(Link<Node> link, List<HInstruction> list) { 1864 void addGenericSendArgumentsToList(Link<Node> link, List<HInstruction> list) {
1862 for (; !link.isEmpty(); link = link.tail) { 1865 for (; !link.isEmpty(); link = link.tail) {
1863 visit(link.head); 1866 visit(link.head);
1864 list.add(pop()); 1867 list.add(pop());
1865 } 1868 }
1866 } 1869 }
1867 1870
1868 visitDynamicSend(Send node) { 1871 visitDynamicSend(Send node) {
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3120 false, 3123 false,
3121 <HInstruction>[target, input])); 3124 <HInstruction>[target, input]));
3122 return builder.pop(); 3125 return builder.pop();
3123 } 3126 }
3124 3127
3125 HInstruction result() { 3128 HInstruction result() {
3126 flushLiterals(); 3129 flushLiterals();
3127 return prefix; 3130 return prefix;
3128 } 3131 }
3129 } 3132 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698