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

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

Issue 1914623002: Fix for issue 26243 - illegal motion of assignments in instruction merging (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/codegen_helpers.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/nodes.dart
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 4b55e487b426625aceecb7cccace852275681ac0..ac9a5429244a1dc541c0b8f0b5137c0eb7915e52 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -2265,6 +2265,17 @@ class HLocalValue extends HInstruction {
class HParameterValue extends HLocalValue {
HParameterValue(Entity variable, type) : super(variable, type);
+ // [HParameterValue]s are either the value of the parameter (in fully SSA
+ // converted code), or the mutable variable containing the value (in
+ // incompletely SSA converted code, e.g. methods containing exceptions).
+ bool usedAsVariable() {
+ for (HInstruction user in usedBy) {
+ if (user is HLocalGet) return true;
+ if (user is HLocalSet && user.local == this) return true;
+ }
+ return false;
+ }
+
toString() => 'parameter ${sourceElement.name}';
accept(HVisitor visitor) => visitor.visitParameterValue(this);
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen_helpers.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698