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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 10562041: Introduce HLocalValue and HLocalGet/Set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 4abba9ad1f258c5ee19d06a2f8c227cc4a13124e..06b2fdaf8bdd16570e6b2d167ab4cb96f3daba2b 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -417,8 +417,8 @@ class LocalsHandler {
return lookup;
} else {
assert(isUsedInTry(element));
- HParameterValue parameter = getActivationParameter(element);
- HInstruction variable = new HFieldGet.fromActivation(parameter);
+ HLocalValue local = getLocal(element);
+ HInstruction variable = new HLocalGet(element, local);
builder.add(variable);
return variable;
}
@@ -441,7 +441,7 @@ class LocalsHandler {
return res;
}
- HParameterValue getActivationParameter(Element element) {
+ HLocalValue getLocal(Element element) {
// If the element is a parameter, we already have a
// HParameterValue for it. We cannot create another one because
// it could then have another name than the real parameter. And
@@ -450,9 +450,9 @@ class LocalsHandler {
if (element.isParameter()) return builder.parameters[element];
return builder.activationVariables.putIfAbsent(element, () {
- HParameterValue parameter = new HParameterValue(element);
- builder.graph.entry.addAtExit(parameter);
- return parameter;
+ HLocalValue local = new HLocalValue(element);
+ builder.graph.entry.addAtExit(local);
+ return local;
});
}
@@ -475,8 +475,8 @@ class LocalsHandler {
builder.add(new HFieldSet(redirect, box, value));
} else {
assert(isUsedInTry(element));
- HParameterValue parameter = getActivationParameter(element);
- builder.add(new HFieldSet.fromActivation(parameter, value));
+ HLocalValue local = getLocal(element);
+ builder.add(new HLocalSet(element, local, value));
}
}
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698