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

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

Issue 1158423005: Move IS_INDEXABLE_FIELD to JsGetName. (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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 case JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG: 441 case JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG:
442 return functionTypeVoidReturnTag; 442 return functionTypeVoidReturnTag;
443 case JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG: 443 case JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG:
444 return functionTypeReturnTypeTag; 444 return functionTypeReturnTypeTag;
445 case JsGetName.FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG: 445 case JsGetName.FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG:
446 return functionTypeRequiredParametersTag; 446 return functionTypeRequiredParametersTag;
447 case JsGetName.FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG: 447 case JsGetName.FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG:
448 return functionTypeOptionalParametersTag; 448 return functionTypeOptionalParametersTag;
449 case JsGetName.FUNCTION_TYPE_NAMED_PARAMETERS_TAG: 449 case JsGetName.FUNCTION_TYPE_NAMED_PARAMETERS_TAG:
450 return functionTypeNamedParametersTag; 450 return functionTypeNamedParametersTag;
451 case JsGetName.IS_INDEXABLE_FIELD_NAME:
452 Element cls = backend.findHelper('JavaScriptIndexingBehavior');
453 return operatorIs(cls);
451 default: 454 default:
452 compiler.reportError( 455 compiler.reportError(
453 node, MessageKind.GENERIC, 456 node, MessageKind.GENERIC,
454 {'text': 'Error: Namer has no name for "$name".'}); 457 {'text': 'Error: Namer has no name for "$name".'});
455 return 'BROKEN'; 458 return 'BROKEN';
456 } 459 }
457 } 460 }
458 461
459 /// Disambiguated name for [constant]. 462 /// Disambiguated name for [constant].
460 /// 463 ///
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 if (!first) { 1778 if (!first) {
1776 sb.write('_'); 1779 sb.write('_');
1777 } 1780 }
1778 sb.write('_'); 1781 sb.write('_');
1779 visit(parameter); 1782 visit(parameter);
1780 first = true; 1783 first = true;
1781 } 1784 }
1782 } 1785 }
1783 } 1786 }
1784 } 1787 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698