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

Unified Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2455073003: Compute NativeBehavior for foreign functions. (Closed)
Patch Set: Updated cf. comment. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/js_spec_string_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 8f4cc14eb592ab1f41b96cd2130892b0eb7026c8..f75ccfb6eb1de8ab1a22f484aefd135448f600aa 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -602,7 +602,9 @@ main(List<String> args) {
]);
compiler.resolution.retainCachesForTesting = true;
await compiler.run(entryPoint);
- checkLibrary(compiler, compiler.mainApp);
+ compiler.libraryLoader.libraries.forEach((LibraryElement library) {
+ checkLibrary(compiler, library);
+ });
});
}
@@ -622,6 +624,18 @@ void checkLibrary(Compiler compiler, LibraryElement library) {
}
void checkElement(Compiler compiler, AstElement element) {
+ if (compiler.backend.isNative(element)) {
+ // Skip native functions for now; kernel does not provide their
+ // signature which we need to derive their native behavior.
+ return;
+ }
+ if (element.isConstructor) {
+ ConstructorElement constructor = element;
+ if (constructor.isRedirectingFactory) {
+ // Skip redirecting constructors for now; they might not be supported.
+ return;
+ }
+ }
ResolutionImpact astImpact = compiler.resolution.getResolutionImpact(element);
astImpact = laxImpact(compiler, element, astImpact);
ResolutionImpact kernelImpact = build(compiler, element.resolvedAst);
« no previous file with comments | « tests/compiler/dart2js/js_spec_string_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698