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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2927093002: Support user class in compile_from_dill_test (Closed)
Patch Set: Updated cf. comments Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 5761fa8d43e478aea26211edbfbc450254207d33..622a9b106e459715c45bb942e905115fb65b3764 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -22,6 +22,7 @@ import '../elements/elements.dart';
import '../elements/entities.dart';
import '../elements/names.dart';
import '../elements/resolution_types.dart';
+import '../elements/types.dart';
import '../enqueue.dart'
show
DirectEnqueuerStrategy,
@@ -1007,8 +1008,10 @@ class JavaScriptBackend {
* Returns [:true:] if the checking of [type] is performed directly on the
* object and not on an interceptor.
*/
- bool hasDirectCheckFor(ResolutionDartType type) {
- Element element = type.element;
+ bool hasDirectCheckFor(DartType type) {
+ if (!type.isInterfaceType) return false;
+ InterfaceType interfaceType = type;
+ ClassEntity element = interfaceType.element;
return element == commonElements.stringClass ||
element == commonElements.boolClass ||
element == commonElements.numClass ||
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698