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

Unified Diff: dart/pkg/dart2js_incremental/lib/caching_compiler.dart

Issue 355563004: Create package for incremental compilation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
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
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart » ('j') | dart/pkg/dart2js_incremental/pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698