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

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

Issue 14986002: Make static tear-off closures a class, like instance tear-off closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 22664)
+++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy)
@@ -1354,16 +1354,15 @@
}
class HInvokeStatic extends HInvoke {
+ final Element element;
/** The first input must be the target. */
- HInvokeStatic(inputs, HType type) : super(inputs) {
+ HInvokeStatic(this.element, inputs, HType type) : super(inputs) {
instructionType = type;
}
toString() => 'invoke static: ${element.name}';
accept(HVisitor visitor) => visitor.visitInvokeStatic(this);
int typeCode() => HInstruction.INVOKE_STATIC_TYPECODE;
- Element get element => target.element;
- HStatic get target => inputs[0];
}
class HInvokeSuper extends HInvokeStatic {
@@ -1371,15 +1370,15 @@
final ClassElement caller;
final bool isSetter;
- HInvokeSuper(this.caller, inputs, {this.isSetter})
- : super(inputs, HType.UNKNOWN);
+ HInvokeSuper(Element element, this.caller, inputs, {this.isSetter})
+ : super(element, inputs, HType.UNKNOWN);
toString() => 'invoke super: ${element.name}';
accept(HVisitor visitor) => visitor.visitInvokeSuper(this);
HInstruction get value {
assert(isSetter);
- // Index 0: the element, index 1: 'this'.
- return inputs[2];
+ // Index 0: 'this'.
+ return inputs[1];
}
}

Powered by Google App Engine
This is Rietveld 408576698