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

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

Issue 2721403006: Split NativeData (Closed)
Patch Set: Created 3 years, 10 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_backend/impact_transformer.dart
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index 5a81d8497edad717d2c4c905a850af091cb0ecaa..128a78cdb17fceebeac6eb315b152066ce01e36e 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -304,7 +304,8 @@ class JavaScriptImpactTransformer extends ImpactTransformer {
if (type is ResolutionFunctionType) {
registerImpact(impacts.functionTypeCheck);
}
- if (type.element != null && backend.isNative(type.element)) {
+ if (type is ResolutionInterfaceType &&
+ backend.nativeData.isNativeClass(type.element)) {
registerImpact(impacts.nativeTypeCheck);
}
}
@@ -340,7 +341,8 @@ class JavaScriptImpactTransformer extends ImpactTransformer {
if (!type.treatAsRaw || type.containsTypeVariables) {
impacts.genericIsCheck.registerImpact(transformed, elementEnvironment);
}
- if (type.element != null && backend.isNative(type.element)) {
+ if (type is ResolutionInterfaceType &&
+ backend.nativeData.isNativeClass(type.element)) {
// We will neeed to add the "$is" and "$as" properties on the
// JavaScript object prototype, so we make sure
// [:defineProperty:] is compiled.

Powered by Google App Engine
This is Rietveld 408576698