| Index: pkg/compiler/lib/src/native/resolver.dart
|
| diff --git a/pkg/compiler/lib/src/native/resolver.dart b/pkg/compiler/lib/src/native/resolver.dart
|
| index a90d780121fcf9d99ffd9facce05db88612d27d6..8c408a323416cf19b3d02f8fb46062c151edcb31 100644
|
| --- a/pkg/compiler/lib/src/native/resolver.dart
|
| +++ b/pkg/compiler/lib/src/native/resolver.dart
|
| @@ -26,67 +26,10 @@ import '../elements/modelx.dart' show FunctionElementX, MetadataAnnotationX;
|
| import '../elements/resolution_types.dart' show ResolutionDartType;
|
| import '../js_backend/js_backend.dart';
|
| import '../js_backend/native_data.dart';
|
| -import '../kernel/world_builder.dart' show KernelAnnotationProcessor;
|
| import '../patch_parser.dart';
|
| import '../tree/tree.dart';
|
| import 'behavior.dart';
|
|
|
| -/// Class that performs the mechanics to investigate annotations in the code.
|
| -abstract class AnnotationProcessor {
|
| - factory AnnotationProcessor(Compiler compiler) =>
|
| - compiler.options.loadFromDill
|
| - // TODO(johnniwinther): Pass the [KernelWorldBuilder] to
|
| - // [KernelAnnotationProcessor].
|
| - ? new KernelAnnotationProcessor(null)
|
| - : new _ElementAnnotationProcessor(compiler);
|
| -
|
| - void extractNativeAnnotations(
|
| - LibraryEntity library, NativeBasicDataBuilder nativeBasicDataBuilder);
|
| -
|
| - void extractJsInteropAnnotations(
|
| - LibraryEntity library, NativeBasicDataBuilder nativeBasicDataBuilder);
|
| -}
|
| -
|
| -/// Original logic for annotation processing, which involves in some cases
|
| -/// triggering pre-parsing and validation of the annotations.
|
| -class _ElementAnnotationProcessor implements AnnotationProcessor {
|
| - Compiler _compiler;
|
| -
|
| - _ElementAnnotationProcessor(this._compiler);
|
| -
|
| - /// Check whether [cls] has a `@Native(...)` annotation, and if so, set its
|
| - /// native name from the annotation.
|
| - void extractNativeAnnotations(
|
| - LibraryElement library, NativeBasicDataBuilder nativeBasicDataBuilder) {
|
| - library.forEachLocalMember((Element element) {
|
| - if (element.isClass) {
|
| - EagerAnnotationHandler.checkAnnotation(_compiler, element,
|
| - new NativeAnnotationHandler(nativeBasicDataBuilder));
|
| - }
|
| - });
|
| - }
|
| -
|
| - void extractJsInteropAnnotations(
|
| - LibraryElement library, NativeBasicDataBuilder nativeBasicDataBuilder) {
|
| - bool checkJsInteropAnnotation(Element element) {
|
| - return EagerAnnotationHandler.checkAnnotation(
|
| - _compiler, element, const JsInteropAnnotationHandler());
|
| - }
|
| -
|
| - if (checkJsInteropAnnotation(library)) {
|
| - nativeBasicDataBuilder.markAsJsInteropLibrary(library);
|
| - }
|
| - library.forEachLocalMember((Element element) {
|
| - if (element.isClass) {
|
| - ClassElement cls = element;
|
| - if (checkJsInteropAnnotation(element)) {
|
| - nativeBasicDataBuilder.markAsJsInteropClass(cls);
|
| - }
|
| - }
|
| - });
|
| - }
|
| -}
|
| -
|
| /// Interface for computing native members and [NativeBehavior]s in member code
|
| /// based on the AST.
|
| abstract class NativeDataResolver {
|
| @@ -320,14 +263,6 @@ class NativeDataResolverImpl implements NativeDataResolver {
|
| }
|
| }
|
|
|
| -/// Check whether [cls] has a `@Native(...)` annotation, and if so, set its
|
| -/// native name from the annotation.
|
| -checkNativeAnnotation(Compiler compiler, ClassElement cls,
|
| - NativeBasicDataBuilder nativeBasicDataBuilder) {
|
| - EagerAnnotationHandler.checkAnnotation(
|
| - compiler, cls, new NativeAnnotationHandler(nativeBasicDataBuilder));
|
| -}
|
| -
|
| /// Annotation handler for pre-resolution detection of `@Native(...)`
|
| /// annotations.
|
| class NativeAnnotationHandler extends EagerAnnotationHandler<String> {
|
|
|