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

Unified Diff: pkg/compiler/lib/src/js_backend/custom_elements_analysis.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: Cleanup 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
Index: pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
index 8ddbb43069d68ebd7927f69c5604fbe4ac91bdc7..9efb7552e7d24c297c9bc22afccb89bb3d8da0f4 100644
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
@@ -68,12 +68,12 @@ class CustomElementsAnalysis {
void registerInstantiatedClass(ClassElement classElement, Enqueuer enqueuer) {
classElement.ensureResolved(compiler.resolution);
- if (!Elements.isNativeOrExtendsNative(classElement)) return;
+ if (!backend.isNativeOrExtendsNative(classElement)) return;
if (classElement.isMixinApplication) return;
if (classElement.isAbstract) return;
// JsInterop classes are opaque interfaces without a concrete
// implementation.
- if (classElement.isJsInterop) return;
+ if (backend.isJsInterop(classElement)) return;
joinFor(enqueuer).instantiatedClasses.add(classElement);
}
@@ -149,9 +149,9 @@ class CustomElementsAnalysisJoin {
if (!demanded) return;
var newActiveClasses = new Set<ClassElement>();
for (ClassElement classElement in instantiatedClasses) {
- bool isNative = classElement.isNative;
+ bool isNative = backend.isNative(classElement);
bool isExtension =
- !isNative && Elements.isNativeOrExtendsNative(classElement);
+ !isNative && backend.isNativeOrExtendsNative(classElement);
// Generate table entries for native classes that are explicitly named and
// extensions that fix our criteria.
if ((isNative && selectedClasses.contains(classElement)) ||
@@ -184,7 +184,7 @@ class CustomElementsAnalysisJoin {
// Only classes that extend native classes have constructors in the table.
// We could refine this to classes that extend Element, but that would break
// the tests and there is no sane reason to subclass other native classes.
- if (classElement.isNative) return result;
+ if (backend.isNative(classElement)) return result;
selectGenerativeConstructors(ClassElement enclosing, Element member) {
if (member.isGenerativeConstructor) {

Powered by Google App Engine
This is Rietveld 408576698