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

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

Issue 12759006: Use inferred type in the SSA builder for super calls, and fix a bug with operator== in the type inf… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « no previous file | sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.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/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 20142)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -3150,7 +3150,10 @@
}
List<HInstruction> inputs = buildSuperAccessorInputs(element);
if (node.isPropertyAccess) {
- push(new HInvokeSuper(inputs));
+ HInstruction invokeSuper = new HInvokeSuper(inputs);
+ invokeSuper.instructionType =
+ new HType.inferredTypeForElement(element, compiler);
+ push(invokeSuper);
} else if (element.isFunction() || element.isGenerativeConstructor()) {
// TODO(5347): Try to avoid the need for calling [implementation] before
// calling [addStaticSendArgumentsToList].
@@ -3160,10 +3163,15 @@
if (!succeeded) {
generateWrongArgumentCountError(node, element, node.arguments);
} else {
- push(new HInvokeSuper(inputs));
+ HInstruction invokeSuper = new HInvokeSuper(inputs);
+ invokeSuper.instructionType =
+ new HType.inferredReturnTypeForElement(element, compiler);
+ push(invokeSuper);
}
} else {
HInstruction target = new HInvokeSuper(inputs);
+ target.instructionType =
kasperl 2013/03/18 08:47:50 Maybe compute the inferredType outside just before
ngeoffray 2013/03/18 08:52:21 They're different depending on which branch we're
+ new HType.inferredTypeForElement(element, compiler);
add(target);
inputs = <HInstruction>[target];
addDynamicSendArgumentsToList(node, inputs);
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698