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

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

Issue 9414010: Allow method-calls to getters (assuming they contain closures). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and update status file. 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/resolver.dart ('k') | frog/tests/leg_only/src/Closure5Test.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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 void generateGetter(Send send, Element element) { 1238 void generateGetter(Send send, Element element) {
1239 Selector selector = elements.getSelector(send); 1239 Selector selector = elements.getSelector(send);
1240 if (Elements.isStaticOrTopLevelField(element)) { 1240 if (Elements.isStaticOrTopLevelField(element)) {
1241 push(new HStatic(element)); 1241 push(new HStatic(element));
1242 if (element.kind == ElementKind.GETTER) { 1242 if (element.kind == ElementKind.GETTER) {
1243 push(new HInvokeStatic(selector, <HInstruction>[pop()])); 1243 push(new HInvokeStatic(selector, <HInstruction>[pop()]));
1244 } 1244 }
1245 } else if (element === null || Elements.isInstanceField(element)) { 1245 } else if (Elements.isInstanceSend(send, elements)) {
1246 HInstruction receiver; 1246 HInstruction receiver;
1247 if (send.receiver == null) { 1247 if (send.receiver == null) {
1248 receiver = localsHandler.readThis(); 1248 receiver = localsHandler.readThis();
1249 } else { 1249 } else {
1250 visit(send.receiver); 1250 visit(send.receiver);
1251 receiver = pop(); 1251 receiver = pop();
1252 } 1252 }
1253 SourceString getterName = send.selector.asIdentifier().source; 1253 SourceString getterName = send.selector.asIdentifier().source;
1254 Element staticInterceptor = null; 1254 Element staticInterceptor = null;
1255 if (methodInterceptionEnabled) { 1255 if (methodInterceptionEnabled) {
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 } 2068 }
2069 2069
2070 visitCatchBlock(CatchBlock node) { 2070 visitCatchBlock(CatchBlock node) {
2071 visit(node.block); 2071 visit(node.block);
2072 } 2072 }
2073 2073
2074 visitTypedef(Typedef node) { 2074 visitTypedef(Typedef node) {
2075 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2075 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2076 } 2076 }
2077 } 2077 }
OLDNEW
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/tests/leg_only/src/Closure5Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698