| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.transformations.mixin_full_resolution; | 4 library kernel.transformations.mixin_full_resolution; |
| 5 | 5 |
| 6 import '../ast.dart'; | 6 import '../ast.dart'; |
| 7 import '../class_hierarchy.dart'; | 7 import '../class_hierarchy.dart'; |
| 8 import '../clone.dart'; | 8 import '../clone.dart'; |
| 9 import '../core_types.dart'; | 9 import '../core_types.dart'; |
| 10 import '../target/targets.dart' show NoneTarget, Target; | 10 import '../target/targets.dart' show NoneTarget, Target; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return new DirectMethodInvocation( | 272 return new DirectMethodInvocation( |
| 273 new ThisExpression(), noSuchMethod, new Arguments([invocationPrime])) | 273 new ThisExpression(), noSuchMethod, new Arguments([invocationPrime])) |
| 274 ..fileOffset = node.fileOffset; | 274 ..fileOffset = node.fileOffset; |
| 275 } | 275 } |
| 276 } | 276 } |
| 277 | 277 |
| 278 /// Creates an "new _InvocationMirror(...)" invocation. | 278 /// Creates an "new _InvocationMirror(...)" invocation. |
| 279 ConstructorInvocation _createInvocation(String methodName, | 279 ConstructorInvocation _createInvocation(String methodName, |
| 280 Arguments callArguments, bool isSuperInvocation, Expression receiver) { | 280 Arguments callArguments, bool isSuperInvocation, Expression receiver) { |
| 281 if (_invocationMirrorConstructor == null) { | 281 if (_invocationMirrorConstructor == null) { |
| 282 Class clazz = coreTypes.getClass('dart:core', '_InvocationMirror'); | 282 Class clazz = coreTypes.invocationMirrorClass; |
| 283 _invocationMirrorConstructor = clazz.constructors[0]; | 283 _invocationMirrorConstructor = clazz.constructors[0]; |
| 284 } | 284 } |
| 285 | 285 |
| 286 return targetInfo.instantiateInvocation(_invocationMirrorConstructor, | 286 return targetInfo.instantiateInvocation(_invocationMirrorConstructor, |
| 287 receiver, methodName, callArguments, -1, isSuperInvocation); | 287 receiver, methodName, callArguments, -1, isSuperInvocation); |
| 288 } | 288 } |
| 289 | 289 |
| 290 /// Check that a call to the targetFunction is legal given the arguments. | 290 /// Check that a call to the targetFunction is legal given the arguments. |
| 291 /// | 291 /// |
| 292 /// I.e. check that the number of positional parameters and the names of the | 292 /// I.e. check that the number of positional parameters and the names of the |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 return null; | 332 return null; |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 | 335 |
| 336 throw new Exception( | 336 throw new Exception( |
| 337 'Could not find a generative constructor named "${constructor.name}" ' | 337 'Could not find a generative constructor named "${constructor.name}" ' |
| 338 'in lookup class "${lookupClass.name}"!'); | 338 'in lookup class "${lookupClass.name}"!'); |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 } | 341 } |
| OLD | NEW |