Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit cdc6eee

Browse files
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: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent db3c95c commit cdc6eee

34 files changed

+132
-63
lines changed

Source/JavaScriptCore/ChangeLog

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
2020-10-26 Alex Christensen <[email protected]>
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+
135
2020-10-26 Sam Weinig <[email protected]>
236

337
JSC special function forward declarations (e.g. JSC_DECLARE_HOST_FUNCTION) that are internal to a cpp file should be declared with static to avoid external linkage

Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ void SpeculativeJIT::emitCall(Node* node)
824824
m_jit.addPtr(TrustedImm32(requiredBytes), JITCompiler::stackPointerRegister);
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);
830830
setResultAndResetStack();

Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ void SpeculativeJIT::emitCall(Node* node)
816816
// This is the part where we meant to make a normal call. Oops.
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);
822822
setResultAndResetStack();

Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10610,7 +10610,7 @@ class LowerDFGToB3 {
1061010610

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);
1061610616
jit.addPtr(
@@ -17948,7 +17948,7 @@ class LowerDFGToB3 {
1794817948
LValue unboxBoolean(LValue jsValue)
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
}
1795417954
LValue boxBoolean(LValue value)

Source/JavaScriptCore/heap/SlotVisitor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class SlotVisitor {
9191
template<typename T, typename Traits> void append(const WriteBarrierBase<T, Traits>&);
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
9898
// for:

Source/JavaScriptCore/jit/AssemblyHelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ void AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer(EntryFra
642642
#endif
643643
}
644644

645-
void AssemblyHelpers::emitDumbVirtualCall(VM& vm, JSGlobalObject* globalObject, CallLinkInfo* info)
645+
void AssemblyHelpers::emitVirtualCall(VM& vm, JSGlobalObject* globalObject, CallLinkInfo* info)
646646
{
647647
move(TrustedImmPtr(info), GPRInfo::regT2);
648648
move(TrustedImmPtr(globalObject), GPRInfo::regT3);

Source/JavaScriptCore/jit/AssemblyHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,7 @@ class AssemblyHelpers : public MacroAssembler {
19381938
functor(TypeofType::Undefined, true);
19391939
}
19401940

1941-
void emitDumbVirtualCall(VM&, JSGlobalObject*, CallLinkInfo*);
1941+
void emitVirtualCall(VM&, JSGlobalObject*, CallLinkInfo*);
19421942

19431943
void makeSpaceOnStackForCCall();
19441944
void reclaimSpaceOnStackForCCall();

Source/JavaScriptCore/jit/JITCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void JIT::compileCallEvalSlowCase(const Instruction* instruction, Vector<SlowCas
158158
addPtr(TrustedImm32(registerOffset * sizeof(Register) + sizeof(CallerFrameAndPC)), callFrameRegister, stackPointerRegister);
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();
164164

Source/JavaScriptCore/jit/JITCall32_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void JIT::compileCallEvalSlowCase(const Instruction* instruction, Vector<SlowCas
260260
addPtr(TrustedImm32(registerOffset * sizeof(Register) + sizeof(CallerFrameAndPC)), callFrameRegister, stackPointerRegister);
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();
266266

Source/JavaScriptCore/runtime/CachedTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ ptrdiff_t CachedPtrOffsets::offsetOffset()
533533
return OBJECT_OFFSETOF(CachedPtr<void>, m_offset);
534534
}
535535

536-
template<typename T, typename Source = SourceType<T>, typename PtrTraits = DumbPtrTraits<Source>>
536+
template<typename T, typename Source = SourceType<T>, typename PtrTraits = RawPtrTraits<Source>>
537537
class CachedRefPtr : public CachedObject<RefPtr<Source, PtrTraits>> {
538538
public:
539539
void encode(Encoder& encoder, const Source* src)

0 commit comments

Comments
 (0)