Chromium Code Reviews| 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; |
| + } |
| } |