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

Unified Diff: pkg/compiler/lib/src/kernel/native_basic_data.dart

Issue 2995643002: Support jsinterop/world_test from .dill (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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/kernel/element_map_mixins.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/native_basic_data.dart
diff --git a/pkg/compiler/lib/src/kernel/native_basic_data.dart b/pkg/compiler/lib/src/kernel/native_basic_data.dart
index c8463018189df9fa5b95e24d66be6e2baf067ef3..ec07f7a6a79757de5cb44b6b06b76ff07d843d25 100644
--- a/pkg/compiler/lib/src/kernel/native_basic_data.dart
+++ b/pkg/compiler/lib/src/kernel/native_basic_data.dart
@@ -129,18 +129,33 @@ class KernelAnnotationProcessor implements AnnotationProcessor {
{'cls': cls.name, 'member': member.name});
}
- if (function is ConstructorEntity &&
- function.isFactoryConstructor &&
- isAnonymous) {
- if (function.parameterStructure.requiredParameters > 0) {
+ checkFunctionParameters(function);
+ });
+ elementEnvironment.forEachConstructor(cls,
+ (ConstructorEntity constructor) {
+ String memberName = getJsInteropName(
+ library, elementEnvironment.getMemberMetadata(constructor));
+ if (memberName != null) {
+ _nativeBasicDataBuilder.markAsJsInteropMember(
+ constructor, memberName);
+ }
+
+ if (!constructor.isExternal) {
+ reporter.reportErrorMessage(
+ constructor,
+ MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
+ {'cls': cls.name, 'member': constructor.name});
+ }
+ if (constructor.isFactoryConstructor && isAnonymous) {
+ if (constructor.parameterStructure.requiredParameters > 0) {
reporter.reportErrorMessage(
- function,
+ constructor,
MessageKind
.JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
{'cls': cls.name});
}
} else {
- checkFunctionParameters(function);
+ checkFunctionParameters(constructor);
}
});
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_mixins.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698