| 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 8df84a562f0979f1430950e40e5191493520f089..36663d9704d1d7c2667ce9b410625bbf8af7eb8e 100644
|
| --- a/pkg/compiler/lib/src/js_backend/namer.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/namer.dart
|
| @@ -301,21 +301,25 @@ class Namer implements ClosureNamer {
|
| String get closureInvocationSelectorName => Compiler.CALL_OPERATOR_NAME;
|
| bool get shouldMinify => false;
|
|
|
| - String getNameForJsGetName(Node node, String name) {
|
| + /// Returns the string that is to be used as the result of a call to
|
| + /// [JS_GET_NAME] at [node] with argument [name].
|
| + String getNameForJsGetName(Node node, JsGetName name) {
|
| switch (name) {
|
| - case 'GETTER_PREFIX': return getterPrefix;
|
| - case 'SETTER_PREFIX': return setterPrefix;
|
| - case 'CALL_PREFIX': return callPrefix;
|
| - case 'CALL_CATCH_ALL': return callCatchAllName;
|
| - case 'REFLECTABLE': return reflectableField;
|
| - case 'CLASS_DESCRIPTOR_PROPERTY': return classDescriptorProperty;
|
| - case 'REQUIRED_PARAMETER_PROPERTY': return requiredParameterField;
|
| - case 'DEFAULT_VALUES_PROPERTY': return defaultValuesField;
|
| - case 'CALL_NAME_PROPERTY': return callNameField;
|
| + case JsGetName.GETTER_PREFIX: return getterPrefix;
|
| + case JsGetName.SETTER_PREFIX: return setterPrefix;
|
| + case JsGetName.CALL_PREFIX: return callPrefix;
|
| + case JsGetName.CALL_CATCH_ALL: return callCatchAllName;
|
| + case JsGetName.REFLECTABLE: return reflectableField;
|
| + case JsGetName.CLASS_DESCRIPTOR_PROPERTY:
|
| + return classDescriptorProperty;
|
| + case JsGetName.REQUIRED_PARAMETER_PROPERTY:
|
| + return requiredParameterField;
|
| + case JsGetName.DEFAULT_VALUES_PROPERTY: return defaultValuesField;
|
| + case JsGetName.CALL_NAME_PROPERTY: return callNameField;
|
| default:
|
| compiler.reportError(
|
| - node, MessageKind.GENERIC,
|
| - {'text': 'Error: Namer has no name for "$name".'});
|
| + node, MessageKind.GENERIC,
|
| + {'text': 'Error: Namer has no name for "$name".'});
|
| return 'BROKEN';
|
| }
|
| }
|
|
|