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

Unified Diff: pkg/compiler/lib/src/universe/world_builder.dart

Issue 2668233002: Remove code supporting incremental compilation in dart2js (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index a201a737429304bc6cbf55047c52e1ac5418d78b..5c1980fd681b9fc37119facaca07dd287fbc59dd 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -6,12 +6,10 @@ library universe;
import 'dart:collection';
-import '../cache_strategy.dart';
import '../common.dart';
import '../common/backend_api.dart' show Backend;
import '../common/names.dart' show Identifiers;
import '../common/resolution.dart' show Resolution;
-import '../compiler.dart' show Compiler;
import '../core_types.dart';
import '../elements/elements.dart';
import '../elements/entities.dart';
@@ -480,18 +478,12 @@ class ResolutionWorldBuilderImpl implements ResolutionWorldBuilder {
<ClassElement, ClassHierarchyNode>{};
final Map<ClassElement, ClassSet> _classSets = <ClassElement, ClassSet>{};
- final Set<Element> alreadyPopulated;
-
- final CacheStrategy cacheStrategy;
-
bool get isClosed => _closed;
- ResolutionWorldBuilderImpl(Backend backend, Resolution resolution,
- CacheStrategy cacheStrategy, this.selectorConstraintsStrategy)
+ ResolutionWorldBuilderImpl(
+ Backend backend, Resolution resolution, this.selectorConstraintsStrategy)
: this._backend = backend,
- this._resolution = resolution,
- this.cacheStrategy = cacheStrategy,
- alreadyPopulated = cacheStrategy.newSet() {
+ this._resolution = resolution {
_allFunctions = new FunctionSetBuilder();
}
@@ -797,24 +789,6 @@ class ResolutionWorldBuilderImpl implements ResolutionWorldBuilder {
}
}
- void forgetEntity(Entity entity, Compiler compiler) {
- allClosures.remove(entity);
- slowDirectlyNestedClosures(entity).forEach(compiler.forgetElement);
- closurizedMembers.remove(entity);
- fieldSetters.remove(entity);
- _instantiationInfo.remove(entity);
-
- void removeUsage(Set<_MemberUsage> set, Entity entity) {
- if (set == null) return;
- set.removeAll(
- set.where((_MemberUsage usage) => usage.entity == entity).toList());
- }
-
- _processedClasses.remove(entity);
- removeUsage(_instanceMembersByName[entity.name], entity);
- removeUsage(_instanceFunctionsByName[entity.name], entity);
- }
-
// TODO(ahe): Replace this method with something that is O(1), for example,
// by using a map.
List<LocalFunctionElement> slowDirectlyNestedClosures(Element element) {
@@ -1034,9 +1008,6 @@ class ResolutionWorldBuilderImpl implements ResolutionWorldBuilder {
if (!info.hasInstantiation) {
return;
}
- if (cacheStrategy.hasIncrementalSupport && !alreadyPopulated.add(cls)) {
- return;
- }
assert(cls.isDeclaration);
if (!cls.isResolved) {
reporter.internalError(cls, 'Class "${cls.name}" is not resolved.');
@@ -1505,24 +1476,6 @@ class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
memberUsed(usage.entity, useSet);
}
- void forgetElement(Element element, Compiler compiler) {
- _processedClasses.remove(element);
- _directlyInstantiatedClasses.remove(element);
- if (element is ClassElement) {
- assert(invariant(element, element.thisType.isRaw,
- message: 'Generic classes not supported (${element.thisType}).'));
- _instantiatedTypes..remove(element.rawType)..remove(element.thisType);
- }
- removeFromSet(_instanceMembersByName, element);
- removeFromSet(_instanceFunctionsByName, element);
- if (element is MemberElement) {
- for (Element closure in element.nestedClosures) {
- removeFromSet(_instanceMembersByName, closure);
- removeFromSet(_instanceFunctionsByName, closure);
- }
- }
- }
-
void processClassMembers(ClassElement cls, MemberUsedCallback memberUsed) {
cls.implementation.forEachMember((_, MemberElement member) {
assert(invariant(member, member.isDeclaration));
@@ -1982,10 +1935,3 @@ class _StaticFunctionUsage extends _StaticMemberUsage {
@override
EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC;
}
-
-void removeFromSet(Map<String, Set<_MemberUsage>> map, Element element) {
- Set<_MemberUsage> set = map[element.name];
- if (set == null) return;
- set.removeAll(
- set.where((_MemberUsage usage) => usage.entity == element).toList());
-}
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698