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

Side by Side Diff: pkg/compiler/lib/src/resolution/send_structure.dart

Issue 2809603002: Introduce ParameterStructure (Closed)
Patch Set: Fix. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.resolution.send_structure; 5 library dart2js.resolution.send_structure;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../elements/resolution_types.dart'; 9 import '../elements/resolution_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 node, 2109 node,
2110 semantics.element, 2110 semantics.element,
2111 semantics.type, 2111 semantics.type,
2112 node.send.argumentsNode, 2112 node.send.argumentsNode,
2113 callStructure, 2113 callStructure,
2114 arg); 2114 arg);
2115 } 2115 }
2116 ConstructorElement effectiveTarget = constructor.effectiveTarget; 2116 ConstructorElement effectiveTarget = constructor.effectiveTarget;
2117 ResolutionInterfaceType effectiveTargetType = 2117 ResolutionInterfaceType effectiveTargetType =
2118 constructor.computeEffectiveTargetType(semantics.type); 2118 constructor.computeEffectiveTargetType(semantics.type);
2119 if (callStructure.signatureApplies(effectiveTarget.type)) { 2119 if (callStructure
2120 .signatureApplies(effectiveTarget.parameterStructure)) {
2120 return visitor.visitRedirectingFactoryConstructorInvoke( 2121 return visitor.visitRedirectingFactoryConstructorInvoke(
2121 node, 2122 node,
2122 semantics.element, 2123 semantics.element,
2123 semantics.type, 2124 semantics.type,
2124 effectiveTarget, 2125 effectiveTarget,
2125 effectiveTargetType, 2126 effectiveTargetType,
2126 node.send.argumentsNode, 2127 node.send.argumentsNode,
2127 callStructure, 2128 callStructure,
2128 arg); 2129 arg);
2129 } else { 2130 } else {
2130 return visitor.visitUnresolvedRedirectingFactoryConstructorInvoke( 2131 return visitor.visitUnresolvedRedirectingFactoryConstructorInvoke(
2131 node, 2132 node,
2132 semantics.element, 2133 semantics.element,
2133 semantics.type, 2134 semantics.type,
2134 node.send.argumentsNode, 2135 node.send.argumentsNode,
2135 callStructure, 2136 callStructure,
2136 arg); 2137 arg);
2137 } 2138 }
2138 } 2139 }
2139 if (callStructure.signatureApplies(constructor.type)) { 2140 if (callStructure.signatureApplies(constructor.parameterStructure)) {
2140 return visitor.visitFactoryConstructorInvoke(node, constructor, 2141 return visitor.visitFactoryConstructorInvoke(node, constructor,
2141 semantics.type, node.send.argumentsNode, callStructure, arg); 2142 semantics.type, node.send.argumentsNode, callStructure, arg);
2142 } 2143 }
2143 return visitor.visitConstructorIncompatibleInvoke(node, constructor, 2144 return visitor.visitConstructorIncompatibleInvoke(node, constructor,
2144 semantics.type, node.send.argumentsNode, callStructure, arg); 2145 semantics.type, node.send.argumentsNode, callStructure, arg);
2145 case ConstructorAccessKind.ABSTRACT: 2146 case ConstructorAccessKind.ABSTRACT:
2146 return visitor.visitAbstractClassConstructorInvoke( 2147 return visitor.visitAbstractClassConstructorInvoke(
2147 node, 2148 node,
2148 semantics.element, 2149 semantics.element,
2149 semantics.type, 2150 semantics.type,
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 ThisConstructorInvokeStructure( 2515 ThisConstructorInvokeStructure(
2515 this.node, this.constructor, this.callStructure); 2516 this.node, this.constructor, this.callStructure);
2516 2517
2517 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { 2518 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) {
2518 return visitor.visitThisConstructorInvoke( 2519 return visitor.visitThisConstructorInvoke(
2519 node, constructor, node.argumentsNode, callStructure, arg); 2520 node, constructor, node.argumentsNode, callStructure, arg);
2520 } 2521 }
2521 2522
2522 bool get isConstructorInvoke => true; 2523 bool get isConstructorInvoke => true;
2523 } 2524 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698