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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.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/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index ddef592ca39546365987728f554ce49366c85d07..9015383a98f1fe7d91defa9ceb4ca619e07ce8f3 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -461,9 +461,6 @@ class JavaScriptBackend extends Backend {
/// `true` if access to [BackendHelpers.invokeOnMethod] is supported.
bool hasInvokeOnSupport = false;
- /// `true` if tear-offs are supported for incremental compilation.
- bool hasIncrementalTearOffSupport = false;
-
/// `true` of `Object.runtimeType` is supported.
bool hasRuntimeTypeSupport = false;
@@ -763,9 +760,6 @@ class JavaScriptBackend extends Backend {
if (!canUseAliasedSuperMember(member, selector)) {
// Invoking a super getter isn't supported, this would require changes to
// compact field descriptors in the emitter.
- // We also turn off this optimization in incremental compilation, to
- // avoid having to regenerate a method just because someone started
- // calling it through super.
return false;
}
aliasedSuperMembers.add(member);
@@ -773,7 +767,7 @@ class JavaScriptBackend extends Backend {
}
bool canUseAliasedSuperMember(Element member, Selector selector) {
- return !selector.isGetter && !compiler.options.hasIncrementalSupport;
+ return !selector.isGetter;
}
/**
@@ -1445,8 +1439,8 @@ class JavaScriptBackend extends Backend {
CodegenEnqueuer get codegenEnqueuer => compiler.enqueuer.codegen;
CodegenEnqueuer createCodegenEnqueuer(CompilerTask task, Compiler compiler) {
- return new CodegenEnqueuer(task, compiler.cacheStrategy, this,
- compiler.options, const TreeShakingEnqueuerStrategy());
+ return new CodegenEnqueuer(
+ task, this, compiler.options, const TreeShakingEnqueuerStrategy());
}
WorldImpact codegen(CodegenWorkItem work) {
@@ -2290,17 +2284,6 @@ class JavaScriptBackend extends Backend {
kernelTask.buildKernelIr();
}
- if (compiler.options.hasIncrementalSupport &&
- !hasIncrementalTearOffSupport) {
- // Always enable tear-off closures during incremental compilation.
- Element element = helpers.closureFromTearOff;
- if (element != null) {
- enqueuer.applyImpact(
- impactTransformer.createImpactFor(impacts.closureClass));
- }
- hasIncrementalTearOffSupport = true;
- }
-
if (!enqueuer.isResolutionQueue && preMirrorsMethodCount == 0) {
preMirrorsMethodCount = generatedCode.length;
}
@@ -2520,18 +2503,6 @@ class JavaScriptBackend extends Backend {
FunctionElement helperForMainArity() => helpers.mainHasTooManyParameters;
- void forgetElement(Element element) {
- constants.forgetElement(element);
- constantCompilerTask.dartConstantCompiler.forgetElement(element);
- aliasedSuperMembers.remove(element);
- generatedCode.remove(element);
- if (element is MemberElement) {
- for (Element closure in element.nestedClosures) {
- generatedCode.remove(closure);
- }
- }
- }
-
@override
WorldImpact computeMainImpact(MethodElement mainMethod,
{bool forResolution}) {
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698