Chromium Code Reviews| 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..57237c0a9936711955e5cb38fbfeca26771f89b7 100644 |
| --- a/pkg/compiler/lib/src/native/resolver.dart |
| +++ b/pkg/compiler/lib/src/native/resolver.dart |
| @@ -26,20 +26,12 @@ 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 { |
|
Siggi Cherem (dart-lang)
2017/04/24 19:36:47
maybe this class shouldn't be here? move to builde
Johnni Winther
2017/04/25 07:52:51
Moved to frontend_strategy
|
| - 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); |
| @@ -47,46 +39,6 @@ abstract class AnnotationProcessor { |
| 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 { |