Chromium Code Reviews| Index: pkg/compiler/lib/src/js_backend/backend_usage.dart |
| diff --git a/pkg/compiler/lib/src/js_backend/backend_usage.dart b/pkg/compiler/lib/src/js_backend/backend_usage.dart |
| index 869833e43e4f3eea378c9840ba8ff1e6f34d853e..e0d7cc9a807c4e27a72103c2100c1a17b4a8df53 100644 |
| --- a/pkg/compiler/lib/src/js_backend/backend_usage.dart |
| +++ b/pkg/compiler/lib/src/js_backend/backend_usage.dart |
| @@ -8,7 +8,6 @@ import '../elements/elements.dart' show Element; |
| import '../elements/entities.dart'; |
| import '../elements/types.dart'; |
| import '../util/util.dart' show Setlet; |
| -import 'backend_helpers.dart'; |
| import 'backend_impact.dart'; |
| abstract class BackendUsage { |
| @@ -88,7 +87,6 @@ abstract class BackendUsageBuilder { |
| class BackendUsageBuilderImpl implements BackendUsageBuilder { |
| final CommonElements _commonElements; |
| - final BackendHelpers _helpers; |
| // TODO(johnniwinther): Remove the need for these. |
| Setlet<FunctionEntity> _globalFunctionDependencies; |
| Setlet<ClassEntity> _globalClassDependencies; |
| @@ -120,7 +118,7 @@ class BackendUsageBuilderImpl implements BackendUsageBuilder { |
| /// `true` if `noSuchMethod` is used. |
| bool isNoSuchMethodUsed = false; |
| - BackendUsageBuilderImpl(this._commonElements, this._helpers); |
| + BackendUsageBuilderImpl(this._commonElements); |
| @override |
| void registerBackendFunctionUse(FunctionEntity element) { |
| @@ -147,12 +145,13 @@ class BackendUsageBuilderImpl implements BackendUsageBuilder { |
| (element.library.isPlatformLibrary && |
| element.sourcePosition.uri.path |
| .contains('_internal/js_runtime/lib/')) || |
| - element.library == _helpers.jsHelperLibrary || |
| - element.library == _helpers.interceptorsLibrary || |
| - element.library == _helpers.isolateHelperLibrary) { |
| + element.library == _commonElements.jsHelperLibrary || |
| + element.library == _commonElements.interceptorsLibrary || |
| + element.library == _commonElements.isolateHelperLibrary) { |
| // TODO(johnniwinther): We should be more precise about these. |
| return true; |
| } else { |
| + print('mah source position path ${element.sourcePosition.uri.path}'); |
|
Johnni Winther
2017/04/11 09:16:00
Remove?
Emily Fortuna
2017/04/11 21:31:35
ooops, yes, thank you!
|
| return false; |
| } |
| } |
| @@ -162,25 +161,25 @@ class BackendUsageBuilderImpl implements BackendUsageBuilder { |
| bool _isValidEntity(Entity element) { |
| if (element is ConstructorEntity && |
| - (element == _helpers.streamIteratorConstructor || |
| + (element == _commonElements.streamIteratorConstructor || |
| _commonElements.isSymbolConstructor(element) || |
| - _helpers.isSymbolValidatedConstructor(element) || |
| - element == _helpers.syncCompleterConstructor)) { |
| + _commonElements.isSymbolValidatedConstructor(element) || |
| + element == _commonElements.syncCompleterConstructor)) { |
| // TODO(johnniwinther): These are valid but we could be more precise. |
| return true; |
| } else if (element == _commonElements.symbolClass || |
| - element == _helpers.objectNoSuchMethod) { |
| + element == _commonElements.objectNoSuchMethod) { |
| // TODO(johnniwinther): These are valid but we could be more precise. |
| return true; |
| } else if (element == _commonElements.listClass || |
| - element == _helpers.mapLiteralClass || |
| + element == _commonElements.mapLiteralClass || |
| element == _commonElements.functionClass || |
| element == _commonElements.stringClass) { |
| // TODO(johnniwinther): Avoid these. |
| return true; |
| - } else if (element == _helpers.genericNoSuchMethod || |
| - element == _helpers.unresolvedConstructorError || |
| - element == _helpers.malformedTypeError) { |
| + } else if (element == _commonElements.genericNoSuchMethod || |
| + element == _commonElements.unresolvedConstructorError || |
| + element == _commonElements.malformedTypeError) { |
| return true; |
| } |
| return false; |
| @@ -235,11 +234,11 @@ class BackendUsageBuilderImpl implements BackendUsageBuilder { |
| } |
| void registerUsedMember(MemberEntity member) { |
| - if (member == _helpers.getIsolateAffinityTagMarker) { |
| + if (member == _commonElements.getIsolateAffinityTagMarker) { |
| _needToInitializeIsolateAffinityTag = true; |
| - } else if (member == _helpers.requiresPreambleMarker) { |
| + } else if (member == _commonElements.requiresPreambleMarker) { |
| requiresPreamble = true; |
| - } else if (member == _helpers.invokeOnMethod) { |
| + } else if (member == _commonElements.invokeOnMethod) { |
| isInvokeOnUsed = true; |
| } else if (_commonElements.isFunctionApplyMethod(member)) { |
| isFunctionApplyUsed = true; |