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

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

Issue 10825337: Add name and library to selectors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge from master. Created 8 years, 4 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
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 9b32230370bfc618358872a99edcb1ac0b9e288a..77b80e087fec3d1d4e154052a3886f5cdecb1f33 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -1161,8 +1161,7 @@ class HInvoke extends HInstruction {
* the receiver of a method-call. The remaining inputs are the arguments
* to the invocation.
*/
- final Selector selector;
- HInvoke(Selector this.selector, List<HInstruction> inputs) : super(inputs);
+ HInvoke(List<HInstruction> inputs) : super(inputs);
static final int ARGUMENTS_OFFSET = 1;
// TODO(floitsch): make class abstract instead of adding an abstract method.
@@ -1170,11 +1169,12 @@ class HInvoke extends HInstruction {
}
class HInvokeDynamic extends HInvoke {
+ final Selector selector;
Element element;
SourceString name;
- HInvokeDynamic(
- Selector selector, this.element, this.name, List<HInstruction> inputs)
- : super(selector, inputs);
+
+ HInvokeDynamic(this.selector, this.element, this.name,
+ List<HInstruction> inputs) : super(inputs);
toString() => 'invoke dynamic: $name';
HInstruction get receiver() => inputs[0];
@@ -1225,8 +1225,7 @@ class HInvokeDynamicSetter extends HInvokeDynamicField {
class HInvokeStatic extends HInvoke {
/** The first input must be the target. */
- HInvokeStatic(selector, inputs, [HType knownType = HType.UNKNOWN])
- : super(selector, inputs) {
+ HInvokeStatic(inputs, [HType knownType = HType.UNKNOWN]) : super(inputs) {
guaranteedType = knownType;
}
@@ -1247,23 +1246,24 @@ class HInvokeStatic extends HInvoke {
}
class HInvokeSuper extends HInvokeStatic {
- HInvokeSuper(selector, inputs) : super(selector, inputs);
+ HInvokeSuper(inputs) : super(inputs);
toString() => 'invoke super: ${element.name}';
accept(HVisitor visitor) => visitor.visitInvokeSuper(this);
}
class HInvokeInterceptor extends HInvokeStatic {
+ final Selector selector;
final SourceString name;
final bool getter;
final bool setter;
- HInvokeInterceptor(Selector selector,
- SourceString this.name,
+ HInvokeInterceptor(this.selector,
+ this.name,
List<HInstruction> inputs,
[HType knownType = HType.UNKNOWN,
- bool this.getter = false,
- bool this.setter = false])
- : super(selector, inputs, knownType);
+ this.getter = false,
+ this.setter = false])
+ : super(inputs, knownType);
toString() => 'invoke interceptor: ${element.name}';
accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this);
@@ -1452,7 +1452,7 @@ class HForeignNew extends HForeign {
class HInvokeBinary extends HInvokeStatic {
HInvokeBinary(HStatic target, HInstruction left, HInstruction right)
- : super(Selector.BINARY_OPERATOR, <HInstruction>[target, left, right]);
+ : super(<HInstruction>[target, left, right]);
HInstruction get left() => inputs[1];
HInstruction get right() => inputs[2];
@@ -1722,7 +1722,7 @@ class HBitXor extends HBinaryBitOp {
class HInvokeUnary extends HInvokeStatic {
HInvokeUnary(HStatic target, HInstruction input)
- : super(Selector.UNARY_OPERATOR, <HInstruction>[target, input]);
+ : super(<HInstruction>[target, input]);
HInstruction get operand() => inputs[1];
@@ -2257,7 +2257,7 @@ class HLiteralList extends HInstruction {
class HIndex extends HInvokeStatic {
HIndex(HStatic target, HInstruction receiver, HInstruction index)
- : super(Selector.INDEX, <HInstruction>[target, receiver, index]);
+ : super(<HInstruction>[target, receiver, index]);
toString() => 'index operator';
accept(HVisitor visitor) => visitor.visitIndex(this);
@@ -2291,8 +2291,7 @@ class HIndexAssign extends HInvokeStatic {
HInstruction receiver,
HInstruction index,
HInstruction value)
- : super(Selector.INDEX_SET,
- <HInstruction>[target, receiver, index, value]);
+ : super(<HInstruction>[target, receiver, index, value]);
toString() => 'index assign operator';
accept(HVisitor visitor) => visitor.visitIndexAssign(this);

Powered by Google App Engine
This is Rietveld 408576698