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

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

Issue 340023003: Various caches for incremental compilation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Only allocate caches when hasIncrementalCompilation is true. 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/sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
index 4be232a54f3234ac1629f6096eeacd17ec39bd04..df957bf04259007b225cfecf60bbcf033abe6ecc 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -506,6 +506,8 @@ abstract class Compiler implements DiagnosticListener {
String assembledCode;
Types types;
+ final CacheStrategy cacheStrategy;
+
/**
* Map from token to the first preceeding comment token.
*/
@@ -600,6 +602,10 @@ abstract class Compiler implements DiagnosticListener {
final bool suppressWarnings;
+ /// If `true`, some values are cached for reuse in incremental compilation.
+ /// Incremental compilation is basically calling [run] more than once.
+ final bool hasIncrementalSupport;
+
api.CompilerOutputProvider outputProvider;
bool disableInlining = false;
@@ -839,6 +845,7 @@ abstract class Compiler implements DiagnosticListener {
this.showPackageWarnings: false,
this.useContentSecurityPolicy: false,
this.suppressWarnings: false,
+ bool hasIncrementalSupport: false,
outputProvider,
List<String> strips: const []})
: this.disableTypeInferenceFlag =
@@ -847,6 +854,8 @@ abstract class Compiler implements DiagnosticListener {
analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag,
this.analyzeSignaturesOnly = analyzeSignaturesOnly,
this.analyzeAllFlag = analyzeAllFlag,
+ this.hasIncrementalSupport = hasIncrementalSupport,
+ cacheStrategy = new CacheStrategy(hasIncrementalSupport),
this.outputProvider = (outputProvider == null)
? NullSink.outputProvider
: outputProvider {

Powered by Google App Engine
This is Rietveld 408576698