| Index: sdk/lib/_internal/compiler/implementation/compiler.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| index f01e964e510c102b25e6a3608f369ab65fb95766..97393bc1631083f89555bf3888acc5d048c7e99d 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| @@ -389,6 +389,13 @@ abstract class Backend {
|
| return compiler.patchParser.patchLibrary(loader, patchUri, library);
|
| }
|
| }
|
| + if (library.canUseNative) {
|
| + library.forEachLocalMember((Element element) {
|
| + if (element.isClass) {
|
| + checkNativeAnnotation(compiler, element);
|
| + }
|
| + });
|
| + }
|
| return new Future.value();
|
| }
|
|
|
| @@ -722,6 +729,9 @@ abstract class Compiler implements DiagnosticListener {
|
| /// The constant for the [patch] variable defined in dart:_js_helper.
|
| Constant patchConstant;
|
|
|
| + // TODO(johnniwinther): Move this to the JavaScriptBackend.
|
| + ClassElement nativeAnnotationClass;
|
| +
|
| // Initialized after symbolClass has been resolved.
|
| FunctionElement symbolConstructor;
|
|
|
| @@ -1118,6 +1128,8 @@ abstract class Compiler implements DiagnosticListener {
|
| deferredLibraryClass = findRequiredElement(library, 'DeferredLibrary');
|
| } else if (uri == DART_NATIVE_TYPED_DATA) {
|
| typedDataClass = findRequiredElement(library, 'NativeTypedData');
|
| + } else if (uri == js_backend.JavaScriptBackend.DART_JS_HELPER) {
|
| + nativeAnnotationClass = findRequiredElement(library, 'Native');
|
| }
|
| return backend.onLibraryScanned(library, loader);
|
| }
|
|
|