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

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

Issue 11358217: Add a getter interceptor to the new interceptor scheme. Also cleanup the "this" that turns into a r… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « no previous file | sdk/lib/_internal/compiler/implementation/lib/interceptors.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
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (revision 14875)
+++ sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (working copy)
@@ -711,6 +711,7 @@
}
bool isInterceptorClass(Element element) {
+ if (element == null) return false;
return element == jsStringClass;
}
@@ -727,17 +728,21 @@
return false;
}
+ void initializeInterceptorElements() {
+ objectInterceptorClass =
+ compiler.findInterceptor(const SourceString('ObjectInterceptor'));
+ getInterceptorMethod =
+ compiler.findInterceptor(const SourceString('getInterceptor'));
+ }
+
void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {
ClassElement result = null;
if (cls == compiler.stringClass) {
if (jsStringClass == null) {
jsStringClass =
compiler.findInterceptor(const SourceString('JSString'));
- objectInterceptorClass =
- compiler.findInterceptor(const SourceString('ObjectInterceptor'));
- getInterceptorMethod =
- compiler.findInterceptor(const SourceString('getInterceptor'));
+ initializeInterceptorElements();
}
result = jsStringClass;
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/interceptors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698