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

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

Issue 236313012: Don't hide interceptors in mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 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
« no previous file with comments | « pkg/pkg.status ('k') | sdk/lib/_internal/compiler/implementation/js_backend/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0942a3ab39f713f6de3d14e9c6c1f65693b2c9ec..cb0912fa0f7e8192ab5c78865a32e52fba1b9cc6 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -558,6 +558,8 @@ class JavaScriptBackend extends Backend {
..add(jsNullClass);
validateInterceptorImplementsAllObjectMethods(jsInterceptorClass);
+ // The null-interceptor must also implement *all* methods.
+ validateInterceptorImplementsAllObjectMethods(jsNullClass);
typeVariableClass = compiler.findHelper('TypeVariable');
@@ -583,7 +585,7 @@ class JavaScriptBackend extends Backend {
Element interceptorMember = interceptorClass.lookupMember(member.name);
// Interceptors must override all Object methods due to calling convention
// differences.
- assert(interceptorMember.getEnclosingClass() != compiler.objectClass);
+ assert(interceptorMember.getEnclosingClass() == interceptorClass);
});
}
@@ -1110,7 +1112,8 @@ class JavaScriptBackend extends Backend {
assert(element.name == Compiler.NO_SUCH_METHOD);
ClassElement classElement = element.getEnclosingClass();
return classElement == compiler.objectClass
- || classElement == jsInterceptorClass;
+ || classElement == jsInterceptorClass
+ || classElement == jsNullClass;
}
bool isDefaultEqualityImplementation(Element element) {
@@ -1264,15 +1267,6 @@ class JavaScriptBackend extends Backend {
return element;
}
- Element getImplementationClass(Element element) {
- for (ClassElement dartClass in implementationClasses.keys) {
- if (element == dartClass) {
- return implementationClasses[dartClass];
- }
- }
- return element;
- }
-
/**
* Returns the checked mode helper that will be needed to do a type check/type
* cast on [type] at runtime. Note that this method is being called both by
« no previous file with comments | « pkg/pkg.status ('k') | sdk/lib/_internal/compiler/implementation/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698