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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart

Issue 49813002: Infer types for parameters even in the presence of InvocationMirror.delegate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart (revision 29416)
+++ sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart (working copy)
@@ -781,21 +781,23 @@
T visitSuperSend(Send node) {
Element element = elements[node];
- if (Elements.isUnresolved(element)) {
- return types.dynamicType;
- }
Selector selector = elements.getSelector(node);
// TODO(ngeoffray): We could do better here if we knew what we
// are calling does not expose this.
isThisExposed = true;
- if (node.isPropertyAccess) {
- return handleStaticSend(node, selector, element, null);
- } else if (element.isFunction() || element.isGenerativeConstructor()) {
- if (!selector.applies(element, compiler)) return types.dynamicType;
- ArgumentsTypes arguments = analyzeArguments(node.arguments);
+ ArgumentsTypes arguments = node.isPropertyAccess
+ ? null
+ : analyzeArguments(node.arguments);
+ if (Elements.isUnresolved(element)
+ || !selector.applies(element, compiler)) {
+ // Ensure we create a node, to make explicit the call to the
+ // `noSuchMethod` handler.
+ return handleDynamicSend(node, selector, superType, arguments);
+ } else if (node.isPropertyAccess
+ || element.isFunction()
+ || element.isGenerativeConstructor()) {
return handleStaticSend(node, selector, element, arguments);
} else {
- ArgumentsTypes arguments = analyzeArguments(node.arguments);
return inferrer.registerCalledClosure(
node, selector, inferrer.typeOfElement(element),
outermostElement, arguments, sideEffects, inLoop);
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698