| 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 | 4 |
| 5 library dart2js.kernel.impact_test; | 5 library dart2js.kernel.impact_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 9 import 'package:compiler/src/commandline_options.dart'; | 9 import 'package:compiler/src/commandline_options.dart'; |
| 10 import 'package:compiler/src/common.dart'; | 10 import 'package:compiler/src/common.dart'; |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 }); | 617 }); |
| 618 } else if (element.isTypedef) { | 618 } else if (element.isTypedef) { |
| 619 // Skip typedefs. | 619 // Skip typedefs. |
| 620 } else { | 620 } else { |
| 621 checkElement(compiler, element); | 621 checkElement(compiler, element); |
| 622 } | 622 } |
| 623 }); | 623 }); |
| 624 } | 624 } |
| 625 | 625 |
| 626 void checkElement(Compiler compiler, AstElement element) { | 626 void checkElement(Compiler compiler, AstElement element) { |
| 627 if (compiler.backend.isNative(element)) { | |
| 628 // Skip native functions for now; kernel does not provide their | |
| 629 // signature which we need to derive their native behavior. | |
| 630 return; | |
| 631 } | |
| 632 if (element.isConstructor) { | 627 if (element.isConstructor) { |
| 633 ConstructorElement constructor = element; | 628 ConstructorElement constructor = element; |
| 634 if (constructor.isRedirectingFactory) { | 629 if (constructor.isRedirectingFactory) { |
| 635 // Skip redirecting constructors for now; they might not be supported. | 630 // Skip redirecting constructors for now; they might not be supported. |
| 636 return; | 631 return; |
| 637 } | 632 } |
| 638 } | 633 } |
| 639 ResolutionImpact astImpact = compiler.resolution.getResolutionImpact(element); | 634 ResolutionImpact astImpact = compiler.resolution.getResolutionImpact(element); |
| 640 astImpact = laxImpact(compiler, element, astImpact); | 635 astImpact = laxImpact(compiler, element, astImpact); |
| 641 ResolutionImpact kernelImpact = build(compiler, element.resolvedAst); | 636 ResolutionImpact kernelImpact = build(compiler, element.resolvedAst); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 @override | 723 @override |
| 729 DartType visitFunctionType(FunctionType type, _) { | 724 DartType visitFunctionType(FunctionType type, _) { |
| 730 return new FunctionType.synthesized( | 725 return new FunctionType.synthesized( |
| 731 visit(type.returnType), | 726 visit(type.returnType), |
| 732 visitList(type.parameterTypes), | 727 visitList(type.parameterTypes), |
| 733 visitList(type.optionalParameterTypes), | 728 visitList(type.optionalParameterTypes), |
| 734 type.namedParameters, | 729 type.namedParameters, |
| 735 visitList(type.namedParameterTypes)); | 730 visitList(type.namedParameterTypes)); |
| 736 } | 731 } |
| 737 } | 732 } |
| OLD | NEW |