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

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: 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') | frog/leg/emitter.dart » ('J')
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 if (member.kind == ElementKind.FUNCTION) { 185 if (member.kind == ElementKind.FUNCTION) {
186 Set<Selector> selectors = universe.invokedNames[member.name]; 186 Set<Selector> selectors = universe.invokedNames[member.name];
187 if (selectors != null) { 187 if (selectors != null) {
188 for (Selector selector in selectors) { 188 for (Selector selector in selectors) {
189 if (selector.applies(this, member)) { 189 if (selector.applies(this, member)) {
190 addToWorklist(member); 190 addToWorklist(member);
191 break; 191 break;
192 } 192 }
193 } 193 }
194 } 194 }
195 // If there is a property access with the same name as a method we
196 // need to emit the method.
197 if (universe.invokedGetters.contains(member.name)) {
198 addToWorklist(member);
199 }
195 } else if (member.kind == ElementKind.GETTER) { 200 } else if (member.kind == ElementKind.GETTER) {
196 if (universe.invokedGetters.contains(member.name)) { 201 if (universe.invokedGetters.contains(member.name)) {
197 addToWorklist(member); 202 addToWorklist(member);
198 } 203 }
199 } else if (member.kind === ElementKind.SETTER) { 204 } else if (member.kind === ElementKind.SETTER) {
200 if (universe.invokedSetters.contains(member.name)) { 205 if (universe.invokedSetters.contains(member.name)) {
201 addToWorklist(member); 206 addToWorklist(member);
202 } 207 }
203 } 208 }
204 } 209 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 360
356 class CompilerCancelledException implements Exception { 361 class CompilerCancelledException implements Exception {
357 final String reason; 362 final String reason;
358 CompilerCancelledException(this.reason); 363 CompilerCancelledException(this.reason);
359 364
360 String toString() { 365 String toString() {
361 String banner = 'compiler cancelled'; 366 String banner = 'compiler cancelled';
362 return (reason !== null) ? '$banner: $reason' : '$banner'; 367 return (reason !== null) ? '$banner: $reason' : '$banner';
363 } 368 }
364 } 369 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/emitter.dart » ('j') | frog/leg/emitter.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698