Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 1154073004: Change more JS foreign methods to JS_GET_NAME. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * Assigns JavaScript identifiers to Dart variables, class-names and members. 8 * Assigns JavaScript identifiers to Dart variables, class-names and members.
9 * 9 *
10 * Names are generated through three stages: 10 * Names are generated through three stages:
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 case JsGetName.CALL_PREFIX3: return '${callPrefix}\$3'; 428 case JsGetName.CALL_PREFIX3: return '${callPrefix}\$3';
429 case JsGetName.CALL_CATCH_ALL: return callCatchAllName; 429 case JsGetName.CALL_CATCH_ALL: return callCatchAllName;
430 case JsGetName.REFLECTABLE: return reflectableField; 430 case JsGetName.REFLECTABLE: return reflectableField;
431 case JsGetName.CLASS_DESCRIPTOR_PROPERTY: 431 case JsGetName.CLASS_DESCRIPTOR_PROPERTY:
432 return classDescriptorProperty; 432 return classDescriptorProperty;
433 case JsGetName.REQUIRED_PARAMETER_PROPERTY: 433 case JsGetName.REQUIRED_PARAMETER_PROPERTY:
434 return requiredParameterField; 434 return requiredParameterField;
435 case JsGetName.DEFAULT_VALUES_PROPERTY: return defaultValuesField; 435 case JsGetName.DEFAULT_VALUES_PROPERTY: return defaultValuesField;
436 case JsGetName.CALL_NAME_PROPERTY: return callNameField; 436 case JsGetName.CALL_NAME_PROPERTY: return callNameField;
437 case JsGetName.DEFERRED_ACTION_PROPERTY: return deferredAction; 437 case JsGetName.DEFERRED_ACTION_PROPERTY: return deferredAction;
438 case JsGetName.OPERATOR_AS_PREFIX: return operatorAsPrefix;
439 case JsGetName.SIGNATURE_NAME: return operatorSignature;
440 case JsGetName.TYPEDEF_TAG: return typedefTag;
441 case JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG:
442 return functionTypeVoidReturnTag;
443 case JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG:
444 return functionTypeReturnTypeTag;
445 case JsGetName.FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG:
446 return functionTypeRequiredParametersTag;
447 case JsGetName.FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG:
448 return functionTypeOptionalParametersTag;
449 case JsGetName.FUNCTION_TYPE_NAMED_PARAMETERS_TAG:
450 return functionTypeNamedParametersTag;
438 default: 451 default:
439 compiler.reportError( 452 compiler.reportError(
440 node, MessageKind.GENERIC, 453 node, MessageKind.GENERIC,
441 {'text': 'Error: Namer has no name for "$name".'}); 454 {'text': 'Error: Namer has no name for "$name".'});
442 return 'BROKEN'; 455 return 'BROKEN';
443 } 456 }
444 } 457 }
445 458
446 /// Disambiguated name for [constant]. 459 /// Disambiguated name for [constant].
447 /// 460 ///
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 if (!first) { 1775 if (!first) {
1763 sb.write('_'); 1776 sb.write('_');
1764 } 1777 }
1765 sb.write('_'); 1778 sb.write('_');
1766 visit(parameter); 1779 visit(parameter);
1767 first = true; 1780 first = true;
1768 } 1781 }
1769 } 1782 }
1770 } 1783 }
1771 } 1784 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698