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

Unified Diff: dart/pkg/compiler/lib/src/compiler.dart

Issue 918893003: Revert "Remove implicit dependencies." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 10 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 | dart/pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/compiler.dart
diff --git a/dart/pkg/compiler/lib/src/compiler.dart b/dart/pkg/compiler/lib/src/compiler.dart
index 44248839a73555a622b921e424f6cd208fb7ecb2..a3adcdb299c7d5df773779e43a3bece46256f5dc 100644
--- a/dart/pkg/compiler/lib/src/compiler.dart
+++ b/dart/pkg/compiler/lib/src/compiler.dart
@@ -524,10 +524,9 @@ abstract class Backend {
void registerMainHasArguments(Enqueuer enqueuer) {}
- void registerAsyncMarker(
- FunctionElement element,
- Enqueuer enqueuer,
- Registry registry) {}
+ void registerAsyncMarker(FunctionElement element,
+ Enqueuer enqueuer,
+ Registry registry) {}
}
/// Backend callbacks function specific to the resolution phase.
@@ -594,27 +593,6 @@ class ResolutionCallbacks {
/// Called when resolving the `Symbol` constructor.
void onSymbolConstructor(Registry registry) {}
-
- /// Called when resolving a literal int.
- void onLiteralInt(Registry registry) {}
-
- /// Called when resolving a literal double.
- void onLiteralDouble(Registry registry) {}
-
- /// Called when resolving a literal bool.
- void onLiteralBool(Registry registry) {}
-
- /// Called when resolving a literal String.
- void onLiteralString(Registry registry) {}
-
- /// Called when resolving a literal null.
- void onLiteralNull(Registry registry) {}
-
- /// Called when resolving a literal Symbol.
- void onLiteralSymbol(Registry registry) {}
-
- /// Called when resolving a literal Function (aka a closure).
- void onLiteralFunction(Registry registry) {}
}
/**
@@ -827,8 +805,8 @@ abstract class Compiler implements DiagnosticListener {
ClassElement typedDataClass;
- /// The class for the [proxy] value defined in dart:core.
- ClassElement proxyClass;
+ /// The constant for the [proxy] variable defined in dart:core.
+ ConstantValue proxyConstant;
// TODO(johnniwinther): Move this to the JavaScriptBackend.
/// The class for patch annotation defined in dart:_js_helper.
@@ -1353,6 +1331,10 @@ abstract class Compiler implements DiagnosticListener {
functionClass.ensureResolved(this);
functionApplyMethod = functionClass.lookupLocalMember('apply');
+ proxyConstant =
+ resolver.constantCompiler.compileConstant(
+ coreLibrary.find('proxy')).value;
+
if (preserveComments) {
return libraryLoader.loadLibrary(DART_MIRRORS)
.then((LibraryElement libraryElement) {
@@ -1421,7 +1403,6 @@ abstract class Compiler implements DiagnosticListener {
_coreTypes.stackTraceClass = lookupCoreClass('StackTrace');
_coreTypes.iterableClass = lookupCoreClass('Iterable');
_coreTypes.symbolClass = lookupCoreClass('Symbol');
- proxyClass = lookupCoreClass('_Proxy');
if (!missingCoreClasses.isEmpty) {
internalError(
coreLibrary,
@@ -1693,6 +1674,12 @@ abstract class Compiler implements DiagnosticListener {
if (main != null && !main.isErroneous) {
FunctionElement mainMethod = main;
if (mainMethod.computeSignature(this).parameterCount != 0) {
+ // The first argument could be a list of strings.
+ world.registerInstantiatedClass(
+ backend.listImplementation, globalDependencies);
+ world.registerInstantiatedClass(
+ backend.stringImplementation, globalDependencies);
+
backend.registerMainHasArguments(world);
}
world.addToWorkList(main);
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698