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/compiler.dart

Issue 11365170: Start new design for interceptors and implement String.charCodeAt with it. (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
Index: sdk/lib/_internal/compiler/implementation/compiler.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/compiler.dart (revision 14732)
+++ sdk/lib/_internal/compiler/implementation/compiler.dart (working copy)
@@ -135,6 +135,14 @@
Element functionApplyMethod;
Element invokeOnMethod;
+ ClassElement jsStringClass;
ahe 2012/11/09 13:45:29 Backend specific?
ngeoffray 2012/11/13 11:45:16 Done.
+ ClassElement objectInterceptorClass;
ahe 2012/11/09 13:45:29 Ditto.
ngeoffray 2012/11/13 11:45:16 Done.
+ Element getInterceptorMethod;
ahe 2012/11/09 13:45:29 Ditto.
ngeoffray 2012/11/13 11:45:16 Done.
+
+ bool isForeignClass(Element element) {
ahe 2012/11/09 13:45:29 Ditto.
ngeoffray 2012/11/13 11:45:16 Done.
+ return element == jsStringClass;
+ }
+
Element get currentElement => _currentElement;
withCurrentElement(Element element, f()) {
Element old = currentElement;
@@ -443,6 +451,12 @@
jsInvocationMirrorClass.ensureResolved(this);
invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember(
const SourceString('invokeOn'));
+
+ jsStringClass = interceptorsLibrary.find(const SourceString('JSString'));
+ objectInterceptorClass =
+ interceptorsLibrary.find(const SourceString('ObjectInterceptor'));
+ getInterceptorMethod =
+ interceptorsLibrary.find(const SourceString('getInterceptor'));
}
void loadCoreImplLibrary() {

Powered by Google App Engine
This is Rietveld 408576698