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

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

Issue 2901823002: Type .targetElement as MemberEntity (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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/graph_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index e21a5e0ee6a4489a2a9eb862d26193212bc9f614..29aeab214b5526b802085cf5ea985db47aba3f8d 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -47,7 +47,7 @@ import 'types.dart' show TypeMaskFactory;
class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
ir.Node target;
bool _targetIsConstructorBody = false;
- final MemberElement targetElement;
+ final MemberEntity targetElement;
/// The root node of [targetElement]. This is used as the key into the
/// [startFunction] of the locals handler.
@@ -108,8 +108,8 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
graph.element = targetElement;
graph.sourceInformation =
sourceInformationBuilder.buildVariableDeclaration();
- this.localsHandler = new LocalsHandler(
- this, targetElement, null, nativeData, interceptorData);
+ this.localsHandler = new LocalsHandler(this, targetElement, targetElement,
+ targetElement.enclosingClass, null, nativeData, interceptorData);
target = astAdapter.getInitialKernelNode(targetElement);
if (targetElement is ConstructorBodyElement) {
_targetIsConstructorBody = true;
@@ -909,7 +909,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
/// <body>
/// }
_buildForInIndexable(ir.ForInStatement forInStatement) {
- SyntheticLocal indexVariable = new SyntheticLocal('_i', targetElement);
+ SyntheticLocal indexVariable = localsHandler.createLocal('_i');
// These variables are shared by initializer, condition, body and update.
HInstruction array; // Set in buildInitializer.
@@ -3283,8 +3283,7 @@ class TryCatchFinallyBuilder {
startCatchBlock = kernelBuilder.graph.addNewBlock();
kernelBuilder.open(startCatchBlock);
// Note that the name of this local is irrelevant.
- SyntheticLocal local = new SyntheticLocal(
- 'exception', kernelBuilder.localsHandler.executableContext);
+ SyntheticLocal local = kernelBuilder.localsHandler.createLocal('exception');
exception = new HLocalValue(local, kernelBuilder.commonMasks.nonNullType);
kernelBuilder.add(exception);
HInstruction oldRethrowableException = kernelBuilder.rethrowableException;
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/graph_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698