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

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

Issue 118253004: Remove tracking of factories with type arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 typedef ItemCompilationContext ItemCompilationContextCreator(); 7 typedef ItemCompilationContext ItemCompilationContextCreator();
8 8
9 class EnqueueTask extends CompilerTask { 9 class EnqueueTask extends CompilerTask {
10 final ResolutionEnqueuer resolution; 10 final ResolutionEnqueuer resolution;
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 void registerIsCheck(DartType type, TreeElements elements) { 488 void registerIsCheck(DartType type, TreeElements elements) {
489 type = universe.registerIsCheck(type, compiler); 489 type = universe.registerIsCheck(type, compiler);
490 // Even in checked mode, type annotations for return type and argument 490 // Even in checked mode, type annotations for return type and argument
491 // types do not imply type checks, so there should never be a check 491 // types do not imply type checks, so there should never be a check
492 // against the type variable of a typedef. 492 // against the type variable of a typedef.
493 assert(type.kind != TypeKind.TYPE_VARIABLE || 493 assert(type.kind != TypeKind.TYPE_VARIABLE ||
494 !type.element.enclosingElement.isTypedef()); 494 !type.element.enclosingElement.isTypedef());
495 compiler.backend.registerIsCheck(type, this, elements); 495 compiler.backend.registerIsCheck(type, this, elements);
496 } 496 }
497 497
498 /**
499 * If a factory constructor is used with type arguments, we lose track
500 * which arguments could be used to create instances of classes that use their
501 * type variables as expressions, so we have to remember if we saw such a use.
502 */
503 void registerFactoryWithTypeArguments(TreeElements elements) {
504 universe.usingFactoryWithTypeArguments = true;
505 }
506
507 void registerAsCheck(DartType type, TreeElements elements) { 498 void registerAsCheck(DartType type, TreeElements elements) {
508 registerIsCheck(type, elements); 499 registerIsCheck(type, elements);
509 compiler.backend.registerAsCheck(type, this, elements); 500 compiler.backend.registerAsCheck(type, this, elements);
510 } 501 }
511 502
512 void registerGenericCallMethod(Element element, TreeElements elements) { 503 void registerGenericCallMethod(Element element, TreeElements elements) {
513 compiler.backend.registerGenericCallMethod(element, this, elements); 504 compiler.backend.registerGenericCallMethod(element, this, elements);
514 universe.genericCallMethods.add(element); 505 universe.genericCallMethods.add(element);
515 } 506 }
516 507
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } 741 }
751 CodegenWorkItem workItem = new CodegenWorkItem( 742 CodegenWorkItem workItem = new CodegenWorkItem(
752 element, itemCompilationContextCreator()); 743 element, itemCompilationContextCreator());
753 queue.add(workItem); 744 queue.add(workItem);
754 } 745 }
755 746
756 void _logSpecificSummary(log(message)) { 747 void _logSpecificSummary(log(message)) {
757 log('Compiled ${generatedCode.length} methods.'); 748 log('Compiled ${generatedCode.length} methods.');
758 } 749 }
759 } 750 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698