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

Unified Diff: pkg/compiler/lib/src/native/native.dart

Issue 2907383002: Don't tag fromEnvironment constructors as native (Closed)
Patch Set: Updated cf. comments Created 3 years, 7 months 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 | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/native.dart
diff --git a/pkg/compiler/lib/src/native/native.dart b/pkg/compiler/lib/src/native/native.dart
index cba55120ca83194b867f7d9710f3cb3b4695cb21..1d68d7a0bf9edd97a1899b89e8e125d809f0874b 100644
--- a/pkg/compiler/lib/src/native/native.dart
+++ b/pkg/compiler/lib/src/native/native.dart
@@ -4,9 +4,6 @@
library native;
-import '../compiler.dart' show Compiler;
-import '../elements/entities.dart';
-
export 'behavior.dart';
export 'enqueue.dart';
export 'js.dart';
@@ -27,21 +24,17 @@ const Iterable<String> _allowedDartSchemePaths = const <String>[
'web_sql'
];
-bool maybeEnableNative(Compiler compiler, LibraryEntity library) {
+bool maybeEnableNative(Uri uri, {bool allowNativeExtensions: false}) {
bool allowedTestLibrary() {
- Uri uri = library.canonicalUri;
String scriptName = uri.path;
return scriptName.contains('sdk/tests/compiler/dart2js_native') ||
scriptName.contains('sdk/tests/compiler/dart2js_extra');
}
bool allowedDartLibary() {
- Uri uri = library.canonicalUri;
if (uri.scheme != 'dart') return false;
return _allowedDartSchemePaths.contains(uri.path);
}
- return allowedTestLibrary() ||
- allowedDartLibary() ||
- compiler.options.allowNativeExtensions;
+ return allowedTestLibrary() || allowedDartLibary() || allowNativeExtensions;
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698