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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10919123: Reapply Issue 10911006. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698