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

Unified Diff: pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart

Issue 2680823002: Extract InterceptorData from JavaScriptBackend. (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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: pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
index 77808a88773af3de319231ffdd7d2197dae3dadf..a7853e1a4496b3eab904dab569f5ae5fdba038f9 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -46,7 +46,7 @@ class InterceptorStubGenerator {
*/
jsAst.Statement buildInterceptorCheck(ClassEntity cls) {
jsAst.Expression condition;
- assert(backend.isInterceptorClass(cls));
+ assert(backend.interceptorData.isInterceptorClass(cls));
if (cls == helpers.jsBoolClass) {
condition = js('(typeof receiver) == "boolean"');
} else if (cls == helpers.jsIntClass ||
@@ -108,7 +108,7 @@ class InterceptorStubGenerator {
// unresolved PlainJavaScriptObject by testing for anyNativeClasses.
if (anyNativeClasses) {
- if (backend.isNativeOrExtendsNative(cls)) hasNative = true;
+ if (backend.nativeData.isNativeOrExtendsNative(cls)) hasNative = true;
}
}
}
@@ -117,7 +117,7 @@ class InterceptorStubGenerator {
}
if (hasInt) hasNumber = true;
- if (classes.containsAll(backend.interceptedClasses)) {
+ if (classes.containsAll(backend.interceptorData.interceptedClasses)) {
// I.e. this is the general interceptor.
hasNative = anyNativeClasses;
}
@@ -337,8 +337,9 @@ class InterceptorStubGenerator {
}
jsAst.Expression generateOneShotInterceptor(jsAst.Name name) {
- Selector selector = backend.oneShotInterceptors[name];
- Set<ClassEntity> classes = backend.getInterceptedClassesOn(selector.name);
+ Selector selector = backend.interceptorData.oneShotInterceptors[name];
+ Set<ClassEntity> classes =
+ backend.interceptorData.getInterceptedClassesOn(selector.name);
jsAst.Name getInterceptorName = namer.nameForGetInterceptor(classes);
List<String> parameterNames = <String>[];

Powered by Google App Engine
This is Rietveld 408576698