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

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

Issue 10383065: Start creating a MemberSet abstraction, and use it to fold getters/setters into field accesses. (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
Index: lib/compiler/implementation/ssa/nodes.dart
===================================================================
--- lib/compiler/implementation/ssa/nodes.dart (revision 7442)
+++ lib/compiler/implementation/ssa/nodes.dart (working copy)
@@ -1212,20 +1212,28 @@
}
class HFieldGet extends HInstruction {
- final Element element;
- HFieldGet(Element this.element, HInstruction receiver)
+ final SourceString name;
+ HFieldGet(this.name, HInstruction receiver)
: super(<HInstruction>[receiver]);
- HFieldGet.fromActivation(Element this.element) : super(<HInstruction>[]);
+ HFieldGet.fromActivation(this.name) : super(<HInstruction>[]);
HInstruction get receiver() => inputs.length == 1 ? inputs[0] : null;
accept(HVisitor visitor) => visitor.visitFieldGet(this);
+
+ void prepareGvn() {
+ clearAllSideEffects();
+ }
+
+ int typeCode() => 27;
+ bool typeEquals(other) => other is HFieldGet;
+ bool dataEquals(HFieldGet other) => name == other.name;
}
class HFieldSet extends HInstruction {
- final Element element;
- HFieldSet(Element this.element, HInstruction receiver, HInstruction value)
+ final SourceString name;
+ HFieldSet(this.name, HInstruction receiver, HInstruction value)
: super(<HInstruction>[receiver, value]);
- HFieldSet.fromActivation(Element this.element, HInstruction value)
+ HFieldSet.fromActivation(this.name, HInstruction value)
: super(<HInstruction>[value]);
HInstruction get receiver() => inputs.length == 2 ? inputs[0] : null;

Powered by Google App Engine
This is Rietveld 408576698