| Index: pkg/compiler/lib/src/js_backend/namer.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
|
| index afc3d3f2871cfadb871bd729a23581cb68213536..de1279f3a80b7ba9e5048f33367c51f47429730f 100644
|
| --- a/pkg/compiler/lib/src/js_backend/namer.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/namer.dart
|
| @@ -457,6 +457,8 @@ class Namer {
|
|
|
| JavaScriptBackend get backend => compiler.backend;
|
|
|
| + DiagnosticReporter get reporter => compiler.reporter;
|
| +
|
| String get deferredTypesName => 'deferredTypes';
|
| String get isolateName => 'Isolate';
|
| String get isolatePropertiesName => r'$isolateProperties';
|
| @@ -513,7 +515,7 @@ class Namer {
|
| case JsGetName.FUNCTION_CLASS_TYPE_NAME:
|
| return runtimeTypeName(compiler.functionClass);
|
| default:
|
| - compiler.reportErrorMessage(
|
| + reporter.reportErrorMessage(
|
| node,
|
| MessageKind.GENERIC,
|
| {'text': 'Error: Namer has no name for "$name".'});
|
| @@ -705,7 +707,8 @@ class Namer {
|
| return disambiguatedName; // Methods other than call are not annotated.
|
|
|
| default:
|
| - compiler.internalError(compiler.currentElement,
|
| + reporter.internalError(
|
| + CURRENT_ELEMENT_SPANNABLE,
|
| 'Unexpected selector kind: ${selector.kind}');
|
| return null;
|
| }
|
| @@ -1581,6 +1584,8 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
|
|
|
| ConstantNamingVisitor(this.compiler, this.hasher);
|
|
|
| + DiagnosticReporter get reporter => compiler.reporter;
|
| +
|
| String getName(ConstantValue constant) {
|
| _visit(constant);
|
| if (root == null) return 'CONSTANT';
|
| @@ -1743,7 +1748,7 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
|
| add('name');
|
| break;
|
| default:
|
| - compiler.internalError(compiler.currentElement,
|
| + reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
|
| "Unexpected SyntheticConstantValue");
|
| }
|
| }
|
| @@ -1773,6 +1778,8 @@ class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
|
|
|
| ConstantCanonicalHasher(this.compiler);
|
|
|
| + DiagnosticReporter get reporter => compiler.reporter;
|
| +
|
| int getHash(ConstantValue constant) => _visit(constant);
|
|
|
| int _visit(ConstantValue constant) {
|
| @@ -1856,9 +1863,10 @@ class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
|
| // resolve to integer indexes, they're always part of a larger constant.
|
| return 0;
|
| default:
|
| - compiler.internalError(NO_LOCATION_SPANNABLE,
|
| - 'SyntheticConstantValue should never be named and '
|
| - 'never be subconstant');
|
| + reporter.internalError(
|
| + NO_LOCATION_SPANNABLE,
|
| + 'SyntheticConstantValue should never be named and '
|
| + 'never be subconstant');
|
| return 0;
|
| }
|
| }
|
|
|