| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 elements; | 5 library elements; |
| 6 | 6 |
| 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' | 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' |
| 8 show AsyncModifier; | 8 show AsyncModifier; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 T internalCompileArgument(Node node) { | 920 T internalCompileArgument(Node node) { |
| 921 return compileArgument(mapping[node]); | 921 return compileArgument(mapping[node]); |
| 922 } | 922 } |
| 923 | 923 |
| 924 Link<Node> nodes = computeCallNodesFromParameters(); | 924 Link<Node> nodes = computeCallNodesFromParameters(); |
| 925 | 925 |
| 926 // Synthesize a structure for the call. | 926 // Synthesize a structure for the call. |
| 927 // TODO(ngeoffray): Should the resolver do it instead? | 927 // TODO(ngeoffray): Should the resolver do it instead? |
| 928 CallStructure callStructure = new CallStructure( | 928 CallStructure callStructure = new CallStructure( |
| 929 signature.parameterCount, signature.type.namedParameters); | 929 signature.parameterCount, signature.type.namedParameters); |
| 930 if (!callStructure.signatureApplies(signature.type)) { | 930 if (!callStructure.signatureApplies(signature.parameterStructure)) { |
| 931 return false; | 931 return false; |
| 932 } | 932 } |
| 933 list.addAll(makeArgumentsList<T>(callStructure, nodes, callee, | 933 list.addAll(makeArgumentsList<T>(callStructure, nodes, callee, |
| 934 internalCompileArgument, compileConstant)); | 934 internalCompileArgument, compileConstant)); |
| 935 | 935 |
| 936 return true; | 936 return true; |
| 937 } | 937 } |
| 938 } | 938 } |
| 939 | 939 |
| 940 /// An element representing an erroneous resolution. | 940 /// An element representing an erroneous resolution. |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 int get parameterCount; | 1281 int get parameterCount; |
| 1282 List<FormalElement> get orderedOptionalParameters; | 1282 List<FormalElement> get orderedOptionalParameters; |
| 1283 | 1283 |
| 1284 void forEachParameter(void function(FormalElement parameter)); | 1284 void forEachParameter(void function(FormalElement parameter)); |
| 1285 void forEachRequiredParameter(void function(FormalElement parameter)); | 1285 void forEachRequiredParameter(void function(FormalElement parameter)); |
| 1286 void forEachOptionalParameter(void function(FormalElement parameter)); | 1286 void forEachOptionalParameter(void function(FormalElement parameter)); |
| 1287 | 1287 |
| 1288 void orderedForEachParameter(void function(FormalElement parameter)); | 1288 void orderedForEachParameter(void function(FormalElement parameter)); |
| 1289 | 1289 |
| 1290 bool isCompatibleWith(FunctionSignature constructorSignature); | 1290 bool isCompatibleWith(FunctionSignature constructorSignature); |
| 1291 |
| 1292 ParameterStructure get parameterStructure; |
| 1291 } | 1293 } |
| 1292 | 1294 |
| 1293 /// A top level, static or instance method, constructor, local function, or | 1295 /// A top level, static or instance method, constructor, local function, or |
| 1294 /// closure (anonymous local function). | 1296 /// closure (anonymous local function). |
| 1295 abstract class FunctionElement extends Element | 1297 abstract class FunctionElement extends Element |
| 1296 implements | 1298 implements |
| 1297 AstElement, | 1299 AstElement, |
| 1298 TypedElement, | 1300 TypedElement, |
| 1299 FunctionTypedElement, | 1301 FunctionTypedElement, |
| 1300 ExecutableElement, | 1302 ExecutableElement, |
| 1301 GenericElement { | 1303 GenericElement { |
| 1302 FunctionExpression get node; | 1304 FunctionExpression get node; |
| 1303 | 1305 |
| 1304 FunctionElement get patch; | 1306 FunctionElement get patch; |
| 1305 FunctionElement get origin; | 1307 FunctionElement get origin; |
| 1306 | 1308 |
| 1307 bool get hasFunctionSignature; | 1309 bool get hasFunctionSignature; |
| 1308 | 1310 |
| 1309 /// The parameters of this function. | 1311 /// The parameters of this function. |
| 1310 List<ParameterElement> get parameters; | 1312 List<ParameterElement> get parameters; |
| 1311 | 1313 |
| 1312 /// The type of this function. | 1314 /// The type of this function. |
| 1313 ResolutionFunctionType get type; | 1315 ResolutionFunctionType get type; |
| 1314 | 1316 |
| 1315 /// The synchronous/asynchronous marker on this function. | 1317 /// The synchronous/asynchronous marker on this function. |
| 1316 AsyncMarker get asyncMarker; | 1318 AsyncMarker get asyncMarker; |
| 1317 | 1319 |
| 1318 /// `true` if this function is external. | 1320 /// `true` if this function is external. |
| 1319 bool get isExternal; | 1321 bool get isExternal; |
| 1322 |
| 1323 /// The structure of the function parameters. |
| 1324 ParameterStructure get parameterStructure; |
| 1320 } | 1325 } |
| 1321 | 1326 |
| 1322 /// A getter or setter. | 1327 /// A getter or setter. |
| 1323 abstract class AccessorElement extends MethodElement { | 1328 abstract class AccessorElement extends MethodElement { |
| 1324 /// Used to retrieve a link to the abstract field element representing this | 1329 /// Used to retrieve a link to the abstract field element representing this |
| 1325 /// element. | 1330 /// element. |
| 1326 AbstractFieldElement get abstractField; | 1331 AbstractFieldElement get abstractField; |
| 1327 } | 1332 } |
| 1328 | 1333 |
| 1329 /// A getter. | 1334 /// A getter. |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 /// by a field. | 2033 /// by a field. |
| 2029 bool get isDeclaredByField; | 2034 bool get isDeclaredByField; |
| 2030 | 2035 |
| 2031 /// Returns `true` if this member is abstract. | 2036 /// Returns `true` if this member is abstract. |
| 2032 bool get isAbstract; | 2037 bool get isAbstract; |
| 2033 | 2038 |
| 2034 /// If abstract, [implementation] points to the overridden concrete member, | 2039 /// If abstract, [implementation] points to the overridden concrete member, |
| 2035 /// if any. Otherwise [implementation] points to the member itself. | 2040 /// if any. Otherwise [implementation] points to the member itself. |
| 2036 Member get implementation; | 2041 Member get implementation; |
| 2037 } | 2042 } |
| OLD | NEW |