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

Unified Diff: pkg/dev_compiler/lib/src/compiler/code_generator.dart

Issue 2953883002: cleanup unused useDisplayName parameter (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index 2896c7aab3125bd45c31303d678a205076ff3844..04a6132d47e558b31f36c648cfd3e753bd14187c 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -1530,7 +1530,7 @@ class CodeGenerator extends Object
var fnBody =
js.call('this.noSuchMethod(new #.InvocationImpl.new(#, #, #))', [
_runtimeModule,
- _declareMemberName(method, useDisplayName: false),
+ _declareMemberName(method),
positionalArgs,
new JS.ObjectInitializer(invocationProps)
]);
@@ -5333,14 +5333,12 @@ class CodeGenerator extends Object
///
/// Unlike call sites, we always have an element available, so we can use it
/// directly rather than computing the relevant options for [_emitMemberName].
- JS.Expression _declareMemberName(ExecutableElement e,
- {bool useExtension, useDisplayName = false}) {
+ JS.Expression _declareMemberName(ExecutableElement e, {bool useExtension}) {
var name = (e is PropertyAccessorElement) ? e.variable.name : e.name;
return _emitMemberName(name,
isStatic: e.isStatic,
useExtension:
- useExtension ?? _extensionTypes.isNativeClass(e.enclosingElement),
- useDisplayName: useDisplayName);
+ useExtension ?? _extensionTypes.isNativeClass(e.enclosingElement));
}
/// This handles member renaming for private names and operators.
@@ -5387,7 +5385,6 @@ class CodeGenerator extends Object
{DartType type,
bool isStatic: false,
bool useExtension,
- bool useDisplayName: false,
bool alwaysSymbolizeNative: false,
Element element}) {
// Static members skip the rename steps and may require JS interop renames.
@@ -5401,22 +5398,20 @@ class CodeGenerator extends Object
// When generating synthetic names, we use _ as the prefix, since Dart names
// won't have this (eliminated above), nor will static names reach here.
- if (!useDisplayName) {
- switch (name) {
- case '[]':
- name = '_get';
- break;
- case '[]=':
- name = '_set';
- break;
- case 'unary-':
- name = '_negate';
- break;
- case 'constructor':
- case 'prototype':
- name = '_$name';
- break;
- }
+ switch (name) {
+ case '[]':
+ name = '_get';
+ break;
+ case '[]=':
+ name = '_set';
+ break;
+ case 'unary-':
+ name = '_negate';
+ break;
+ case 'constructor':
+ case 'prototype':
+ name = '_$name';
+ break;
}
var result = _propertyName(name);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698