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

Unified Diff: pkg/compiler/lib/src/js_backend/interceptor_data.dart

Issue 2729943004: Remove backend reference from ResolutionEnqueuerListener. (Closed)
Patch Set: 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_backend/interceptor_data.dart
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index e09aaf7864fdc64ceba4ab097e3f20b65bba626f..3d2009f25fcb86fb3b9c1539f1f9998d72b5bbf8 100644
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
@@ -5,6 +5,7 @@
library js_backend.interceptor_data;
import '../common/names.dart' show Identifiers;
+import '../common/resolution.dart' show Resolution;
import '../common_elements.dart' show CommonElements;
import '../elements/elements.dart';
import '../elements/entities.dart';
@@ -216,6 +217,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder {
final NativeData _nativeData;
final BackendHelpers _helpers;
final CommonElements _commonElements;
+ final Resolution _resolution;
Siggi Cherem (dart-lang) 2017/03/14 03:35:17 any chance that we are guaranteed that cls argumen
Johnni Winther 2017/03/15 10:10:20 Still investigating. It will be gone soon!
/// The members of instantiated interceptor classes: maps a member name to the
/// list of members that have that name. This map is used by the codegen to
@@ -233,7 +235,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder {
new Set<ClassElement>();
InterceptorDataBuilderImpl(
- this._nativeData, this._helpers, this._commonElements);
+ this._nativeData, this._helpers, this._commonElements, this._resolution);
InterceptorData onResolutionComplete(ClosedWorld closedWorld) {
return new InterceptorDataImpl(
@@ -246,6 +248,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder {
}
void addInterceptorsForNativeClassMembers(ClassElement cls) {
+ cls.ensureResolved(_resolution);
cls.forEachMember((ClassElement classElement, Element member) {
if (member.name == Identifiers.call) {
return;
@@ -269,6 +272,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder {
void addInterceptors(ClassElement cls) {
if (_interceptedClasses.add(cls)) {
+ cls.ensureResolved(_resolution);
cls.forEachMember((ClassElement classElement, Element member) {
// All methods on [Object] are shadowed by [Interceptor].
if (classElement == _commonElements.objectClass) return;
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/resolution_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698