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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 14098009: Fix x.runtimeType for native classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index de43ed6a51b660f4c0164575d27f069e13e4a1d5..7b81580ca65e5f0e726cf772c4df848970776dbc 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -979,6 +979,7 @@ class JavaScriptBackend extends Backend {
Set<Element> set = interceptedElements.putIfAbsent(
member.name, () => new Set<Element>());
set.add(member);
+ if (classElement == jsInterceptorClass) return;
if (!classElement.isNative()) {
MixinApplicationElement mixinApplication = classElement;
assert(member.getEnclosingClass() == mixinApplication.mixin);
@@ -1368,6 +1369,11 @@ class JavaScriptBackend extends Backend {
return new native.NativeCodegenEnqueuer(world, compiler, emitter);
}
+ ClassElement defaultSuperclass(ClassElement element) {
+ // Native classes inherit from Interceptor.
+ return element.isNative() ? jsInterceptorClass : compiler.objectClass;
+ }
+
/**
* Unit test hook that returns code of an element as a String.
*
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/compiler.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698