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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/enqueue.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/enqueue.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart b/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 3e9921a03a4f18b13a86cacabcb572c90a119463..7a8c8dead3a4878607a71975e33c8bca108b99cd 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -721,15 +721,21 @@ class CodegenEnqueuer extends Enqueuer {
final Map<Element, js.Expression> generatedCode =
new Map<Element, js.Expression>();
+ final Set<Element> newlyEnqueuedElements;
+
CodegenEnqueuer(Compiler compiler,
ItemCompilationContext itemCompilationContextCreator())
- : super('codegen enqueuer', compiler, itemCompilationContextCreator),
- queue = new Queue<CodegenWorkItem>();
+ : queue = new Queue<CodegenWorkItem>(),
+ newlyEnqueuedElements = compiler.cacheStrategy.newSet(),
+ super('codegen enqueuer', compiler, itemCompilationContextCreator);
bool isProcessed(Element member) =>
member.isAbstract || generatedCode.containsKey(member);
void internalAddToWorkList(Element element) {
+ if (compiler.hasIncrementalSupport) {
+ newlyEnqueuedElements.add(element);
+ }
// Don't generate code for foreign elements.
if (element.isForeign(compiler)) return;

Powered by Google App Engine
This is Rietveld 408576698