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

Unified Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 2060183002: Serialize metadata (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 4 years, 6 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 | « no previous file | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/backend_api.dart
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index 69031154c8decfc5b4e17c7c01bfbaf2af0d0624..c4c9020931b664c97d09d99658e28d06800b3508 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -273,23 +273,25 @@ abstract class Backend extends Target {
/// been scanned.
Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
// TODO(johnniwinther): Move this to [JavaScriptBackend].
- if (canLibraryUseNative(library)) {
+ if (!compiler.serialization.isDeserialized(library)) {
+ if (canLibraryUseNative(library)) {
+ library.forEachLocalMember((Element element) {
+ if (element.isClass) {
+ checkNativeAnnotation(compiler, element);
+ }
+ });
+ }
+ checkJsInteropAnnotation(compiler, library);
library.forEachLocalMember((Element element) {
- if (element.isClass) {
- checkNativeAnnotation(compiler, element);
+ checkJsInteropAnnotation(compiler, element);
+ if (element.isClass && isJsInterop(element)) {
+ ClassElement classElement = element;
+ classElement.forEachMember((_, memberElement) {
+ checkJsInteropAnnotation(compiler, memberElement);
+ });
}
});
}
- checkJsInteropAnnotation(compiler, library);
- library.forEachLocalMember((Element element) {
- checkJsInteropAnnotation(compiler, element);
- if (element.isClass && isJsInterop(element)) {
- ClassElement classElement = element;
- classElement.forEachMember((_, memberElement) {
- checkJsInteropAnnotation(compiler, memberElement);
- });
- }
- });
return new Future.value();
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698