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

Unified Diff: pkg/kernel/lib/transformations/method_call.dart

Issue 2918593003: Pass ClassHierarchy instead of creating it. (Closed)
Patch Set: Created 3 years, 7 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/method_call.dart
diff --git a/pkg/kernel/lib/transformations/method_call.dart b/pkg/kernel/lib/transformations/method_call.dart
index 1dda53b5691f0056e6dc5c1b5a47dce8900c31b1..d01a87483f1671261c27021f9809b388e5211c71 100644
--- a/pkg/kernel/lib/transformations/method_call.dart
+++ b/pkg/kernel/lib/transformations/method_call.dart
@@ -53,9 +53,10 @@ import '../visitor.dart';
/// var b = new B();
/// b.foo(499, named1: 88);
/// }
-Program transformProgram(CoreTypes coreTypes, Program program,
+Program transformProgram(
+ CoreTypes coreTypes, ClassHierarchy hierarchy, Program program,
[debug = false]) {
- new MethodCallTransformer(coreTypes, debug).visitProgram(program);
+ new MethodCallTransformer(coreTypes, hierarchy, debug).visitProgram(program);
return program;
}
@@ -111,12 +112,10 @@ class MethodCallTransformer extends Transformer {
Constructor _invocationMirrorConstructor; // cached
Procedure _listFrom; // cached
- MethodCallTransformer(this.coreTypes, this._debug);
+ MethodCallTransformer(this.coreTypes, this.hierarchy, this._debug);
@override
TreeNode visitProgram(Program node) {
- hierarchy = new ClassHierarchy(node);
-
// First move body of all procedures that takes optional positional or named
// parameters and record which non-static procedure names have optional
// positional arguments.

Powered by Google App Engine
This is Rietveld 408576698