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

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

Issue 17580016: Limit the amount of inlining we do to try to avoid generating too much code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 7285d4211f2917d24027b672d67f8b8a0ec1567f..51035652b7dfd7e2ba281eaec9751a46d7084274 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -237,11 +237,6 @@ abstract class Enqueuer {
// need to emit the method.
if (universe.hasInvokedGetter(member, compiler)) {
registerClosurizedMember(member, compiler.globalDependencies);
- // We will emit a closure, so make sure the closure class is
- // generated.
- registerInstantiatedClass(compiler.boundClosureClass,
- // Precise dependency is not important here.
- compiler.globalDependencies);
return addToWorkList(member);
}
// Store the member in [instanceFunctionsByName] to catch
@@ -462,11 +457,7 @@ abstract class Enqueuer {
if (selector.isGetter()) {
processInstanceFunctions(methodName, (Element member) {
if (selector.appliesUnnamed(member, compiler)) {
- // We will emit a closure, so make sure the bound closure class is
- // generated.
- registerInstantiatedClass(compiler.boundClosureClass,
- // Precise dependency is not important here.
- compiler.globalDependencies);
+ registerBoundClosure();
return true;
}
return false;
@@ -553,14 +544,23 @@ abstract class Enqueuer {
universe.genericCallMethods.add(element);
}
+ void registerBoundClosure() {
+ registerInstantiatedClass(compiler.boundClosureClass,
+ // Precise dependency is not important here.
+ compiler.globalDependencies);
+ }
+
void registerClosurizedMember(Element element, TreeElements elements) {
if (element.computeType(compiler).containsTypeVariables) {
registerClosurizedGenericMember(element, elements);
+ } else {
+ registerBoundClosure();
}
universe.closurizedMembers.add(element);
}
void registerClosurizedGenericMember(Element element, TreeElements elements) {
+ registerBoundClosure();
compiler.backend.registerGenericClosure(element, this, elements);
universe.closurizedGenericMembers.add(element);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698