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

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: Update comments. 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/lib/core.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 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 } 1161 }
1162 if (staticInterceptor != null) { 1162 if (staticInterceptor != null) {
1163 HStatic target = new HStatic(staticInterceptor); 1163 HStatic target = new HStatic(staticInterceptor);
1164 add(target); 1164 add(target);
1165 List<HInstruction> inputs = <HInstruction>[target, receiver]; 1165 List<HInstruction> inputs = <HInstruction>[target, receiver];
1166 push(new HInvokeInterceptor(selector, getterName, true, inputs)); 1166 push(new HInvokeInterceptor(selector, getterName, true, inputs));
1167 } else { 1167 } else {
1168 push(new HInvokeDynamicGetter(selector, null, getterName, receiver)); 1168 push(new HInvokeDynamicGetter(selector, null, getterName, receiver));
1169 } 1169 }
1170 } else if (Elements.isStaticOrTopLevelFunction(element)) { 1170 } else if (Elements.isStaticOrTopLevelFunction(element)) {
1171 compiler.unimplemented("SsaBuilder.visitSend with static", node: send); 1171 push(new HStatic(element));
1172 compiler.registerGetOfStaticFunction(element);
1172 } else { 1173 } else {
1173 stack.add(localsHandler.readLocal(element)); 1174 stack.add(localsHandler.readLocal(element));
1174 } 1175 }
1175 } 1176 }
1176 1177
1177 void generateSetter(SendSet send, Element element, HInstruction value) { 1178 void generateSetter(SendSet send, Element element, HInstruction value) {
1178 Selector selector = elements.getSelector(send); 1179 Selector selector = elements.getSelector(send);
1179 if (Elements.isStaticOrTopLevelField(element)) { 1180 if (Elements.isStaticOrTopLevelField(element)) {
1180 if (element.kind == ElementKind.SETTER) { 1181 if (element.kind == ElementKind.SETTER) {
1181 HStatic target = new HStatic(element); 1182 HStatic target = new HStatic(element);
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 } 1953 }
1953 1954
1954 visitCatchBlock(CatchBlock node) { 1955 visitCatchBlock(CatchBlock node) {
1955 visit(node.block); 1956 visit(node.block);
1956 } 1957 }
1957 1958
1958 visitTypedef(Typedef node) { 1959 visitTypedef(Typedef node) {
1959 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 1960 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
1960 } 1961 }
1961 } 1962 }
OLDNEW
« no previous file with comments | « frog/leg/lib/core.dart ('k') | frog/leg/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698