Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/compiler.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart |
| index c756277a8f02eea7e5c69bfaf008adcc7d05496b..ac1d6053d7dfeb1a79424b2d6ad36a83f087ed88 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart |
| @@ -74,11 +74,14 @@ class DeferredTask { |
| abstract class Backend { |
| final Compiler compiler; |
| - final ConstantSystem constantSystem; |
| - Backend(this.compiler, |
| - [ConstantSystem constantSystem = DART_CONSTANT_SYSTEM]) |
| - : this.constantSystem = constantSystem; |
| + Backend(this.compiler); |
|
floitsch
2014/04/02 16:50:02
Add comments what and when they are used.
Are they
Johnni Winther
2014/04/07 11:42:27
Done.
|
| + |
| + ConstantSystem get constantSystem; |
| + |
| + BackendConstantHandler get constantHandler; |
| + |
| + ConstantCompiler get constantCompiler; |
| // Given a [FunctionElement], return a buffer with the code generated for it |
| // or null if no code was generated. |
| @@ -669,12 +672,12 @@ abstract class Compiler implements DiagnosticListener { |
| dietParser = new DietParserTask(this), |
| parser = new ParserTask(this), |
| patchParser = new PatchParserTask(this), |
| - resolver = new ResolverTask(this), |
| + resolver = new ResolverTask(this, backend.constantCompiler), |
| closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer), |
| checker = new TypeCheckerTask(this), |
| irBuilder = new IrBuilderTask(this), |
| typesTask = new ti.TypesTask(this), |
| - constantHandler = new ConstantHandler(this, backend.constantSystem), |
| + constantHandler = backend.constantCompiler, |
|
floitsch
2014/04/02 16:50:02
It feels wrong (when reading) to assign a compiler
Johnni Winther
2014/04/07 11:42:27
Done.
|
| deferredLoadTask = new DeferredLoadTask(this), |
| mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this), |
| enqueuer = new EnqueueTask(this), |
| @@ -933,8 +936,8 @@ abstract class Compiler implements DiagnosticListener { |
| dynamicClass.ensureResolved(this); |
| - proxyConstant = constantHandler.compileVariable( |
| - coreLibrary.find('proxy'), isConst: true); |
| + proxyConstant = |
| + resolver.constantCompiler.compileConstant(coreLibrary.find('proxy')); |
|
floitsch
2014/04/02 16:50:02
Why go through the resolver?
Johnni Winther
2014/04/07 11:42:27
We need the frontend interpretation. Putting the c
|
| } |
| Element _unnamedListConstructor; |