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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2824123003: Make backend.setAnnotations (mostly) handle LibraryEntities. (Closed)
Patch Set: . Created 3 years, 8 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/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 4b640d3963490fb01233035fa15c9a2ff6040a24..d165a6cfc5c8941fb04255c194c8763156a34511 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1091,16 +1091,13 @@ class JavaScriptBackend {
/// This method is called immediately after the [library] and its parts have
/// been loaded.
- void setAnnotations(LibraryElement library) {
+ void setAnnotations(LibraryEntity library) {
if (!compiler.serialization.isDeserialized(library)) {
+ AnnotationProcessor processor = new AnnotationProcessor(compiler);
if (canLibraryUseNative(library)) {
- library.forEachLocalMember((Element element) {
- if (element.isClass) {
- checkNativeAnnotation(compiler, element, nativeBasicDataBuilder);
- }
- });
+ processor.extractNativeAnnotations(library, nativeBasicDataBuilder);
}
- checkJsInteropClassAnnotations(compiler, library, nativeBasicDataBuilder);
+ processor.extractJsInteropAnnotations(library, nativeBasicDataBuilder);
}
Uri uri = library.canonicalUri;
if (uri == Uris.dart_html) {

Powered by Google App Engine
This is Rietveld 408576698