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

Unified Diff: pkg/compiler/lib/src/patch_parser.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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/parser/partial_elements.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/patch_parser.dart
diff --git a/pkg/compiler/lib/src/patch_parser.dart b/pkg/compiler/lib/src/patch_parser.dart
index a0ad4d9ac86df1a1e776aeab7a5e686453652e5d..b00e16a37cd10bddf789f9ec8a31e7e2b4b1d352 100644
--- a/pkg/compiler/lib/src/patch_parser.dart
+++ b/pkg/compiler/lib/src/patch_parser.dart
@@ -233,7 +233,9 @@ class PatchMemberListener extends MemberListener {
PatchMemberListener(Compiler compiler, ClassElement enclosingClass)
: this.compiler = compiler,
- super(compiler.reporter, enclosingClass);
+ super(compiler.parsing.getScannerOptionsFor(enclosingClass),
+ compiler.reporter,
+ enclosingClass);
@override
void addMember(Element patch) {
@@ -274,7 +276,8 @@ class PatchElementListener extends ElementListener implements Listener {
CompilationUnitElement patchElement,
int idGenerator())
: this.compiler = compiler,
- super(compiler.reporter, patchElement, idGenerator);
+ super(compiler.parsing.getScannerOptionsFor(patchElement),
+ compiler.reporter, patchElement, idGenerator);
@override
void pushElement(Element patch) {
@@ -445,8 +448,8 @@ class NativeAnnotationHandler implements EagerAnnotationHandler<String> {
if (element.isClass) {
String native = getNativeAnnotation(annotation);
if (native != null) {
- ClassElementX declaration = element.declaration;
- declaration.setNative(native);
+ JavaScriptBackend backend = compiler.backend;
+ backend.setNativeClassTagInfo(element, native);
return native;
}
}
@@ -478,7 +481,8 @@ class JsInteropAnnotationHandler implements EagerAnnotationHandler<bool> {
MetadataAnnotation annotation) {
bool hasJsInterop = hasJsNameAnnotation(annotation);
if (hasJsInterop) {
- element.markAsJsInterop();
+ JavaScriptBackend backend = compiler.backend;
+ backend.markAsJsInterop(element);
}
// Due to semantics of apply in the baseclass we have to return null to
// indicate that no match was found.
« no previous file with comments | « pkg/compiler/lib/src/parser/partial_elements.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698