| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library rasta.custom_backend; | 5 library rasta.custom_backend; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future; | 8 Future; |
| 9 | 9 |
| 10 import 'package:compiler/src/common/backend_api.dart' show | 10 import 'package:compiler/src/common/backend_api.dart' show |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 @override bool enableDeferredLoadingIfSupported( | 119 @override bool enableDeferredLoadingIfSupported( |
| 120 Spannable node, Registry registry) => unimplemented; | 120 Spannable node, Registry registry) => unimplemented; |
| 121 | 121 |
| 122 @override Uri resolvePatchUri(String libraryName, Uri plaformConfigUri) { | 122 @override Uri resolvePatchUri(String libraryName, Uri plaformConfigUri) { |
| 123 return unimplemented; | 123 return unimplemented; |
| 124 } | 124 } |
| 125 | 125 |
| 126 @override MethodElement resolveExternalFunction(MethodElement element) { | 126 @override MethodElement resolveExternalFunction(MethodElement element) { |
| 127 return patchResolver.resolveExternalFunction(element); | 127 return patchResolver.resolveExternalFunction(element); |
| 128 } | 128 } |
| 129 |
| 130 @override bool canLibraryUseNative(LibraryElement library) { |
| 131 return library.isPlatformLibrary || isNativeTest(library); |
| 132 } |
| 133 |
| 134 /// Returns true if [library] is a test of native keyword. |
| 135 bool isNativeTest(LibraryElement library) { |
| 136 Uri uri = library.canonicalUri; |
| 137 return uri.scheme == "file" && |
| 138 uri.path.contains("/test/kernel/regression/native/"); |
| 139 } |
| 129 } | 140 } |
| OLD | NEW |