Skip to content

Commit 41a7db1

Browse files
mit-mitcommit-bot@chromium.org
authored andcommitted
Avoid divisive terms
Based on guidance in https://developers.google.com/style/w Related to #42247 Change-Id: If40c8e39bb35f1f7dfad9cb977c7a494a2cc3bd7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150626 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Michael Thomsen <[email protected]>
1 parent ae3b975 commit 41a7db1

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ class ProgramBuilder {
277277
void _initializeSoftDeferredMap() {
278278
var allocatedClassesPath = _options.experimentalAllocationsPath;
279279
if (allocatedClassesPath != null) {
280-
// TODO(29574): the following blacklist is ad-hoc and potentially
280+
// TODO(29574): the following denylist is ad-hoc and potentially
281281
// incomplete. We need to mark all classes as black listed, that are
282282
// used without code going through the class' constructor.
283-
var blackList = [
283+
var denylist = [
284284
'dart:_interceptors',
285285
'dart:html',
286286
'dart:typed_data_implementation',
@@ -329,7 +329,7 @@ class ProgramBuilder {
329329
var key = "${element.library.canonicalUri}:${element.name}";
330330
if (allocatedClassesKeys.contains(key) ||
331331
_nativeData.isJsInteropClass(element) ||
332-
blackList.contains(element.library.canonicalUri.toString())) {
332+
denylist.contains(element.library.canonicalUri.toString())) {
333333
collect(element);
334334
}
335335
}

pkg/front_end/lib/src/fasta/source/source_loader.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,9 @@ class SourceLoader extends Loader {
663663
}
664664
}
665665

666-
Set<ClassBuilder> blackListedClasses = new Set<ClassBuilder>();
666+
Set<ClassBuilder> denyListedClasses = new Set<ClassBuilder>();
667667
for (int i = 0; i < denylistedCoreClasses.length; i++) {
668-
blackListedClasses.add(coreLibrary
668+
denyListedClasses.add(coreLibrary
669669
.lookupLocalMember(denylistedCoreClasses[i], required: true));
670670
}
671671

@@ -698,7 +698,7 @@ class SourceLoader extends Loader {
698698
}
699699
if (allSupertypesProcessed) {
700700
topologicallySortedClasses.add(cls);
701-
checkClassSupertypes(cls, directSupertypeMap, blackListedClasses);
701+
checkClassSupertypes(cls, directSupertypeMap, denyListedClasses);
702702
} else {
703703
workList.add(cls);
704704
}
@@ -748,8 +748,8 @@ class SourceLoader extends Loader {
748748
void checkClassSupertypes(
749749
SourceClassBuilder cls,
750750
Map<TypeDeclarationBuilder, TypeAliasBuilder> directSupertypeMap,
751-
Set<ClassBuilder> blackListedClasses) {
752-
// Check that the direct supertypes aren't black-listed or enums.
751+
Set<ClassBuilder> denyListedClasses) {
752+
// Check that the direct supertypes aren't deny-listed or enums.
753753
List<TypeDeclarationBuilder> directSupertypes =
754754
directSupertypeMap.keys.toList();
755755
for (int i = 0; i < directSupertypes.length; i++) {
@@ -758,7 +758,7 @@ class SourceLoader extends Loader {
758758
cls.addProblem(templateExtendingEnum.withArguments(supertype.name),
759759
cls.charOffset, noLength);
760760
} else if (!cls.library.mayImplementRestrictedTypes &&
761-
blackListedClasses.contains(supertype)) {
761+
denyListedClasses.contains(supertype)) {
762762
TypeAliasBuilder aliasBuilder = directSupertypeMap[supertype];
763763
if (aliasBuilder != null) {
764764
cls.addProblem(
@@ -801,7 +801,7 @@ class SourceLoader extends Loader {
801801
]);
802802
return;
803803
} else if (!cls.library.mayImplementRestrictedTypes &&
804-
blackListedClasses.contains(builder)) {
804+
denyListedClasses.contains(builder)) {
805805
cls.addProblem(
806806
templateExtendingRestricted
807807
.withArguments(mixedInTypeBuilder.fullNameForErrors),

pkg/front_end/test/spell_checking_list_code.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ mangled
603603
manipulation
604604
markdown
605605
masking
606+
master
606607
matcher
607608
mb
608609
md

pkg/front_end/test/spell_checking_list_common.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ denote
772772
denoted
773773
denotes
774774
denoting
775+
deny
775776
depend
776777
dependence
777778
dependencies
@@ -1769,7 +1770,6 @@ markers
17691770
marking
17701771
marks
17711772
mask
1772-
master
17731773
match
17741774
matched
17751775
matcher

pkg/front_end/test/spell_checking_list_denylist.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
# automatic tools might move it to the top of the file.
1111

1212
alread
13+
blacklist
14+
black-list
15+
blacklisted
16+
black-listed
1317
chnage
1418
clonable
1519
comile
@@ -69,6 +73,7 @@ reuslt
6973
satifying
7074
seach
7175
singluar
76+
slave
7277
Specifiction
7378
staments
7479
statment
@@ -79,4 +84,8 @@ suffient
7984
terminted
8085
tood
8186
unlinke
82-
valiation
87+
valiation
88+
whitelist
89+
white-list
90+
whitelisted
91+
white-listed

pkg/test_runner/lib/src/options.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ compiler.''',
353353

354354
/// For printing out reproducing command lines, we don't want to add these
355355
/// options.
356-
static final _blacklistedOptions = {
356+
static final _denylistedOptions = {
357357
'build_directory',
358358
'chrome',
359359
'clean_exit',
@@ -585,7 +585,7 @@ compiler.''',
585585
for (var option in _options) {
586586
var name = option.name;
587587
if (!data.containsKey(name) ||
588-
_blacklistedOptions.contains(name) ||
588+
_denylistedOptions.contains(name) ||
589589
(usingNamedConfiguration &&
590590
_namedConfigurationOptions.contains(name))) {
591591
continue;

0 commit comments

Comments
 (0)