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

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

Issue 15222002: Handle super calls in the backend type inferrer. (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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/language/super_inferrer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 22771)
+++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy)
@@ -1248,6 +1248,16 @@
}
static const int ARGUMENTS_OFFSET = 1;
bool canThrow() => true;
+
+ /**
+ * Returns whether this call is on an intercepted method.
+ */
+ bool get isInterceptedCall {
+ // We know it's a selector call if it follows the interceptor
+ // calling convention, which adds the actual receiver as a
+ // parameter to the call.
+ return inputs.length - 2 == selector.argumentCount;
+ }
}
abstract class HInvokeDynamic extends HInvoke {
@@ -1271,16 +1281,6 @@
}
/**
- * Returns whether this call is on an intercepted method.
- */
- bool get isInterceptedCall {
- // We know it's a selector call if it follows the interceptor
- // calling convention, which adds the actual receiver as a
- // parameter to the call.
- return inputs.length - 2 == selector.argumentCount;
- }
-
- /**
* Returns whether this call is on an interceptor object.
*/
bool isCallOnInterceptor(Compiler compiler) {
@@ -1375,8 +1375,13 @@
/** The class where the call to super is being done. */
final ClassElement caller;
final bool isSetter;
+ final Selector selector;
- HInvokeSuper(Element element, this.caller, inputs, {this.isSetter})
+ HInvokeSuper(Element element,
+ this.caller,
+ this.selector,
+ inputs,
+ {this.isSetter})
: super(element, inputs, HType.UNKNOWN);
toString() => 'invoke super: ${element.name}';
accept(HVisitor visitor) => visitor.visitInvokeSuper(this);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/language/super_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698