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

Unified Diff: sdk/lib/_internal/compiler/js_lib/interceptors.dart

Issue 813873008: dart2js: Store mapTypeToInterceptor in embedded global. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/js_lib/interceptors.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/interceptors.dart b/sdk/lib/_internal/compiler/js_lib/interceptors.dart
index 22e2e91434e45e05f9bbf9ae663b06c1c719cfe0..da9e44ac95e7148e43b7212d9b6a4942b61f1382 100644
--- a/sdk/lib/_internal/compiler/js_lib/interceptors.dart
+++ b/sdk/lib/_internal/compiler/js_lib/interceptors.dart
@@ -5,7 +5,8 @@
library _interceptors;
import 'dart:_js_embedded_names' show
- DISPATCH_PROPERTY_NAME;
+ DISPATCH_PROPERTY_NAME,
+ MAP_TYPE_TO_INTERCEPTOR;
import 'dart:collection';
import 'dart:_internal' hide Symbol;
@@ -196,8 +197,9 @@ var interceptedNames;
* is accessed only by code that also calls [findIndexForWebComponentType]. If
* this assumption is invalidated, the compiler will have to be updated.
*/
-// TODO(sra): Mark this as initialized to a constant with unknown value.
-var mapTypeToInterceptor;
+dynamic get mapTypeToInterceptor {
ahe 2015/01/08 08:43:08 Why add "dynamic"? It is the default. It serves no
floitsch 2015/01/08 13:30:29 It also makes it clear to the reader that there is
+ return JS_EMBEDDED_GLOBAL('', MAP_TYPE_TO_INTERCEPTOR);
+}
int findIndexForNativeSubclassType(Type type) {
if (JS('bool', '# == null', mapTypeToInterceptor)) return null;

Powered by Google App Engine
This is Rietveld 408576698