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

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

Issue 2642063003: Use entities in class_stub_generator. (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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 845
846 bool isNativeOrExtendsNative(ClassElement element) { 846 bool isNativeOrExtendsNative(ClassElement element) {
847 if (element == null) return false; 847 if (element == null) return false;
848 if (isNative(element) || isJsInterop(element)) { 848 if (isNative(element) || isJsInterop(element)) {
849 return true; 849 return true;
850 } 850 }
851 assert(element.isResolved); 851 assert(element.isResolved);
852 return isNativeOrExtendsNative(element.superclass); 852 return isNativeOrExtendsNative(element.superclass);
853 } 853 }
854 854
855 bool isInterceptedMethod(Element element) { 855 bool isInterceptedMethod(MemberElement element) {
856 if (!element.isInstanceMember) return false; 856 if (!element.isInstanceMember) return false;
857 if (element.isGenerativeConstructorBody) { 857 if (element.isGenerativeConstructorBody) {
858 return isNativeOrExtendsNative(element.enclosingClass); 858 return isNativeOrExtendsNative(element.enclosingClass);
859 } 859 }
860 return interceptedElements[element.name] != null; 860 return interceptedElements[element.name] != null;
861 } 861 }
862 862
863 bool fieldHasInterceptedGetter(Element element) { 863 bool fieldHasInterceptedGetter(Element element) {
864 assert(element.isField); 864 assert(element.isField);
865 return interceptedElements[element.name] != null; 865 return interceptedElements[element.name] != null;
(...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3286 @override 3286 @override
3287 bool isNativeClass(ClassElement element) { 3287 bool isNativeClass(ClassElement element) {
3288 return helpers.backend.isNative(element); 3288 return helpers.backend.isNative(element);
3289 } 3289 }
3290 3290
3291 @override 3291 @override
3292 bool isNativeMember(MemberElement element) { 3292 bool isNativeMember(MemberElement element) {
3293 return helpers.backend.isNative(element); 3293 return helpers.backend.isNative(element);
3294 } 3294 }
3295 } 3295 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | pkg/compiler/lib/src/js_emitter/class_stub_generator.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698