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

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

Issue 2349163003: Move towards using WorldImpact for codegen (Closed)
Patch Set: Cleanup. Created 4 years, 3 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/backend_impact.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index 9a9a0d1a429d4c6531ad465377e25b654f23735d..8edd85d1be5ee50125fc536f97a8c377eb06665a 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -19,7 +19,7 @@ class BackendImpact {
final List<ClassElement> instantiatedClasses;
final List<BackendImpact> otherImpacts;
- BackendImpact(
+ const BackendImpact(
{this.staticUses: const <Element>[],
this.instantiatedTypes: const <InterfaceType>[],
this.instantiatedClasses: const <ClassElement>[],
@@ -603,4 +603,19 @@ class BackendImpacts {
}
return _closure;
}
+
+ BackendImpact _interceptorUse;
+
+ BackendImpact get interceptorUse {
Harry Terkelsen 2016/09/19 21:17:52 consider doing: _interceptorUse ??= ... instead
+ if (_interceptorUse == null) {
+ _interceptorUse = new BackendImpact(staticUses: [
+ helpers.getNativeInterceptorMethod
+ ], instantiatedClasses: [
+ helpers.jsJavaScriptObjectClass,
+ helpers.jsPlainJavaScriptObjectClass,
+ helpers.jsJavaScriptFunctionClass
+ ]);
+ }
+ return _interceptorUse;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698