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

Unified Diff: pkg/kernel/lib/transformations/closure/converter.dart

Issue 2937213002: Remove ContextClass that is not needed since we're using Vectors (Closed)
Patch Set: Merge in latest changes in master (f99509ad42) Created 3 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: pkg/kernel/lib/transformations/closure/converter.dart
diff --git a/pkg/kernel/lib/transformations/closure/converter.dart b/pkg/kernel/lib/transformations/closure/converter.dart
index ecf7efbd8e1c4cf59dfb0a3d6160356678d8f93f..93c0d71036e24a27404856632a8833845dabb9e1 100644
--- a/pkg/kernel/lib/transformations/closure/converter.dart
+++ b/pkg/kernel/lib/transformations/closure/converter.dart
@@ -74,7 +74,6 @@ import 'rewriter.dart' show AstRewriter, BlockRewriter, InitializerRewriter;
class ClosureConverter extends Transformer {
final CoreTypes coreTypes;
- final Class contextClass;
final Set<VariableDeclaration> capturedVariables;
final Map<FunctionNode, Set<TypeParameter>> capturedTypeVariables;
final Map<FunctionNode, VariableDeclaration> thisAccess;
@@ -136,7 +135,7 @@ class ClosureConverter extends Transformer {
Map<TypeParameter, DartType> typeSubstitution =
const <TypeParameter, DartType>{};
- ClosureConverter(this.coreTypes, ClosureInfo info, this.contextClass)
+ ClosureConverter(this.coreTypes, ClosureInfo info)
: this.capturedVariables = info.variables,
this.capturedTypeVariables = info.typeVariables,
this.thisAccess = info.thisAccess,
@@ -167,7 +166,6 @@ class ClosureConverter extends Transformer {
TreeNode visitLibrary(Library node) {
assert(newLibraryMembers.isEmpty);
- if (node == contextClass.enclosingLibrary) return node;
currentLibrary = node;
node = super.visitLibrary(node);
« no previous file with comments | « pkg/kernel/lib/transformations/closure/context.dart ('k') | pkg/kernel/lib/transformations/closure/mock.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698