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

Side by Side Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2467493003: Compute NativeBehavior for native methods and fields. (Closed)
Patch Set: Updated cf. comments Created 4 years, 1 month 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698