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

Side by Side Diff: frog/leg/compiler.dart

Issue 9415005: Support implicitly bound closures (aka. tear-off closures). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address 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 | « no previous file | frog/leg/emitter.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 WorkItem { 5 class WorkItem {
6 final Element element; 6 final Element element;
7 TreeElements resolutionTree; 7 TreeElements resolutionTree;
8 Function run; 8 Function run;
9 Map<int, BailoutInfo> bailouts = null; 9 Map<int, BailoutInfo> bailouts = null;
10 bool allowSpeculativeOptimization = true; 10 bool allowSpeculativeOptimization = true;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 if (member.kind == ElementKind.FUNCTION) { 199 if (member.kind == ElementKind.FUNCTION) {
200 Set<Selector> selectors = universe.invokedNames[member.name]; 200 Set<Selector> selectors = universe.invokedNames[member.name];
201 if (selectors != null) { 201 if (selectors != null) {
202 for (Selector selector in selectors) { 202 for (Selector selector in selectors) {
203 if (selector.applies(this, member)) { 203 if (selector.applies(this, member)) {
204 addToWorklist(member); 204 addToWorklist(member);
205 break; 205 break;
206 } 206 }
207 } 207 }
208 } 208 }
209 // If there is a property access with the same name as a method we
210 // need to emit the method.
211 if (universe.invokedGetters.contains(member.name)) {
212 addToWorklist(member);
213 }
209 } else if (member.kind == ElementKind.GETTER) { 214 } else if (member.kind == ElementKind.GETTER) {
210 if (universe.invokedGetters.contains(member.name)) { 215 if (universe.invokedGetters.contains(member.name)) {
211 addToWorklist(member); 216 addToWorklist(member);
212 } 217 }
213 } else if (member.kind === ElementKind.SETTER) { 218 } else if (member.kind === ElementKind.SETTER) {
214 if (universe.invokedSetters.contains(member.name)) { 219 if (universe.invokedSetters.contains(member.name)) {
215 addToWorklist(member); 220 addToWorklist(member);
216 } 221 }
217 } 222 }
218 } 223 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 374
370 class CompilerCancelledException implements Exception { 375 class CompilerCancelledException implements Exception {
371 final String reason; 376 final String reason;
372 CompilerCancelledException(this.reason); 377 CompilerCancelledException(this.reason);
373 378
374 String toString() { 379 String toString() {
375 String banner = 'compiler cancelled'; 380 String banner = 'compiler cancelled';
376 return (reason !== null) ? '$banner: $reason' : '$banner'; 381 return (reason !== null) ? '$banner: $reason' : '$banner';
377 } 382 }
378 } 383 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698