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

Unified Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart

Issue 2871583002: Pass InterceptorData through ResolutionWorldBuilder and access it through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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/lazy_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
index 3dd786f4446565dec612c34a4b0f200e1479af06..be05e164d98b734fc6aabce9da1e3cab52b32ab6 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
@@ -28,6 +28,7 @@ import '../../elements/elements.dart' show ClassElement, MethodElement;
import '../../js/js.dart' as js;
import '../../js_backend/js_backend.dart'
show JavaScriptBackend, Namer, ConstantEmitter;
+import '../../js_backend/interceptor_data.dart';
import '../constant_ordering.dart' show deepCompareConstants;
import '../js_emitter.dart' show NativeEmitter;
import '../js_emitter.dart' show NativeGenerator, buildTearOffCode;
@@ -56,6 +57,10 @@ class ModelEmitter {
compiler, namer, this.generateConstantReference, constantListGenerator);
}
+ InterceptorData get _interceptorData =>
+ // TODO(johnniwinther): Pass [InterceptorData] directly?
+ nativeEmitter.interceptorData;
+
js.Expression constantListGenerator(js.Expression array) {
// TODO(floitsch): remove hard-coded name.
return js.js('makeConstList(#)', [array]);
@@ -867,8 +872,7 @@ function parseFunctionDescriptor(proto, name, descriptor, typesOffset) {
if (method.needsTearOff) {
MethodElement element = method.element;
- bool isIntercepted =
- backend.interceptorData.isInterceptedMethod(element);
+ bool isIntercepted = _interceptorData.isInterceptedMethod(element);
data.add(new js.LiteralBool(isIntercepted));
data.add(js.quoteName(method.tearOffName));
data.add((method.functionType));
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart ('k') | pkg/compiler/lib/src/js_emitter/native_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698