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

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

Issue 9382041: Support getting of static functions. (Closed) Base URL: https://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
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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1157 }
1158 if (staticInterceptor != null) { 1158 if (staticInterceptor != null) {
1159 HStatic target = new HStatic(staticInterceptor); 1159 HStatic target = new HStatic(staticInterceptor);
1160 add(target); 1160 add(target);
1161 List<HInstruction> inputs = <HInstruction>[target, receiver]; 1161 List<HInstruction> inputs = <HInstruction>[target, receiver];
1162 push(new HInvokeInterceptor(selector, getterName, true, inputs)); 1162 push(new HInvokeInterceptor(selector, getterName, true, inputs));
1163 } else { 1163 } else {
1164 push(new HInvokeDynamicGetter(selector, null, getterName, receiver)); 1164 push(new HInvokeDynamicGetter(selector, null, getterName, receiver));
1165 } 1165 }
1166 } else if (Elements.isStaticOrTopLevelFunction(element)) { 1166 } else if (Elements.isStaticOrTopLevelFunction(element)) {
1167 compiler.unimplemented("SsaBuilder.visitSend with static", node: send); 1167 push(new HStatic(element));
1168 compiler.registerGetOfStaticFunction(element);
1168 } else { 1169 } else {
1169 stack.add(localsHandler.readLocal(element)); 1170 stack.add(localsHandler.readLocal(element));
1170 } 1171 }
1171 } 1172 }
1172 1173
1173 void generateSetter(SendSet send, Element element, HInstruction value) { 1174 void generateSetter(SendSet send, Element element, HInstruction value) {
1174 Selector selector = elements.getSelector(send); 1175 Selector selector = elements.getSelector(send);
1175 if (Elements.isStaticOrTopLevelField(element)) { 1176 if (Elements.isStaticOrTopLevelField(element)) {
1176 if (element.kind == ElementKind.SETTER) { 1177 if (element.kind == ElementKind.SETTER) {
1177 HStatic target = new HStatic(element); 1178 HStatic target = new HStatic(element);
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 } 1944 }
1944 1945
1945 visitCatchBlock(CatchBlock node) { 1946 visitCatchBlock(CatchBlock node) {
1946 visit(node.block); 1947 visit(node.block);
1947 } 1948 }
1948 1949
1949 visitTypedef(Typedef node) { 1950 visitTypedef(Typedef node) {
1950 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 1951 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
1951 } 1952 }
1952 } 1953 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698