| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library js_backend.backend; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| 10 | 10 |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 bool isJsInterop(Element element) => nativeData.isJsInterop(element); | 786 bool isJsInterop(Element element) => nativeData.isJsInterop(element); |
| 787 | 787 |
| 788 /// Whether [element] corresponds to a native JavaScript construct either | 788 /// Whether [element] corresponds to a native JavaScript construct either |
| 789 /// through the native mechanism (`@Native(...)` or the `native` pseudo | 789 /// through the native mechanism (`@Native(...)` or the `native` pseudo |
| 790 /// keyword) which is only allowed for internal libraries or via the typed | 790 /// keyword) which is only allowed for internal libraries or via the typed |
| 791 /// JavaScriptInterop mechanism which is allowed for user libraries. | 791 /// JavaScriptInterop mechanism which is allowed for user libraries. |
| 792 @override | 792 @override |
| 793 bool isNative(Entity element) => nativeData.isNative(element); | 793 bool isNative(Entity element) => nativeData.isNative(element); |
| 794 | 794 |
| 795 /// Returns the [NativeBehavior] for calling the native [method]. | 795 /// Returns the [NativeBehavior] for calling the native [method]. |
| 796 native.NativeBehavior getNativeMethodBehavior(FunctionElement method) { | 796 native.NativeBehavior getNativeMethodBehavior(MethodElement method) { |
| 797 return nativeData.getNativeMethodBehavior(method); | 797 return nativeData.getNativeMethodBehavior(method); |
| 798 } | 798 } |
| 799 | 799 |
| 800 /// Returns the [NativeBehavior] for reading from the native [field]. | 800 /// Returns the [NativeBehavior] for reading from the native [field]. |
| 801 native.NativeBehavior getNativeFieldLoadBehavior(FieldElement field) { | 801 native.NativeBehavior getNativeFieldLoadBehavior(FieldElement field) { |
| 802 return nativeData.getNativeFieldLoadBehavior(field); | 802 return nativeData.getNativeFieldLoadBehavior(field); |
| 803 } | 803 } |
| 804 | 804 |
| 805 /// Returns the [NativeBehavior] for writing to the native [field]. | 805 /// Returns the [NativeBehavior] for writing to the native [field]. |
| 806 native.NativeBehavior getNativeFieldStoreBehavior(FieldElement field) { | 806 native.NativeBehavior getNativeFieldStoreBehavior(FieldElement field) { |
| (...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3264 classElement == helpers.jsInterceptorClass || | 3264 classElement == helpers.jsInterceptorClass || |
| 3265 classElement == helpers.jsNullClass; | 3265 classElement == helpers.jsNullClass; |
| 3266 } | 3266 } |
| 3267 | 3267 |
| 3268 @override | 3268 @override |
| 3269 bool isInterceptorClass(ClassElement cls) { | 3269 bool isInterceptorClass(ClassElement cls) { |
| 3270 return helpers.backend.isInterceptorClass(cls); | 3270 return helpers.backend.isInterceptorClass(cls); |
| 3271 } | 3271 } |
| 3272 | 3272 |
| 3273 @override | 3273 @override |
| 3274 bool isNative(Element element) { | 3274 bool isNativeClass(ClassElement element) { |
| 3275 return helpers.backend.isNative(element); |
| 3276 } |
| 3277 |
| 3278 @override |
| 3279 bool isNativeMember(MemberElement element) { |
| 3275 return helpers.backend.isNative(element); | 3280 return helpers.backend.isNative(element); |
| 3276 } | 3281 } |
| 3277 } | 3282 } |
| OLD | NEW |