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

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

Issue 10191016: Introduce typed selectors for getters and setters also for better tree shaking. (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 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 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 HInstruction self = localsHandler.readThis(); 2108 HInstruction self = localsHandler.readThis();
2109 Identifier identifier = node.selector.asIdentifier(); 2109 Identifier identifier = node.selector.asIdentifier();
2110 String name = identifier.source.slowToString(); 2110 String name = identifier.source.slowToString();
2111 // TODO(ahe): Add the arguments to this list. 2111 // TODO(ahe): Add the arguments to this list.
2112 push(new HLiteralList([])); 2112 push(new HLiteralList([]));
2113 var inputs = <HInstruction>[ 2113 var inputs = <HInstruction>[
2114 target, 2114 target,
2115 self, 2115 self,
2116 graph.addConstantString(new DartString.literal(name)), 2116 graph.addConstantString(new DartString.literal(name)),
2117 pop()]; 2117 pop()];
2118 push(new HInvokeSuper(const Selector(SelectorKind.INVOCATION, 2), 2118 push(new HInvokeSuper(Selector.INVOCATION_2, inputs));
2119 inputs));
2120 return; 2119 return;
2121 } 2120 }
2122 HInstruction target = new HStatic(element); 2121 HInstruction target = new HStatic(element);
2123 HInstruction context = localsHandler.readThis(); 2122 HInstruction context = localsHandler.readThis();
2124 add(target); 2123 add(target);
2125 var inputs = <HInstruction>[target, context]; 2124 var inputs = <HInstruction>[target, context];
2126 if (element.kind == ElementKind.FUNCTION || 2125 if (element.kind == ElementKind.FUNCTION ||
2127 element.kind == ElementKind.GENERATIVE_CONSTRUCTOR) { 2126 element.kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
2128 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, 2127 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments,
2129 element, inputs); 2128 element, inputs);
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3123 false, 3122 false,
3124 <HInstruction>[target, input])); 3123 <HInstruction>[target, input]));
3125 return builder.pop(); 3124 return builder.pop();
3126 } 3125 }
3127 3126
3128 HInstruction result() { 3127 HInstruction result() {
3129 flushLiterals(); 3128 flushLiterals();
3130 return prefix; 3129 return prefix;
3131 } 3130 }
3132 } 3131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698