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

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

Issue 876653002: dart2js: move mapTypeToInterceptor generation to interceptor_stub_generator. and rename to typeToIn… (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 accb591c305f21ad15e399ce1fe5c608148d2cee..436af812e37f5844da5c5772ed5c6fa8d48abfc8 100644
--- a/sdk/lib/_internal/compiler/js_lib/interceptors.dart
+++ b/sdk/lib/_internal/compiler/js_lib/interceptors.dart
@@ -185,17 +185,17 @@ getNativeInterceptor(object) {
* that are user extensions of native classes where the type occurs as a
* constant in the program.
*
- * The compiler, in CustomElementsAnalysis, assumes that [mapTypeToInterceptor]
+ * The compiler, in CustomElementsAnalysis, assumes that [typeToInterceptorMap]
* is accessed only by code that also calls [findIndexForWebComponentType]. If
* this assumption is invalidated, the compiler will have to be updated.
*/
-get mapTypeToInterceptor {
- return JS_EMBEDDED_GLOBAL('', MAP_TYPE_TO_INTERCEPTOR);
+get typeToInterceptorMap {
+ return JS_EMBEDDED_GLOBAL('', TYPE_TO_INTERCEPTOR_MAP);
}
int findIndexForNativeSubclassType(Type type) {
- if (JS('bool', '# == null', mapTypeToInterceptor)) return null;
- List map = JS('JSFixedArray', '#', mapTypeToInterceptor);
+ if (JS('bool', '# == null', typeToInterceptorMap)) return null;
+ List map = JS('JSFixedArray', '#', typeToInterceptorMap);
for (int i = 0; i + 1 < map.length; i += 3) {
if (type == map[i]) {
return i;
@@ -207,7 +207,7 @@ int findIndexForNativeSubclassType(Type type) {
findInterceptorConstructorForType(Type type) {
var index = findIndexForNativeSubclassType(type);
if (index == null) return null;
- List map = JS('JSFixedArray', '#', mapTypeToInterceptor);
+ List map = JS('JSFixedArray', '#', typeToInterceptorMap);
return map[index + 1];
}
@@ -220,7 +220,7 @@ findInterceptorConstructorForType(Type type) {
findConstructorForNativeSubclassType(Type type, String name) {
var index = findIndexForNativeSubclassType(type);
if (index == null) return null;
- List map = JS('JSFixedArray', '#', mapTypeToInterceptor);
+ List map = JS('JSFixedArray', '#', typeToInterceptorMap);
var constructorMap = map[index + 2];
var constructorFn = JS('', '#[#]', constructorMap, name);
return constructorFn;

Powered by Google App Engine
This is Rietveld 408576698