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

Unified Diff: pkg/compiler/lib/src/js_emitter/native_emitter.dart

Issue 1172693003: Move computeType to TypedElement and TypeDeclarationElement. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index d6d39be98e7ce8172b5a1aeeb674d800b82cff8a..d819a28717bf22bf9970aa24674e5de2db219557 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -343,22 +343,7 @@ class NativeEmitter {
return statements;
}
- bool isSupertypeOfNativeClass(Element element) {
- if (element.isTypeVariable) {
- compiler.internalError(element, "Is check for type variable.");
- return false;
- }
- if (element.computeType(compiler).unalias(compiler) is FunctionType) {
- // The element type is a function type either directly or through
- // typedef(s).
- return false;
- }
-
- if (!element.isClass) {
- compiler.internalError(element, "Is check does not handle element.");
- return false;
- }
-
+ bool isSupertypeOfNativeClass(ClassElement element) {
if (backend.classesMixedIntoInterceptedClasses.contains(element)) {
return true;
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/js_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698