| Index: lib/compiler/implementation/compiler.dart
|
| diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
|
| index 690e7dbb87364e393da043e41b22430f405c9027..1524226066e4034ec16abca8fe38f4d30409de88 100644
|
| --- a/lib/compiler/implementation/compiler.dart
|
| +++ b/lib/compiler/implementation/compiler.dart
|
| @@ -115,13 +115,6 @@ class Compiler implements DiagnosticListener {
|
| ClassElement listClass;
|
| Element assertMethod;
|
|
|
| - /**
|
| - * Interface used to determine if an object has the JavaScript
|
| - * indexing behavior. The interface is only visible to specific
|
| - * libraries.
|
| - */
|
| - ClassElement jsIndexingBehaviorInterface;
|
| -
|
| Element get currentElement => _currentElement;
|
| withCurrentElement(Element element, f()) {
|
| Element old = currentElement;
|
| @@ -355,9 +348,6 @@ class Compiler implements DiagnosticListener {
|
| if (!coreLibValid) {
|
| cancel('core library does not contain required classes');
|
| }
|
| -
|
| - jsIndexingBehaviorInterface =
|
| - findHelper(const SourceString('JavaScriptIndexingBehavior'));
|
| }
|
|
|
| void scanBuiltinLibraries() {
|
| @@ -374,9 +364,6 @@ class Compiler implements DiagnosticListener {
|
| assertMethod = coreLibrary.find(const SourceString('assert'));
|
|
|
| initializeSpecialClasses();
|
| -
|
| - //patchDartLibrary(coreLibrary, 'core');
|
| - //patchDartLibrary(coreImplLibrary, 'coreimpl');
|
| }
|
|
|
| void importCoreLibrary(LibraryElement library) {
|
| @@ -519,6 +506,7 @@ class Compiler implements DiagnosticListener {
|
| const SourceString('DART_CLOSURE_TO_JS'), library), this);
|
| }
|
|
|
| + // TODO(karlklose,floitsch): move this to the javascript backend.
|
| /** Enable the 'JS' helper for a library if needed. */
|
| void maybeEnableJSHelper(library) {
|
| String libraryName = library.uri.toString();
|
| @@ -528,6 +516,8 @@ class Compiler implements DiagnosticListener {
|
| || libraryName == 'dart:math'
|
| || libraryName == 'dart:html') {
|
| library.addToScope(findHelper(const SourceString('JS')), this);
|
| + Element jsIndexingBehaviorInterface =
|
| + findHelper(const SourceString('JavaScriptIndexingBehavior'));
|
| if (jsIndexingBehaviorInterface !== null) {
|
| library.addToScope(jsIndexingBehaviorInterface, this);
|
| }
|
| @@ -579,6 +569,11 @@ class Compiler implements DiagnosticListener {
|
|
|
| if (compilationFailed) return;
|
|
|
| + // TODO(karlklose): also take the instantiated types into account and move
|
| + // this computation to before codegen.
|
| + enqueuer.codegen.universe.computeRequiredTypes(
|
| + enqueuer.resolution.universe.isChecks);
|
| +
|
| backend.assembleProgram();
|
|
|
| checkQueues();
|
|
|