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

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

Issue 2070493003: Revert "Remove Registry from registerMetadataConstant" and "Serialize metadata" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 c4c9020931b664c97d09d99658e28d06800b3508..5bbb2f0655fc8a834b644ec6d30716ef4bed56be 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -131,6 +131,11 @@ abstract class Backend extends Target {
/// Called during codegen when [constant] has been used.
void registerCompileTimeConstant(ConstantValue constant, Registry registry) {}
+ /// Called during resolution when a constant value for [metadata] on
+ /// [annotatedElement] has been evaluated.
+ void registerMetadataConstant(MetadataAnnotation metadata,
+ Element annotatedElement, Registry registry) {}
+
/// Called to notify to the backend that a class is being instantiated.
// TODO(johnniwinther): Remove this. It's only called once for each [cls] and
// only with [Compiler.globalDependencies] as [registry].
@@ -273,25 +278,23 @@ abstract class Backend extends Target {
/// been scanned.
Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
// TODO(johnniwinther): Move this to [JavaScriptBackend].
- if (!compiler.serialization.isDeserialized(library)) {
- if (canLibraryUseNative(library)) {
- library.forEachLocalMember((Element element) {
- if (element.isClass) {
- checkNativeAnnotation(compiler, element);
- }
- });
- }
- checkJsInteropAnnotation(compiler, library);
+ if (canLibraryUseNative(library)) {
library.forEachLocalMember((Element element) {
- checkJsInteropAnnotation(compiler, element);
- if (element.isClass && isJsInterop(element)) {
- ClassElement classElement = element;
- classElement.forEachMember((_, memberElement) {
- checkJsInteropAnnotation(compiler, memberElement);
- });
+ if (element.isClass) {
+ checkNativeAnnotation(compiler, element);
}
});
}
+ 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