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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 14049010: Take noSuchMethod into account when computing the potential targets of a call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 part of dart2js; 5 part of dart2js;
6 6
7 class EnqueueTask extends CompilerTask { 7 class EnqueueTask extends CompilerTask {
8 final ResolutionEnqueuer resolution; 8 final ResolutionEnqueuer resolution;
9 final CodegenEnqueuer codegen; 9 final CodegenEnqueuer codegen;
10 10
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 addToWorkList(compiler.isolateHelperLibrary.find( 516 addToWorkList(compiler.isolateHelperLibrary.find(
517 const SourceString('_currentIsolate'))); 517 const SourceString('_currentIsolate')));
518 addToWorkList(compiler.isolateHelperLibrary.find( 518 addToWorkList(compiler.isolateHelperLibrary.find(
519 const SourceString('_callInIsolate'))); 519 const SourceString('_callInIsolate')));
520 } 520 }
521 521
522 void enableNoSuchMethod(Element element) { 522 void enableNoSuchMethod(Element element) {
523 if (compiler.enabledNoSuchMethod) return; 523 if (compiler.enabledNoSuchMethod) return;
524 if (compiler.backend.isDefaultNoSuchMethodImplementation(element)) return; 524 if (compiler.backend.isDefaultNoSuchMethodImplementation(element)) return;
525 525
526 Selector selector = new Selector.noSuchMethod(); 526 Selector selector = compiler.noSuchMethodSelector;
527 compiler.enabledNoSuchMethod = true; 527 compiler.enabledNoSuchMethod = true;
528 registerInvocation(Compiler.NO_SUCH_METHOD, selector); 528 registerInvocation(Compiler.NO_SUCH_METHOD, selector);
529 529
530 compiler.createInvocationMirrorElement = 530 compiler.createInvocationMirrorElement =
531 compiler.findHelper(Compiler.CREATE_INVOCATION_MIRROR); 531 compiler.findHelper(Compiler.CREATE_INVOCATION_MIRROR);
532 addToWorkList(compiler.createInvocationMirrorElement); 532 addToWorkList(compiler.createInvocationMirrorElement);
533 } 533 }
534 534
535 void forEach(f(WorkItem work)) { 535 void forEach(f(WorkItem work)) {
536 while (!queue.isEmpty) { 536 while (!queue.isEmpty) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 while(!queue.isEmpty) { 602 while(!queue.isEmpty) {
603 // TODO(johnniwinther): Find an optimal process order for codegen. 603 // TODO(johnniwinther): Find an optimal process order for codegen.
604 f(queue.removeLast()); 604 f(queue.removeLast());
605 } 605 }
606 } 606 }
607 607
608 void _logSpecificSummary(log(message)) { 608 void _logSpecificSummary(log(message)) {
609 log('Compiled ${generatedCode.length} methods.'); 609 log('Compiled ${generatedCode.length} methods.');
610 } 610 }
611 } 611 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698