Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2615623002: Revert "Reduce use of Element in optimize.dart" (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(MethodElement method) { 796 native.NativeBehavior getNativeMethodBehavior(FunctionElement 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
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 isNativeClass(ClassElement element) { 3274 bool isNative(Element element) {
3275 return helpers.backend.isNative(element);
3276 }
3277
3278 @override
3279 bool isNativeMember(MemberElement element) {
3280 return helpers.backend.isNative(element); 3275 return helpers.backend.isNative(element);
3281 } 3276 }
3282 } 3277 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698