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

Unified Diff: frog/leg/ssa/nodes.dart

Issue 9166010: Implement super calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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: frog/leg/ssa/nodes.dart
diff --git a/frog/leg/ssa/nodes.dart b/frog/leg/ssa/nodes.dart
index e5ab8ac70cc400914689cbe0e5c90039089af1cc..2defdb0472bb448474e24273959b33a446997294 100644
--- a/frog/leg/ssa/nodes.dart
+++ b/frog/leg/ssa/nodes.dart
@@ -28,6 +28,7 @@ interface HVisitor<R> {
R visitInvokeDynamicSetter(HInvokeDynamicSetter node);
R visitInvokeInterceptor(HInvokeInterceptor node);
R visitInvokeStatic(HInvokeStatic node);
+ R visitInvokeSuper(HInvokeSuper node);
R visitLess(HLess node);
R visitLessEqual(HLessEqual node);
R visitLoad(HLoad node);
@@ -222,6 +223,7 @@ class HBaseVisitor extends HGraphVisitor implements HVisitor {
visitInvokeInterceptor(HInvokeInterceptor node)
=> visitInvokeStatic(node);
visitInvokeStatic(HInvokeStatic node) => visitInvoke(node);
+ visitInvokeSuper(HInvokeSuper node) => visitInvoke(node);
visitLess(HLess node) => visitRelational(node);
visitLessEqual(HLessEqual node) => visitRelational(node);
visitLoad(HLoad node) => visitInstruction(node);
@@ -1018,6 +1020,14 @@ class HInvokeStatic extends HInvoke {
bool hasExpectedType() => builtin;
}
+class HInvokeSuper extends HInvoke {
ngeoffray 2012/01/10 16:52:50 Should that be an HInvokeStatic instead?
karlklose 2012/01/11 12:45:17 Done.
+ HInvokeSuper(inputs) : super(inputs);
+ toString() => 'invoke super: ${element.name}';
+ accept(HVisitor visitor) => visitor.visitInvokeSuper(this);
+ Element get element() => target.element;
+ HStatic get target() => inputs[0];
+}
+
class HInvokeInterceptor extends HInvokeStatic {
final String name;
final bool getter;

Powered by Google App Engine
This is Rietveld 408576698