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

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

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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/native/enqueue.dart ('k') | pkg/compiler/lib/src/native/scanner.dart » ('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 994ff3729245ea67c30b1d22115727f01de71724..1a9a5f03a234ff99b9caadc1ee0597c51f73e921 100644
--- a/pkg/compiler/lib/src/native/native.dart
+++ b/pkg/compiler/lib/src/native/native.dart
@@ -56,8 +56,8 @@ part 'js.dart';
part 'scanner.dart';
part 'ssa.dart';
-void maybeEnableNative(Compiler compiler,
- LibraryElementX library) {
+bool maybeEnableNative(Compiler compiler,
+ LibraryElement library) {
String libraryName = library.canonicalUri.toString();
if (library.entryCompilationUnit.script.name.contains(
'sdk/tests/compiler/dart2js_native')
@@ -72,21 +72,7 @@ void maybeEnableNative(Compiler compiler,
|| libraryName == 'dart:web_gl'
|| libraryName == 'dart:web_sql'
|| compiler.allowNativeExtensions) {
- library.canUseNative = true;
+ return true;
}
+ return false;
}
-
-// The tags string contains comma-separated 'words' which are either dispatch
-// tags (having JavaScript identifier syntax) and directives that begin with
-// `!`.
-List<String> nativeTagsOfClassRaw(ClassElement cls) {
- String quotedName = cls.nativeTagInfo;
- return quotedName.substring(1, quotedName.length - 1).split(',');
-}
-
-List<String> nativeTagsOfClass(ClassElement cls) {
- return nativeTagsOfClassRaw(cls).where((s) => !s.startsWith('!')).toList();
-}
-
-bool nativeTagsForcedNonLeaf(ClassElement cls) =>
- nativeTagsOfClassRaw(cls).contains('!nonleaf');
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/native/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698