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

Side by Side Diff: lib/compiler/implementation/compiler.dart

Issue 10825337: Add name and library to selectors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make library == null for non-private selectors. Created 8 years, 4 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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 final bool REPORT_EXCESS_RESOLUTION = false; 10 final bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 void enableNoSuchMethod(Element element) { 262 void enableNoSuchMethod(Element element) {
263 // TODO(ahe): Move this method to Enqueuer. 263 // TODO(ahe): Move this method to Enqueuer.
264 if (enabledNoSuchMethod) return; 264 if (enabledNoSuchMethod) return;
265 if (element.getEnclosingClass() === objectClass) { 265 if (element.getEnclosingClass() === objectClass) {
266 enqueuer.resolution.registerDynamicInvocationOf(element); 266 enqueuer.resolution.registerDynamicInvocationOf(element);
267 return; 267 return;
268 } 268 }
269 enabledNoSuchMethod = true; 269 enabledNoSuchMethod = true;
270 enqueuer.resolution.registerInvocation(NO_SUCH_METHOD, 270 Selector selector = new Selector.noSuchMethod();
271 Selector.INVOCATION_2); 271 enqueuer.resolution.registerInvocation(NO_SUCH_METHOD, selector);
272 enqueuer.codegen.registerInvocation(NO_SUCH_METHOD, 272 enqueuer.codegen.registerInvocation(NO_SUCH_METHOD, selector);
273 Selector.INVOCATION_2);
274 } 273 }
275 274
276 void enableIsolateSupport(LibraryElement element) { 275 void enableIsolateSupport(LibraryElement element) {
277 // TODO(ahe): Move this method to Enqueuer. 276 // TODO(ahe): Move this method to Enqueuer.
278 isolateLibrary = element; 277 isolateLibrary = element;
279 enqueuer.resolution.addToWorkList(element.find(START_ROOT_ISOLATE)); 278 enqueuer.resolution.addToWorkList(element.find(START_ROOT_ISOLATE));
280 enqueuer.resolution.addToWorkList( 279 enqueuer.resolution.addToWorkList(
281 element.find(const SourceString('_currentIsolate'))); 280 element.find(const SourceString('_currentIsolate')));
282 enqueuer.resolution.addToWorkList( 281 enqueuer.resolution.addToWorkList(
283 element.find(const SourceString('_callInIsolate'))); 282 element.find(const SourceString('_callInIsolate')));
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 final endOffset = end.charOffset + end.slowCharCount; 948 final endOffset = end.charOffset + end.slowCharCount;
950 949
951 // [begin] and [end] might be the same for the same empty token. This 950 // [begin] and [end] might be the same for the same empty token. This
952 // happens for instance when scanning '$$'. 951 // happens for instance when scanning '$$'.
953 assert(endOffset >= beginOffset); 952 assert(endOffset >= beginOffset);
954 return f(beginOffset, endOffset); 953 return f(beginOffset, endOffset);
955 } 954 }
956 955
957 String toString() => 'SourceSpan($uri, $begin, $end)'; 956 String toString() => 'SourceSpan($uri, $begin, $end)';
958 } 957 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698