Ignore:
Timestamp:
Jun 11, 2020, 3:47:21 PM (5 years ago)
Author:
[email protected]
Message:

Replace uses of black/white list with block/allow list
https://bugs.webkit.org/show_bug.cgi?id=213084

Reviewed by Keith Miller.

We should be using racially neutral names in our code. From Chromium style guide:

"Terms such as 'blacklist' and 'whitelist' reinforce the notion that
black==bad and white==good."

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/air/AirLowerAfterRegAlloc.cpp:

(JSC::B3::Air::lowerAfterRegAlloc):

  • dfg/DFGDriver.cpp:

(JSC::DFG::ensureGlobalDFGAllowlist):
(JSC::DFG::compileImpl):
(JSC::DFG::ensureGlobalDFGWhitelist): Deleted.

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::ensureGlobalFTLAllowlist):
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::ensureGlobalFTLWhitelist): Deleted.

  • heap/MachineStackMarker.cpp:
  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator.should_generate_types_for_domain):
(ObjCGenerator.should_generate_commands_for_domain):
(ObjCGenerator.should_generate_events_for_domain):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::ensureGlobalJITAllowlist):
(JSC::LLInt::shouldJIT):
(JSC::LLInt::ensureGlobalJITWhitelist): Deleted.

  • runtime/OptionsList.h:
  • tools/FunctionAllowlist.cpp: Copied from Source/JavaScriptCore/tools/FunctionWhitelist.cpp.

(JSC::FunctionAllowlist::FunctionAllowlist):
(JSC::FunctionAllowlist::contains const):
(JSC::FunctionWhitelist::FunctionWhitelist): Deleted.
(JSC::FunctionWhitelist::contains const): Deleted.

  • tools/FunctionAllowlist.h: Copied from Source/JavaScriptCore/tools/FunctionWhitelist.h.
  • tools/FunctionWhitelist.cpp: Removed.
  • tools/FunctionWhitelist.h: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp

    r261755 r262928  
    3232#include "DFGThunks.h"
    3333#include "DFGWorklist.h"
    34 #include "FunctionWhitelist.h"
     34#include "FunctionAllowlist.h"
    3535#include "JITCode.h"
    3636#include "Options.h"
     
    4949
    5050#if ENABLE(DFG_JIT)
    51 static FunctionWhitelist& ensureGlobalDFGWhitelist()
     51static FunctionAllowlist& ensureGlobalDFGAllowlist()
    5252{
    53     static LazyNeverDestroyed<FunctionWhitelist> dfgWhitelist;
    54     static std::once_flag initializeWhitelistFlag;
    55     std::call_once(initializeWhitelistFlag, [] {
    56         const char* functionWhitelistFile = Options::dfgWhitelist();
    57         dfgWhitelist.construct(functionWhitelistFile);
     53    static LazyNeverDestroyed<FunctionAllowlist> dfgAllowlist;
     54    static std::once_flag initializeAllowlistFlag;
     55    std::call_once(initializeAllowlistFlag, [] {
     56        const char* functionAllowlistFile = Options::dfgAllowlist();
     57        dfgAllowlist.construct(functionAllowlistFile);
    5858    });
    59     return dfgWhitelist;
     59    return dfgAllowlist;
    6060}
    6161
     
    6666{
    6767    if (!Options::bytecodeRangeToDFGCompile().isInRange(codeBlock->instructionsSize())
    68         || !ensureGlobalDFGWhitelist().contains(codeBlock))
     68        || !ensureGlobalDFGAllowlist().contains(codeBlock))
    6969        return CompilationFailed;
    7070   
Note: See TracChangeset for help on using the changeset viewer.