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

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

Issue 1235463004: dart2js: Take named arguments into account (again) when naming one-shot interceptors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix date Created 5 years, 5 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 | tests/compiler/dart2js_extra/interceptor_named_arguments_test.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 class MinifyNamer extends Namer with _MinifiedFieldNamer, 10 class MinifyNamer extends Namer with _MinifiedFieldNamer,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 /// [selector] and return-type specialization. 335 /// [selector] and return-type specialization.
336 @override 336 @override
337 jsAst.Name nameForGetOneShotInterceptor(Selector selector, 337 jsAst.Name nameForGetOneShotInterceptor(Selector selector,
338 Iterable<ClassElement> classes) { 338 Iterable<ClassElement> classes) {
339 String root = selector.isOperator 339 String root = selector.isOperator
340 ? operatorNameToIdentifier(selector.name) 340 ? operatorNameToIdentifier(selector.name)
341 : privateName(selector.memberName); 341 : privateName(selector.memberName);
342 String prefix = selector.isGetter 342 String prefix = selector.isGetter
343 ? r"$get" 343 ? r"$get"
344 : selector.isSetter ? r"$set" : ""; 344 : selector.isSetter ? r"$set" : "";
345 String arity = selector.isCall ? "${selector.argumentCount}" : ""; 345 String callSuffix =
346 selector.isCall ? callSuffixForStructure(selector.callStructure) : "";
346 String suffix = suffixForGetInterceptor(classes); 347 String suffix = suffixForGetInterceptor(classes);
347 String fullName = "\$intercepted$prefix\$$root$arity\$$suffix"; 348 String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix";
348 return _disambiguateInternalGlobal(fullName); 349 return _disambiguateInternalGlobal(fullName);
349 } 350 }
350 } 351 }
351 352
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/interceptor_named_arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698