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

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

Issue 23996002: Use interceptors to handle runtime types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 years, 3 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: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index e834e1ad84e7bdf703fdb28883b9ecb2873e3a0b..8c641b358eff6072d3f8ea24df3ef072cb3d607c 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -179,6 +179,12 @@ class JavaScriptBackend extends Backend {
ClassElement jsPlainJavaScriptObjectClass;
ClassElement jsUnknownJavaScriptObjectClass;
+ /// Class element for JsRuntimeType in interceptors.dart.
+ ClassElement jsRuntimeType;
+
+ /// Class element for JsFunctionType in interceptors.dart.
+ ClassElement jsFunctionType;
+
ClassElement jsIndexableClass;
ClassElement jsMutableIndexableClass;
@@ -513,6 +519,10 @@ class JavaScriptBackend extends Backend {
jsUnknownJavaScriptObjectClass =
compiler.findInterceptor(
const SourceString('UnknownJavaScriptObject')),
+ jsRuntimeType =
+ compiler.findInterceptor(const SourceString('JsRuntimeType')),
+ jsFunctionType =
+ compiler.findInterceptor(const SourceString('JsFunctionType')),
];
jsIndexableClass =
@@ -669,6 +679,10 @@ class JavaScriptBackend extends Backend {
}
}
+ // TODO(ahe): Find a better way to enable these interceptors.
+ addInterceptors(jsRuntimeType, enqueuer, elements);
+ addInterceptors(jsFunctionType, enqueuer, elements);
+
// Register any helper that will be needed by the backend.
if (enqueuer.isResolutionQueue) {
if (cls == compiler.intClass

Powered by Google App Engine
This is Rietveld 408576698