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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2907153002: Use inlined constructor for closure data lookup. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 3df9964028d3230473b6c7f07ea2ad43a59ab147..1fa39bcdd218b567d919c95b485e8b9dc76d62bc 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1351,6 +1351,8 @@ class SsaBuilder extends ast.Visitor
HInstruction interceptor = null;
for (int index = constructorResolvedAsts.length - 1; index >= 0; index--) {
ResolvedAst constructorResolvedAst = constructorResolvedAsts[index];
+ ConstructorElement constructor =
+ constructorResolvedAst.element.implementation;
ConstructorBodyElement body =
ConstructorBodyElementX.createFromResolvedAst(constructorResolvedAst);
if (body == null) continue;
@@ -1366,7 +1368,7 @@ class SsaBuilder extends ast.Visitor
bodyCallInputs.add(newObject);
ast.Node node = constructorResolvedAst.node;
ClosureClassMap parameterClosureData =
- closureToClassMapper.getMemberMap(functionElement);
+ closureToClassMapper.getMemberMap(constructor);
FunctionSignature functionSignature = body.functionSignature;
// Provide the parameters to the generative constructor body.
@@ -1387,8 +1389,6 @@ class SsaBuilder extends ast.Visitor
}
// Type variables arguments must come after the box (if there is one).
- ConstructorElement constructor =
- constructorResolvedAst.element.implementation;
ClassElement currentClass = constructor.enclosingClass;
if (rtiNeed.classNeedsRti(currentClass)) {
// If [currentClass] needs RTI, we add the type variables as
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698