Changeset 268993 in webkit


Ignore:
Timestamp:
Oct 26, 2020, 1:08:01 PM (5 years ago)
Author:
achristensen@apple.com
Message:

Inclusive software: Remove instances of "dumb" from the code
https://bugs.webkit.org/show_bug.cgi?id=217778

Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::unboxBoolean):

  • heap/SlotVisitor.h:
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitVirtualCall):
(JSC::AssemblyHelpers::emitDumbVirtualCall): Deleted.

  • jit/AssemblyHelpers.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileCallEvalSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):

  • runtime/CachedTypes.cpp:
  • runtime/JSCJSValue.h:
  • runtime/WriteBarrier.h:
  • runtime/WriteBarrierInlines.h:

(JSC::RawValueTraits<Unknown>>::set):
(JSC::DumbValueTraits<Unknown>>::set): Deleted.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addCallIndirect):

  • wasm/generateWasm.py:

(opcodeIterator):

Source/WebCore:

  • Modules/webaudio/AudioNode.h:
  • dom/GCReachableRef.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::handleDrag):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::addToLine):

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • icu/unicode/caniter.h:
  • wtf/Bag.h:
  • wtf/CMakeLists.txt:
  • wtf/CagedPtr.h:
  • wtf/Forward.h:
  • wtf/NakedRef.h:
  • wtf/RawPtrTraits.h: Renamed from Source/WTF/wtf/DumbPtrTraits.h.
  • wtf/RawValueTraits.h: Renamed from Source/WTF/wtf/DumbValueTraits.h.
  • wtf/Ref.h:
  • wtf/RefCountedArray.h:
  • wtf/RefPtr.h:
  • wtf/SentinelLinkedList.h:
Location:
trunk/Source
Files:
2 added
2 deleted
32 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/JavaScriptCore/ChangeLog

    r268990 r268993  
     12020-10-26  Alex Christensen  <achristensen@webkit.org>
     2
     3        Inclusive software: Remove instances of "dumb" from the code
     4        https://bugs.webkit.org/show_bug.cgi?id=217778
     5
     6        Reviewed by Simon Fraser.
     7
     8        * dfg/DFGSpeculativeJIT32_64.cpp:
     9        (JSC::DFG::SpeculativeJIT::emitCall):
     10        * dfg/DFGSpeculativeJIT64.cpp:
     11        (JSC::DFG::SpeculativeJIT::emitCall):
     12        * ftl/FTLLowerDFGToB3.cpp:
     13        (JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
     14        (JSC::FTL::DFG::LowerDFGToB3::unboxBoolean):
     15        * heap/SlotVisitor.h:
     16        * jit/AssemblyHelpers.cpp:
     17        (JSC::AssemblyHelpers::emitVirtualCall):
     18        (JSC::AssemblyHelpers::emitDumbVirtualCall): Deleted.
     19        * jit/AssemblyHelpers.h:
     20        * jit/JITCall.cpp:
     21        (JSC::JIT::compileCallEvalSlowCase):
     22        * jit/JITCall32_64.cpp:
     23        (JSC::JIT::compileCallEvalSlowCase):
     24        * runtime/CachedTypes.cpp:
     25        * runtime/JSCJSValue.h:
     26        * runtime/WriteBarrier.h:
     27        * runtime/WriteBarrierInlines.h:
     28        (JSC::RawValueTraits<Unknown>>::set):
     29        (JSC::DumbValueTraits<Unknown>>::set): Deleted.
     30        * wasm/WasmAirIRGenerator.cpp:
     31        (JSC::Wasm::AirIRGenerator::addCallIndirect):
     32        * wasm/generateWasm.py:
     33        (opcodeIterator):
     34
    1352020-10-26  Sam Weinig  <weinig@apple.com>
    236
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r268794 r268993  
    825825        m_jit.load32(JITCompiler::calleeFrameSlot(CallFrameSlot::callee).withOffset(PayloadOffset), GPRInfo::regT0);
    826826        m_jit.load32(JITCompiler::calleeFrameSlot(CallFrameSlot::callee).withOffset(TagOffset), GPRInfo::regT1);
    827         m_jit.emitDumbVirtualCall(vm(), globalObject, info);
     827        m_jit.emitVirtualCall(vm(), globalObject, info);
    828828       
    829829        done.link(&m_jit);
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r268794 r268993  
    817817        m_jit.addPtr(TrustedImm32(requiredBytes), JITCompiler::stackPointerRegister);
    818818        m_jit.load64(JITCompiler::calleeFrameSlot(CallFrameSlot::callee), GPRInfo::regT0);
    819         m_jit.emitDumbVirtualCall(vm(), globalObject, callLinkInfo);
     819        m_jit.emitVirtualCall(vm(), globalObject, callLinkInfo);
    820820       
    821821        done.link(&m_jit);
  • TabularUnified trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r268794 r268993  
    1061110611                jit.addPtr(CCallHelpers::TrustedImm32(requiredBytes), CCallHelpers::stackPointerRegister);
    1061210612                jit.load64(CCallHelpers::calleeFrameSlot(CallFrameSlot::callee), GPRInfo::regT0);
    10613                 jit.emitDumbVirtualCall(vm, globalObject, callLinkInfo);
     10613                jit.emitVirtualCall(vm, globalObject, callLinkInfo);
    1061410614               
    1061510615                done.link(&jit);
     
    1794917949    {
    1795017950        // We want to use a cast that guarantees that B3 knows that even the integer
    17951         // value is just 0 or 1. But for now we do it the dumb way.
     17951        // value is just 0 or 1. But for now we do it the direct way.
    1795217952        return m_out.notZero64(m_out.bitAnd(jsValue, m_out.constInt64(1)));
    1795317953    }
  • TabularUnified trunk/Source/JavaScriptCore/heap/SlotVisitor.h

    r262928 r268993  
    9292    template<typename T, typename Traits> void appendHidden(const WriteBarrierBase<T, Traits>&);
    9393    template<typename Iterator> void append(Iterator begin , Iterator end);
    94     void appendValues(const WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>*, size_t count);
    95     void appendValuesHidden(const WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>*, size_t count);
     94    void appendValues(const WriteBarrierBase<Unknown, RawValueTraits<Unknown>>*, size_t count);
     95    void appendValuesHidden(const WriteBarrierBase<Unknown, RawValueTraits<Unknown>>*, size_t count);
    9696   
    9797    // These don't require you to prove that you have a WriteBarrier<>. That makes sense
  • TabularUnified trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp

    r265416 r268993  
    643643}
    644644
    645 void AssemblyHelpers::emitDumbVirtualCall(VM& vm, JSGlobalObject* globalObject, CallLinkInfo* info)
     645void AssemblyHelpers::emitVirtualCall(VM& vm, JSGlobalObject* globalObject, CallLinkInfo* info)
    646646{
    647647    move(TrustedImmPtr(info), GPRInfo::regT2);
  • TabularUnified trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r265416 r268993  
    19391939    }
    19401940   
    1941     void emitDumbVirtualCall(VM&, JSGlobalObject*, CallLinkInfo*);
     1941    void emitVirtualCall(VM&, JSGlobalObject*, CallLinkInfo*);
    19421942   
    19431943    void makeSpaceOnStackForCCall();
  • TabularUnified trunk/Source/JavaScriptCore/jit/JITCall.cpp

    r268077 r268993  
    159159
    160160    load64(Address(stackPointerRegister, sizeof(Register) * CallFrameSlot::callee - sizeof(CallerFrameAndPC)), regT0);
    161     emitDumbVirtualCall(vm(), m_codeBlock->globalObject(), info);
     161    emitVirtualCall(vm(), m_codeBlock->globalObject(), info);
    162162    addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, stackPointerRegister);
    163163    checkStackPointerAlignment();
  • TabularUnified trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp

    r268077 r268993  
    261261
    262262    emitLoad(callee, regT1, regT0);
    263     emitDumbVirtualCall(vm(), m_codeBlock->globalObject(), info);
     263    emitVirtualCall(vm(), m_codeBlock->globalObject(), info);
    264264    addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, stackPointerRegister);
    265265    checkStackPointerAlignment();
  • TabularUnified trunk/Source/JavaScriptCore/runtime/CachedTypes.cpp

    r267591 r268993  
    534534}
    535535
    536 template<typename T, typename Source = SourceType<T>, typename PtrTraits = DumbPtrTraits<Source>>
     536template<typename T, typename Source = SourceType<T>, typename PtrTraits = RawPtrTraits<Source>>
    537537class CachedRefPtr : public CachedObject<RefPtr<Source, PtrTraits>> {
    538538public:
  • TabularUnified trunk/Source/JavaScriptCore/runtime/JSCJSValue.h

    r266251 r268993  
    8080template<class T>
    8181using WriteBarrierTraitsSelect = typename std::conditional<std::is_same<T, Unknown>::value,
    82     DumbValueTraits<T>, DumbPtrTraits<T>
     82    RawValueTraits<T>, RawPtrTraits<T>
    8383>::type;
    8484
  • TabularUnified trunk/Source/JavaScriptCore/runtime/WriteBarrier.h

    r261464 r268993  
    2929#include "HandleTypes.h"
    3030#include <type_traits>
    31 #include <wtf/DumbPtrTraits.h>
    32 #include <wtf/DumbValueTraits.h>
     31#include <wtf/RawPtrTraits.h>
     32#include <wtf/RawValueTraits.h>
    3333
    3434namespace JSC {
     
    4444template<class T>
    4545using WriteBarrierTraitsSelect = typename std::conditional<std::is_same<T, Unknown>::value,
    46     DumbValueTraits<T>, DumbPtrTraits<T>
     46    RawValueTraits<T>, RawPtrTraits<T>
    4747>::type;
    4848
     
    125125
    126126    // Slot cannot be used when pointers aren't stored as-is.
    127     template<typename BarrierT, typename BarrierTraits, std::enable_if_t<std::is_same<BarrierTraits, DumbPtrTraits<BarrierT>>::value, void*> = nullptr>
     127    template<typename BarrierT, typename BarrierTraits, std::enable_if_t<std::is_same<BarrierTraits, RawPtrTraits<BarrierT>>::value, void*> = nullptr>
    128128    struct SlotHelper {
    129129        static BarrierT** reinterpret(typename BarrierTraits::StorageType* cell) { return reinterpret_cast<T**>(cell); }
     
    153153};
    154154
    155 template <> class WriteBarrierBase<Unknown, DumbValueTraits<Unknown>> {
     155template <> class WriteBarrierBase<Unknown, RawValueTraits<Unknown>> {
    156156public:
    157157    void set(VM&, const JSCell* owner, JSValue);
     
    219219enum UndefinedWriteBarrierTagType { UndefinedWriteBarrierTag };
    220220template <>
    221 class WriteBarrier<Unknown, DumbValueTraits<Unknown>> : public WriteBarrierBase<Unknown, DumbValueTraits<Unknown>> {
     221class WriteBarrier<Unknown, RawValueTraits<Unknown>> : public WriteBarrierBase<Unknown, RawValueTraits<Unknown>> {
    222222    WTF_MAKE_FAST_ALLOCATED;
    223223public:
  • TabularUnified trunk/Source/JavaScriptCore/runtime/WriteBarrierInlines.h

    r226920 r268993  
    5555}
    5656
    57 inline void WriteBarrierBase<Unknown, DumbValueTraits<Unknown>>::set(VM& vm, const JSCell* owner, JSValue value)
     57inline void WriteBarrierBase<Unknown, RawValueTraits<Unknown>>::set(VM& vm, const JSCell* owner, JSValue value)
    5858{
    5959    ASSERT(!Options::useConcurrentJIT() || !isCompilationThread());
  • TabularUnified trunk/Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp

    r268942 r268993  
    22412241        static_assert(sizeof(WasmToWasmImportableFunction::signatureIndex) == sizeof(uint64_t), "Load codegen assumes i64");
    22422242
    2243         // FIXME: This seems dumb to do two checks just for a nicer error message.
     2243        // FIXME: This seems wasteful to do two checks just for a nicer error message.
    22442244        // We should move just to use a single branch and then figure out what
    22452245        // error to use in the exception handler.
  • TabularUnified trunk/Source/JavaScriptCore/wasm/generateWasm.py

    r236321 r268993  
    6969
    7070    def opcodeIterator(self, filter, ret=None):
    71         # We need to do this because python is dumb and won't let me use self in the lambda, which is ridiculous.
     71        # We need to do this because python won't let me use self in the lambda, which is ridiculous.
    7272        if ret == None:
    7373            ret = lambda op: {"name": op, "opcode": self.opcodes[op]}
  • TabularUnified trunk/Source/WTF/ChangeLog

    r268979 r268993  
     12020-10-26  Alex Christensen  <achristensen@webkit.org>
     2
     3        Inclusive software: Remove instances of "dumb" from the code
     4        https://bugs.webkit.org/show_bug.cgi?id=217778
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WTF.xcodeproj/project.pbxproj:
     9        * icu/unicode/caniter.h:
     10        * wtf/Bag.h:
     11        * wtf/CMakeLists.txt:
     12        * wtf/CagedPtr.h:
     13        * wtf/Forward.h:
     14        * wtf/NakedRef.h:
     15        * wtf/RawPtrTraits.h: Renamed from Source/WTF/wtf/DumbPtrTraits.h.
     16        * wtf/RawValueTraits.h: Renamed from Source/WTF/wtf/DumbValueTraits.h.
     17        * wtf/Ref.h:
     18        * wtf/RefCountedArray.h:
     19        * wtf/RefPtr.h:
     20        * wtf/SentinelLinkedList.h:
     21
    1222020-10-26  Youenn Fablet  <youenn@apple.com>
    223
  • TabularUnified trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r268020 r268993  
    677677                A8A4748B151A8264004123FF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
    678678                A9A4727F151A825A004123FF /* DisallowCType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisallowCType.h; sourceTree = "<group>"; };
    679                 AD653DA82006B6C200D820D7 /* DumbValueTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DumbValueTraits.h; sourceTree = "<group>"; };
     679                AD653DA82006B6C200D820D7 /* RawValueTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RawValueTraits.h; sourceTree = "<group>"; };
    680680                AD7C434A1DD2A4A70026888B /* Expected.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Expected.h; sourceTree = "<group>"; };
    681681                AD89B6B51E6415080090707F /* MemoryPressureHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryPressureHandler.cpp; sourceTree = "<group>"; };
     
    753753                FE032AD02463E43B0012D7C7 /* WTFConfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WTFConfig.cpp; sourceTree = "<group>"; };
    754754                FE032AD12463E43B0012D7C7 /* WTFConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFConfig.h; sourceTree = "<group>"; };
    755                 FE05FAE61FDB214300093230 /* DumbPtrTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DumbPtrTraits.h; sourceTree = "<group>"; };
     755                FE05FAE61FDB214300093230 /* RawPtrTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RawPtrTraits.h; sourceTree = "<group>"; };
    756756                FE05FAFE1FE5007500093230 /* WTFAssertions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WTFAssertions.cpp; sourceTree = "<group>"; };
    757757                FE1D6D87237401CD007A5C26 /* StackCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackCheck.h; sourceTree = "<group>"; };
     
    10201020                                A8A47297151A825A004123FF /* dtoa.cpp */,
    10211021                                A8A47298151A825A004123FF /* dtoa.h */,
    1022                                 FE05FAE61FDB214300093230 /* DumbPtrTraits.h */,
    1023                                 AD653DA82006B6C200D820D7 /* DumbValueTraits.h */,
    10241022                                5338EBA423AB04D100382662 /* EnumClassOperatorOverloads.h */,
    10251023                                1AEA88E11D6BBCF400E5AD64 /* EnumTraits.h */,
     
    11951193                                0F725CAB1C50461600AD943A /* RangeSet.h */,
    11961194                                0F87105916643F190090B0AD /* RawPointer.h */,
     1195                                FE05FAE61FDB214300093230 /* RawPtrTraits.h */,
     1196                                AD653DA82006B6C200D820D7 /* RawValueTraits.h */,
    11971197                                0FEC3C5C1F368A9700F59B6C /* ReadWriteLock.cpp */,
    11981198                                0FEC3C5D1F368A9700F59B6C /* ReadWriteLock.h */,
  • TabularUnified trunk/Source/WTF/icu/unicode/caniter.h

    r259606 r268993  
    121121#ifndef U_HIDE_INTERNAL_API
    122122    /**
    123      * Dumb recursive implementation of permutation.
     123     * Unoptimized recursive implementation of permutation.
    124124     * TODO: optimize
    125125     * @param source     the string to find permutations for
  • TabularUnified trunk/Source/WTF/wtf/Bag.h

    r253987 r268993  
    2626#pragma once
    2727
    28 #include <wtf/DumbPtrTraits.h>
    2928#include <wtf/FastMalloc.h>
    3029#include <wtf/Noncopyable.h>
    3130#include <wtf/Packed.h>
     31#include <wtf/RawPtrTraits.h>
    3232
    3333namespace WTF {
    3434
    3535DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(BagNode);
    36 template<typename T, typename PassedPtrTraits = DumbPtrTraits<T>>
     36template<typename T, typename PassedPtrTraits = RawPtrTraits<T>>
    3737class BagNode {
    3838    WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(BagNode);
     
    4949};
    5050
    51 template<typename T, typename PassedPtrTraits = DumbPtrTraits<T>>
     51template<typename T, typename PassedPtrTraits = RawPtrTraits<T>>
    5252class Bag final {
    5353    WTF_MAKE_NONCOPYABLE(Bag);
  • TabularUnified trunk/Source/WTF/wtf/CMakeLists.txt

    r268020 r268993  
    5959    Dominators.h
    6060    DoublyLinkedList.h
    61     DumbPtrTraits.h
    62     DumbValueTraits.h
    6361    EnumClassOperatorOverloads.h
    6462    EnumTraits.h
     
    203201    RangeSet.h
    204202    RawPointer.h
     203    RawPtrTraits.h
     204    RawValueTraits.h
    205205    ReadWriteLock.h
    206206    RecursableLambda.h
  • TabularUnified trunk/Source/WTF/wtf/CagedPtr.h

    r265179 r268993  
    2626#pragma once
    2727
    28 #include <wtf/DumbPtrTraits.h>
    2928#include <wtf/Gigacage.h>
    3029#include <wtf/PtrTag.h>
     30#include <wtf/RawPtrTraits.h>
    3131
    3232#include <climits>
     
    3636constexpr bool tagCagedPtr = true;
    3737
    38 template<Gigacage::Kind passedKind, typename T, bool shouldTag = false, typename PtrTraits = DumbPtrTraits<T>>
     38template<Gigacage::Kind passedKind, typename T, bool shouldTag = false, typename PtrTraits = RawPtrTraits<T>>
    3939class CagedPtr {
    4040public:
  • TabularUnified trunk/Source/WTF/wtf/Forward.h

    r267591 r268993  
    5959#endif
    6060
    61 template<typename> struct DumbPtrTraits;
    6261template<typename> struct DefaultRefDerefTraits;
    6362
     
    7069template<typename> class Packed;
    7170template<typename T, size_t = alignof(T)> class PackedAlignedPtr;
    72 template<typename T, typename = DumbPtrTraits<T>> class Ref;
    73 template<typename T, typename = DumbPtrTraits<T>, typename = DefaultRefDerefTraits<T>> class RefPtr;
     71template<typename> struct RawPtrTraits;
     72template<typename T, typename = RawPtrTraits<T>> class Ref;
     73template<typename T, typename = RawPtrTraits<T>, typename = DefaultRefDerefTraits<T>> class RefPtr;
    7474template<typename> class StringBuffer;
    7575template<typename> class StringParsingBuffer;
     
    8888template<typename T, size_t inlineCapacity> struct DefaultHash<Vector<T, inlineCapacity>>;
    8989
    90 template<typename> struct DumbValueTraits;
     90template<typename> struct RawValueTraits;
    9191template<typename> struct EnumTraits;
    9292template<typename E, E...> struct EnumValues;
     
    111111using WTF::CString;
    112112using WTF::CompletionHandler;
    113 using WTF::DumbPtrTraits;
    114 using WTF::DumbValueTraits;
    115113using WTF::Function;
    116114using WTF::FunctionDispatcher;
     
    125123using WTF::OrdinalNumber;
    126124using WTF::PrintStream;
     125using WTF::RawPtrTraits;
     126using WTF::RawValueTraits;
    127127using WTF::Ref;
    128128using WTF::RefPtr;
  • TabularUnified trunk/Source/WTF/wtf/NakedRef.h

    r254241 r268993  
    2626#pragma once
    2727
    28 #include <wtf/DumbPtrTraits.h>
    2928#include <wtf/FastMalloc.h>
     29#include <wtf/RawPtrTraits.h>
    3030
    3131namespace WTF {
     
    7676    {
    7777        ASSERT(m_ptr);
    78         T& result = *DumbPtrTraits<T>::exchange(m_ptr, nullptr);
     78        T& result = *RawPtrTraits<T>::exchange(m_ptr, nullptr);
    7979        return result;
    8080    }
  • TabularUnified trunk/Source/WTF/wtf/Ref.h

    r265773 r268993  
    2727
    2828#include <wtf/Assertions.h>
    29 #include <wtf/DumbPtrTraits.h>
    3029#include <wtf/Forward.h>
    3130#include <wtf/GetPtr.h>
     31#include <wtf/RawPtrTraits.h>
    3232#include <wtf/StdLibExtras.h>
    3333#include <wtf/TypeCasts.h>
     
    4444
    4545template<typename T, typename PtrTraits> class Ref;
    46 template<typename T, typename PtrTraits = DumbPtrTraits<T>> Ref<T, PtrTraits> adoptRef(T&);
     46template<typename T, typename PtrTraits = RawPtrTraits<T>> Ref<T, PtrTraits> adoptRef(T&);
    4747
    4848template<typename T, typename Traits>
     
    217217}
    218218
    219 template<typename T, typename U, typename X, typename Y, typename = std::enable_if_t<!std::is_same<U, DumbPtrTraits<T>>::value || !std::is_same<Y, DumbPtrTraits<X>>::value>>
     219template<typename T, typename U, typename X, typename Y, typename = std::enable_if_t<!std::is_same<U, RawPtrTraits<T>>::value || !std::is_same<Y, RawPtrTraits<X>>::value>>
    220220inline void swap(Ref<T, U>& a, Ref<X, Y>& b)
    221221{
     
    236236}
    237237
    238 template<typename T, typename U = DumbPtrTraits<T>, typename X, typename Y>
     238template<typename T, typename U = RawPtrTraits<T>, typename X, typename Y>
    239239inline Ref<T, U> static_reference_cast(Ref<X, Y>& reference)
    240240{
     
    242242}
    243243
    244 template<typename T, typename U = DumbPtrTraits<T>, typename X, typename Y>
     244template<typename T, typename U = RawPtrTraits<T>, typename X, typename Y>
    245245inline Ref<T, U> static_reference_cast(Ref<X, Y>&& reference)
    246246{
     
    248248}
    249249
    250 template<typename T, typename U = DumbPtrTraits<T>, typename X, typename Y>
     250template<typename T, typename U = RawPtrTraits<T>, typename X, typename Y>
    251251inline Ref<T, U> static_reference_cast(const Ref<X, Y>& reference)
    252252{
  • TabularUnified trunk/Source/WTF/wtf/RefCountedArray.h

    r255687 r268993  
    2626#pragma once
    2727
    28 #include <wtf/DumbPtrTraits.h>
    2928#include <wtf/FastMalloc.h>
     29#include <wtf/RawPtrTraits.h>
    3030#include <wtf/StdLibExtras.h>
    3131#include <wtf/Vector.h>
     
    4646DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(RefCountedArray);
    4747
    48 template<typename T, typename PtrTraits = DumbPtrTraits<T>>
     48template<typename T, typename PtrTraits = RawPtrTraits<T>>
    4949class RefCountedArray {
    5050    enum CommonCopyConstructorTag { CommonCopyConstructor };
  • TabularUnified trunk/Source/WTF/wtf/RefPtr.h

    r267591 r268993  
    4545
    4646template<typename T, typename PtrTraits, typename RefDerefTraits> class RefPtr;
    47 template<typename T, typename PtrTraits = DumbPtrTraits<T>, typename RefDerefTraits = DefaultRefDerefTraits<T>> RefPtr<T, PtrTraits, RefDerefTraits> adoptRef(T*);
     47template<typename T, typename PtrTraits = RawPtrTraits<T>, typename RefDerefTraits = DefaultRefDerefTraits<T>> RefPtr<T, PtrTraits, RefDerefTraits> adoptRef(T*);
    4848
    4949template<typename T, typename _PtrTraits, typename _RefDerefTraits>
     
    194194}
    195195
    196 template<typename T, typename U, typename V, typename X, typename Y, typename Z, typename = std::enable_if_t<!std::is_same<U, DumbPtrTraits<T>>::value || !std::is_same<Y, DumbPtrTraits<X>>::value>>
     196template<typename T, typename U, typename V, typename X, typename Y, typename Z, typename = std::enable_if_t<!std::is_same<U, RawPtrTraits<T>>::value || !std::is_same<Y, RawPtrTraits<X>>::value>>
    197197inline void swap(RefPtr<T, U, V>& a, RefPtr<X, Y, Z>& b)
    198198{
     
    236236}
    237237
    238 template<typename T, typename U = DumbPtrTraits<T>, typename V = DefaultRefDerefTraits<T>, typename X, typename Y, typename Z>
     238template<typename T, typename U = RawPtrTraits<T>, typename V = DefaultRefDerefTraits<T>, typename X, typename Y, typename Z>
    239239inline RefPtr<T, U, V> static_pointer_cast(const RefPtr<X, Y, Z>& p)
    240240{
  • TabularUnified trunk/Source/WTF/wtf/SentinelLinkedList.h

    r245214 r268993  
    4343enum SentinelTag { Sentinel };
    4444
    45 template<typename T, typename PassedPtrTraits = DumbPtrTraits<T>>
     45template<typename T, typename PassedPtrTraits = RawPtrTraits<T>>
    4646class BasicRawSentinelNode {
    4747    WTF_MAKE_FAST_ALLOCATED;
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r268992 r268993  
     12020-10-26  Alex Christensen  <achristensen@webkit.org>
     2
     3        Inclusive software: Remove instances of "dumb" from the code
     4        https://bugs.webkit.org/show_bug.cgi?id=217778
     5
     6        Reviewed by Simon Fraser.
     7
     8        * Modules/webaudio/AudioNode.h:
     9        * dom/GCReachableRef.h:
     10        * page/EventHandler.cpp:
     11        (WebCore::EventHandler::handleDrag):
     12        * rendering/InlineFlowBox.cpp:
     13        (WebCore::InlineFlowBox::addToLine):
     14
    1152020-10-26  Fujii Hironori  <Hironori.Fujii@sony.com>
    216
  • TabularUnified trunk/Source/WebCore/Modules/webaudio/AudioNode.h

    r267744 r268993  
    283283
    284284template<typename T>
    285 using AudioConnectionRefPtr = RefPtr<T, DumbPtrTraits<T>, AudioNodeConnectionRefDerefTraits<T>>;
     285using AudioConnectionRefPtr = RefPtr<T, RawPtrTraits<T>, AudioNodeConnectionRefDerefTraits<T>>;
    286286
    287287String convertEnumerationToString(AudioNode::NodeType);
  • TabularUnified trunk/Source/WebCore/dom/GCReachableRef.h

    r264488 r268993  
    2626#pragma once
    2727
    28 #include <wtf/DumbPtrTraits.h>
    2928#include <wtf/HashCountedSet.h>
     29#include <wtf/RawPtrTraits.h>
    3030#include <wtf/RefPtr.h>
    3131
  • TabularUnified trunk/Source/WebCore/page/EventHandler.cpp

    r268476 r268993  
    39123912           
    39133913            // Yuck, a draggedImage:moveTo: message can be fired as a result of kicking off the
    3914             // drag with dragImage! Because of that dumb reentrancy, we may think we've not
     3914            // drag with dragImage! Because of that reentrancy, we may think we've not
    39153915            // started the drag when that happens. So we have to assume it's started before we kick it off.
    39163916            dragState().dataTransfer->setDragHasStarted();
  • TabularUnified trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r268862 r268993  
    136136        } else {
    137137            if (child->renderer().isLineBreak()) {
    138                 // FIXME: This is dumb. We only turn off because current layout test results expect the <br> to be 0-height on the baseline.
     138                // FIXME: This isn't ideal. We only turn off because current layout test results expect the <br> to be 0-height on the baseline.
    139139                // Other than making a zillion tests have to regenerate results, there's no reason to ditch the optimization here.
    140140                shouldClearDescendantsHaveSameLineHeightAndBaseline = child->renderer().isBR();
Note: See TracChangeset for help on using the changeset viewer.