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

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

Issue 10452029: Fix bug when a variable is used in try/catch and accessed trough HFieldGet and HFieldSet: reference… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « lib/compiler/implementation/ssa/codegen.dart ('k') | tests/language/scoped_variables_try_catch_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
===================================================================
--- lib/compiler/implementation/ssa/nodes.dart (revision 7979)
+++ lib/compiler/implementation/ssa/nodes.dart (working copy)
@@ -1215,9 +1215,11 @@
final SourceString name;
HFieldGet(this.name, HInstruction receiver)
: super(<HInstruction>[receiver]);
- HFieldGet.fromActivation(this.name) : super(<HInstruction>[]);
+ HFieldGet.fromActivation(receiver) : this(null, receiver);
HInstruction get receiver() => inputs.length == 1 ? inputs[0] : null;
+ bool isFromActivation() => name === null;
+
accept(HVisitor visitor) => visitor.visitFieldGet(this);
void prepareGvn() {
@@ -1233,12 +1235,13 @@
final SourceString name;
HFieldSet(this.name, HInstruction receiver, HInstruction value)
: super(<HInstruction>[receiver, value]);
- HFieldSet.fromActivation(this.name, HInstruction value)
- : super(<HInstruction>[value]);
+ HFieldSet.fromActivation(receiver, value)
+ : this(null, receiver, value);
HInstruction get receiver() => inputs.length == 2 ? inputs[0] : null;
HInstruction get value() => inputs.length == 2 ? inputs[1] : inputs[0];
accept(HVisitor visitor) => visitor.visitFieldSet(this);
+ bool isFromActivation() => name === null;
void prepareGvn() {
// TODO(ngeoffray): implement more fine grain side effects.
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | tests/language/scoped_variables_try_catch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698