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

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

Issue 2727253007: Add NativeClassData/NativeClassDataBuilder (Closed)
Patch Set: Created 3 years, 10 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/js_backend/resolution_listener.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/enqueue.dart
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index f6a5708edf0c25752df02b6f119c7424872bd867..c41e7929aff75b52c6f55239b4e621b88a9fc81a 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -117,7 +117,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
library.implementation.forEachLocalMember((Element element) {
if (element.isClass) {
ClassElement cls = element;
- if (backend.nativeData.isNativeClass(cls)) {
+ if (backend.nativeClassData.isNativeClass(cls)) {
processNativeClass(element);
}
}
@@ -158,7 +158,8 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
// fact a subclass of a native class.
ClassElement nativeSuperclassOf(ClassElement classElement) {
- if (backend.nativeData.isNativeClass(classElement)) return classElement;
+ if (backend.nativeClassData.isNativeClass(classElement))
+ return classElement;
if (classElement.superclass == null) return null;
return nativeSuperclassOf(classElement.superclass);
}
@@ -304,7 +305,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
return;
}
if (element.isInstanceMember &&
- backend.nativeData.isNativeClass(element.enclosingClass)) {
+ backend.nativeClassData.isNativeClass(element.enclosingClass)) {
// Exclude non-instance (static) fields - they are not really native and
// are compiled as isolate globals. Access of a property of a constructor
// function or a non-method property in the prototype chain, must be coded
@@ -331,7 +332,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
void _setNativeName(MemberElement element) {
String name = findJsNameFromAnnotation(element);
if (name == null) name = element.name;
- backend.nativeDataBuilder.setNativeMemberName(element, name);
+ backend.nativeClassDataBuilder.setNativeMemberName(element, name);
}
/// Sets the native name of the static native method [element], using the
@@ -346,7 +347,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
String name = findJsNameFromAnnotation(element);
if (name == null) name = element.name;
if (isIdentifier(name)) {
- List<String> nativeNames = backend.nativeDataBuilder
+ List<String> nativeNames = backend.nativeClassDataBuilder
.getNativeTagsOfClassRaw(element.enclosingClass);
if (nativeNames.length != 1) {
reporter.internalError(
@@ -354,10 +355,10 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
'Unable to determine a native name for the enclosing class, '
'options: $nativeNames');
}
- backend.nativeDataBuilder
+ backend.nativeClassDataBuilder
.setNativeMemberName(element, '${nativeNames[0]}.$name');
} else {
- backend.nativeDataBuilder.setNativeMemberName(element, name);
+ backend.nativeClassDataBuilder.setNativeMemberName(element, name);
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/resolution_listener.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698