| Index: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
|
| index 2c8ba44958ccc2a8f73df3d31a5b310d4d0003d8..a0ce8a667ba03e5720d586fbf10a706dc5b5ab2b 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
|
| @@ -32,7 +32,6 @@ import '../../elements/elements.dart'
|
| import '../../elements/entities.dart';
|
| import '../../elements/types.dart' show DartType;
|
| import '../../js/js.dart' as js;
|
| -import '../../js_backend/backend_helpers.dart' show BackendHelpers;
|
| import '../../js_backend/js_backend.dart'
|
| show Namer, JavaScriptBackend, JavaScriptConstantCompiler, StringBackedName;
|
| import '../../universe/selector.dart' show Selector;
|
| @@ -86,7 +85,6 @@ class ProgramBuilder {
|
| this._registry = new Registry(compiler);
|
|
|
| JavaScriptBackend get backend => _compiler.backend;
|
| - BackendHelpers get helpers => backend.helpers;
|
| CodegenWorldBuilder get worldBuilder => _compiler.codegenWorldBuilder;
|
|
|
| /// Mapping from [ClassElement] to constructed [Class]. We need this to
|
| @@ -347,7 +345,8 @@ class ProgramBuilder {
|
| // a regular getter that returns a JavaScript function and tearing off
|
| // a method in the case where there exist multiple JavaScript classes
|
| // that conflict on whether the member is a getter or a method.
|
| - var interceptorClass = _classes[helpers.jsJavaScriptObjectClass];
|
| + var interceptorClass =
|
| + _classes[_compiler.commonElements.jsJavaScriptObjectClass];
|
| var stubNames = new Set<String>();
|
| librariesMap.forEach((LibraryElement library, List<Element> elements) {
|
| for (Element e in elements) {
|
| @@ -475,7 +474,7 @@ class ProgramBuilder {
|
| .map(_buildStaticMethod)
|
| .toList();
|
|
|
| - if (library == helpers.interceptorsLibrary) {
|
| + if (library == _compiler.commonElements.interceptorsLibrary) {
|
| statics.addAll(_generateGetInterceptorMethods());
|
| statics.addAll(_generateOneShotInterceptors());
|
| }
|
| @@ -552,7 +551,7 @@ class ProgramBuilder {
|
| });
|
| }
|
|
|
| - if (element == helpers.closureClass) {
|
| + if (element == _compiler.commonElements.closureClass) {
|
| // We add a special getter here to allow for tearing off a closure from
|
| // itself.
|
| js.Name name = namer.getterForMember(Names.call);
|
| @@ -585,7 +584,7 @@ class ProgramBuilder {
|
| List<StubMethod> isChecks = <StubMethod>[];
|
| if (backend.nativeData.isJsInteropClass(element)) {
|
| typeTests.properties.forEach((js.Name name, js.Node code) {
|
| - _classes[helpers.jsInterceptorClass]
|
| + _classes[_compiler.commonElements.jsInterceptorClass]
|
| .isChecks
|
| .add(_buildStubMethod(name, code));
|
| });
|
| @@ -824,8 +823,8 @@ class ProgramBuilder {
|
| InterceptorStubGenerator stubGenerator =
|
| new InterceptorStubGenerator(_compiler, namer, backend, closedWorld);
|
|
|
| - String holderName =
|
| - namer.globalObjectForLibrary(helpers.interceptorsLibrary);
|
| + String holderName = namer
|
| + .globalObjectForLibrary(_compiler.commonElements.interceptorsLibrary);
|
| // TODO(floitsch): we shouldn't update the registry in the middle of
|
| // generating the interceptor methods.
|
| Holder holder = _registry.registerHolder(holderName);
|
| @@ -892,8 +891,8 @@ class ProgramBuilder {
|
| InterceptorStubGenerator stubGenerator =
|
| new InterceptorStubGenerator(_compiler, namer, backend, closedWorld);
|
|
|
| - String holderName =
|
| - namer.globalObjectForLibrary(helpers.interceptorsLibrary);
|
| + String holderName = namer
|
| + .globalObjectForLibrary(_compiler.commonElements.interceptorsLibrary);
|
| // TODO(floitsch): we shouldn't update the registry in the middle of
|
| // generating the interceptor methods.
|
| Holder holder = _registry.registerHolder(holderName);
|
|
|