| Index: dart/pkg/dart2js_incremental/lib/caching_compiler.dart
|
| diff --git a/dart/site/try/src/caching_compiler.dart b/dart/pkg/dart2js_incremental/lib/caching_compiler.dart
|
| similarity index 87%
|
| rename from dart/site/try/src/caching_compiler.dart
|
| rename to dart/pkg/dart2js_incremental/lib/caching_compiler.dart
|
| index f8703ff4ff8d49447edf03697090a3ce1bf3041e..181f405e3782c877863ff2e997fbf49c3caba00e 100644
|
| --- a/dart/site/try/src/caching_compiler.dart
|
| +++ b/dart/pkg/dart2js_incremental/lib/caching_compiler.dart
|
| @@ -2,29 +2,10 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library trydart.caching_compiler;
|
| -
|
| -import 'dart:profiler' show
|
| - UserTag;
|
| -
|
| -import 'package:compiler/compiler.dart' show
|
| - CompilerInputProvider,
|
| - CompilerOutputProvider,
|
| - Diagnostic,
|
| - DiagnosticHandler;
|
| -
|
| -import 'package:compiler/implementation/apiimpl.dart' show
|
| - Compiler;
|
| -
|
| -import 'package:compiler/implementation/dart2jslib.dart' show
|
| - NullSink;
|
| -
|
| -import 'package:compiler/implementation/js_backend/js_backend.dart' show
|
| - JavaScriptBackend;
|
| -
|
| -import 'package:compiler/implementation/elements/elements.dart' show
|
| - LibraryElement;
|
| +part of dart2js_incremental;
|
|
|
| +/// Do not call this method directly. It will be made private.
|
| +// TODO(ahe): Make this method private.
|
| Compiler reuseCompiler(
|
| {DiagnosticHandler diagnosticHandler,
|
| CompilerInputProvider inputProvider,
|
| @@ -33,8 +14,9 @@ Compiler reuseCompiler(
|
| Compiler cachedCompiler,
|
| Uri libraryRoot,
|
| Uri packageRoot,
|
| - bool packagesAreImmutable: false}) {
|
| - UserTag oldTag = new UserTag('reuseCompiler').makeCurrent();
|
| + bool packagesAreImmutable: false,
|
| + Map<String, dynamic> environment}) {
|
| + UserTag oldTag = new UserTag('_reuseCompiler').makeCurrent();
|
| if (libraryRoot == null) {
|
| throw 'Missing libraryRoot';
|
| }
|
| @@ -47,6 +29,9 @@ Compiler reuseCompiler(
|
| if (outputProvider == null) {
|
| outputProvider = NullSink.outputProvider;
|
| }
|
| + if (environment == null) {
|
| + environment = {};
|
| + }
|
| Compiler compiler = cachedCompiler;
|
| if (compiler == null ||
|
| compiler.libraryRoot != libraryRoot ||
|
| @@ -76,7 +61,7 @@ Compiler reuseCompiler(
|
| libraryRoot,
|
| packageRoot,
|
| options,
|
| - {});
|
| + environment);
|
| } else {
|
| compiler
|
| ..outputProvider = outputProvider
|
|
|