Skip to content

Commit

Permalink
Unreviewed, reverting 264134@main.
Browse files Browse the repository at this point in the history
  • Loading branch information
webkit-commit-queue authored and Constellation committed May 17, 2023
1 parent 3c10a48 commit 7b574a2
Show file tree
Hide file tree
Showing 62 changed files with 521 additions and 1,567 deletions.
19 changes: 0 additions & 19 deletions JSTests/microbenchmarks/megamorphic-store-by-val.js

This file was deleted.

17 changes: 0 additions & 17 deletions JSTests/microbenchmarks/megamorphic-store.js

This file was deleted.

44 changes: 0 additions & 44 deletions JSTests/stress/put-by-id-megamorphic-have-a-bad-time.js

This file was deleted.

22 changes: 11 additions & 11 deletions Source/JavaScriptCore/JavaScriptCore.order
Expand Up @@ -2505,7 +2505,7 @@ __ZN3JSC3DFGL21linkForThunkGeneratorEPNS_2VMENS_22CodeSpecializationKindE
__ZN3JSC3DFGL11slowPathForERNS0_12CCallHelpersEPNS_2VMEPFPcPNS_9ExecStateEE
_operationLinkCall
_linkFor
_operationPutByValSloppy
_operationPutByValNonStrict
_operationCompareEq
_operationGetByVal
__ZN3JSC3DFG10dfgLinkForEPNS_9ExecStateERNS_12CallLinkInfoEPNS_9CodeBlockEPNS_10JSFunctionENS_21MacroAssemblerCodePtrENS_22CodeSpecializationKindE
Expand Down Expand Up @@ -2917,10 +2917,10 @@ __ZN3JSC3DFG14SpeculativeJIT13callOperationEPFPNS_6JSCellEPNS_9ExecStateEPNS_8JS
__ZN3JSC3DFG14SpeculativeJIT13callOperationEPFvPNS_9ExecStateExPNS_6JSCellEPNS_10IdentifierEENS_12X86Registers10RegisterIDESB_S7_
__ZNK3JSC3DFG21CallSlowPathGeneratorINS_22AbstractMacroAssemblerINS_12X86AssemblerEE4JumpEPFvPNS_9ExecStateExPNS_6JSCellEPNS_10IdentifierEENS0_11NoResultTagEE4callEv
_operationToString
_operationPutByIdSloppyOptimize
_operationPutByIdSloppyOptimizeWithReturnAddress
_operationPutByIdNonStrictOptimize
_operationPutByIdNonStrictOptimizeWithReturnAddress
__ZN3JSC3DFG17dfgRepatchPutByIDEPNS_9ExecStateENS_7JSValueERKNS_10IdentifierERKNS_15PutPropertySlotERNS_17StructureStubInfoENS_7PutKindE
_operationPutByIdSloppy
_operationPutByIdNonStrict
__ZN3WTF20ThreadIdentifierData8destructEPv
__ZN3WTF13threadDidExitEj
__ZN3WTF20TCMalloc_ThreadCache18DestroyThreadCacheEPv
Expand Down Expand Up @@ -3407,8 +3407,8 @@ __ZN3JSC3DFG15AssemblyHelpers11unboxDoubleENS_12X86Registers10RegisterIDENS2_13X
__ZN3JSC3DFG14SpeculativeJIT20compileDoubleCompareEPNS0_4NodeENS_23MacroAssemblerX86Common15DoubleConditionE
__ZN3JSC3DFG14SpeculativeJIT19fillSpeculateDoubleENS0_4EdgeE
_operationMakeRope2
_operationPutByIdSloppyBuildList
_operationPutByIdSloppyBuildListWithReturnAddress
_operationPutByIdNonStrictBuildList
_operationPutByIdNonStrictBuildListWithReturnAddress
__ZN3JSC3DFG19dfgBuildPutByIdListEPNS_9ExecStateENS_7JSValueERKNS_10IdentifierERKNS_15PutPropertySlotERNS_17StructureStubInfoENS_7PutKindE
__ZN3JSC22PolymorphicPutByIdList4fromENS_7PutKindERNS_17StructureStubInfoENS_21MacroAssemblerCodePtrE
__ZN3JSC22PolymorphicPutByIdListC2ENS_7PutKindERNS_17StructureStubInfoENS_21MacroAssemblerCodePtrE
Expand Down Expand Up @@ -3585,7 +3585,7 @@ __ZN3WTF17double_conversionL21GenerateCountedDigitsEiPiPNS0_6BignumES3_NS0_15Buf
__ZN3WTF17double_conversion6Bignum21DivideModuloIntBignumERKS1_
__ZN3WTF17double_conversion6Bignum13SubtractTimesERKS1_i
__ZN3WTF17double_conversion6Bignum14SubtractBignumERKS1_
_operationPutByValBeyondArrayBoundsSloppy
_operationPutByValBeyondArrayBoundsNonStrict
__ZN3JSC8JSObject16putByIndexInlineEPNS_9ExecStateEjNS_7JSValueEb
__ZN3JSC3JIT25emit_op_resolve_with_baseEPNS_11InstructionE
__ZN3JSC3JIT29emitSlow_op_resolve_with_baseEPNS_11InstructionERPNS_13SlowCaseEntryE
Expand Down Expand Up @@ -3763,9 +3763,9 @@ __ZN3JSCL24dateProtoFuncGetFullYearEPNS_9ExecStateE
__ZN3JSCL24dateProtoFuncSetFullYearEPNS_9ExecStateE
__ZN3JSCL23setNewValueFromDateArgsEPNS_9ExecStateEib
__ZN3JSC9CodeBlock26findClosureCallForReturnPCENS_16ReturnAddressPtrE
_operationPutByIdDirectSloppyOptimize
_operationPutByIdDirectSloppyOptimizeWithReturnAddress
_operationPutByIdDirectSloppy
_operationPutByIdDirectNonStrictOptimize
_operationPutByIdDirectNonStrictOptimizeWithReturnAddress
_operationPutByIdDirectNonStrict
__ZN3WTF6VectorIN3JSC13PutByIdAccessELm2ENS_15CrashOnOverflowEE15reserveCapacityEm
__ZN3JSC3DFG15dfgResetPutByIDERNS_13RepatchBufferERNS_17StructureStubInfoE
__ZN3JSCL18arrayProtoFuncSomeEPNS_9ExecStateE
Expand Down Expand Up @@ -4802,7 +4802,7 @@ _JSStringGetLength
__ZN3JSC5LexerItE23parseIdentifierSlowCaseILb1EEENS_11JSTokenTypeEPNS_11JSTokenDataEjb
__ZN3WTF6VectorIN3JSC10LabelScopeELm8ENS_15CrashOnOverflowEE15reserveCapacityEm
__ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE11getCallDataEPNS_6JSCellERNS_8CallDataE
_operationPutDoubleByValBeyondArrayBoundsSloppy
_operationPutDoubleByValBeyondArrayBoundsNonStrict
_JSStringGetMaximumUTF8CStringSize
__ZN3JSC15constructStringEPNS_9ExecStateEPNS_14JSGlobalObjectENS_7JSValueE
__ZN3WTF17charactersToFloatEPKtmRm
Expand Down
Expand Up @@ -443,6 +443,7 @@
0F9DAA0A1FD1C3D30079C5B2 /* ParallelSourceAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9DAA081FD1C3C80079C5B2 /* ParallelSourceAdapter.h */; };
0F9E32641B05AB0400801ED5 /* DFGStoreBarrierInsertionPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9E32621B05AB0400801ED5 /* DFGStoreBarrierInsertionPhase.h */; };
0F9FB4F517FCB91700CB67F8 /* DFGStackLayoutPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9FB4F317FCB91700CB67F8 /* DFGStackLayoutPhase.h */; };
0F9FC8C514E1B60400D52AE0 /* PutKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9FC8C114E1B5FB00D52AE0 /* PutKind.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FA2C17C17D7CF84009D015F /* TestRunnerUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA2C17A17D7CF84009D015F /* TestRunnerUtils.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FA581BB150E953000B9A2D9 /* DFGNodeFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA581B8150E952A00B9A2D9 /* DFGNodeFlags.h */; };
0FA581BC150E953000B9A2D9 /* DFGNodeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA581B9150E952A00B9A2D9 /* DFGNodeType.h */; };
Expand Down Expand Up @@ -2979,6 +2980,7 @@
0F9E32621B05AB0400801ED5 /* DFGStoreBarrierInsertionPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStoreBarrierInsertionPhase.h; path = dfg/DFGStoreBarrierInsertionPhase.h; sourceTree = "<group>"; };
0F9FB4F217FCB91700CB67F8 /* DFGStackLayoutPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGStackLayoutPhase.cpp; path = dfg/DFGStackLayoutPhase.cpp; sourceTree = "<group>"; };
0F9FB4F317FCB91700CB67F8 /* DFGStackLayoutPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStackLayoutPhase.h; path = dfg/DFGStackLayoutPhase.h; sourceTree = "<group>"; };
0F9FC8C114E1B5FB00D52AE0 /* PutKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PutKind.h; sourceTree = "<group>"; };
0FA1265320C8DB98004B0D11 /* StubInfoSummary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StubInfoSummary.cpp; sourceTree = "<group>"; };
0FA2C17917D7CF84009D015F /* TestRunnerUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestRunnerUtils.cpp; sourceTree = "<group>"; };
0FA2C17A17D7CF84009D015F /* TestRunnerUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestRunnerUtils.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -9074,6 +9076,7 @@
0F93329A14CA7DC10085F3C6 /* PutByStatus.h */,
0F93B4A718B92C4D00178A3F /* PutByVariant.cpp */,
0F93B4A818B92C4D00178A3F /* PutByVariant.h */,
0F9FC8C114E1B5FB00D52AE0 /* PutKind.h */,
0F44A7AD20BF685F0022B171 /* RecordedStatuses.cpp */,
0F44A7AA20BF685E0022B171 /* RecordedStatuses.h */,
0FF60ABF16740F8100029779 /* ReduceWhitespace.cpp */,
Expand Down Expand Up @@ -10970,6 +10973,7 @@
0F9332A414CA7DD90085F3C6 /* PutByStatus.h in Headers */,
0F93B4AA18B92C4D00178A3F /* PutByVariant.h in Headers */,
0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */,
0F9FC8C514E1B60400D52AE0 /* PutKind.h in Headers */,
147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */,
E33A94962255323000D42B06 /* RandomizingFuzzerAgent.h in Headers */,
0F44A7B320BF68D10022B171 /* RecordedStatuses.h in Headers */,
Expand Down
20 changes: 0 additions & 20 deletions Source/JavaScriptCore/bytecode/AccessCase.cpp
Expand Up @@ -73,7 +73,6 @@ Ref<AccessCase> AccessCase::create(VM& vm, JSCell* owner, AccessType type, Cache
{
switch (type) {
case LoadMegamorphic:
case StoreMegamorphic:
case InHit:
case InMiss:
case DeleteNonConfigurable:
Expand All @@ -91,7 +90,6 @@ Ref<AccessCase> AccessCase::create(VM& vm, JSCell* owner, AccessType type, Cache
case InstanceOfGeneric:
case IndexedProxyObjectLoad:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -342,7 +340,6 @@ bool AccessCase::guardedByStructureCheckSkippingConstantIdentifierCheck() const

switch (m_type) {
case LoadMegamorphic:
case StoreMegamorphic:
case ArrayLength:
case StringLength:
case DirectArgumentsLength:
Expand All @@ -356,7 +353,6 @@ bool AccessCase::guardedByStructureCheckSkippingConstantIdentifierCheck() const
case InstanceOfGeneric:
case IndexedProxyObjectLoad:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -435,7 +431,6 @@ bool AccessCase::requiresIdentifierNameMatch() const
switch (m_type) {
case Load:
case LoadMegamorphic:
case StoreMegamorphic:
// We don't currently have a by_val for these puts, but we do care about the identifier.
case Transition:
case Delete:
Expand Down Expand Up @@ -469,7 +464,6 @@ bool AccessCase::requiresIdentifierNameMatch() const
case InstanceOfGeneric:
case IndexedProxyObjectLoad:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -528,7 +522,6 @@ bool AccessCase::requiresInt32PropertyCheck() const
switch (m_type) {
case Load:
case LoadMegamorphic:
case StoreMegamorphic:
case Transition:
case Delete:
case DeleteNonConfigurable:
Expand Down Expand Up @@ -560,7 +553,6 @@ bool AccessCase::requiresInt32PropertyCheck() const
case SetPrivateBrand:
case IndexedProxyObjectLoad:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
return false;
case IndexedInt32Load:
case IndexedDoubleLoad:
Expand Down Expand Up @@ -620,7 +612,6 @@ bool AccessCase::needsScratchFPR() const
switch (m_type) {
case Load:
case LoadMegamorphic:
case StoreMegamorphic:
case Transition:
case Delete:
case DeleteNonConfigurable:
Expand Down Expand Up @@ -651,7 +642,6 @@ bool AccessCase::needsScratchFPR() const
case InstanceOfGeneric:
case IndexedProxyObjectLoad:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedContiguousLoad:
case IndexedArrayStorageLoad:
Expand Down Expand Up @@ -766,7 +756,6 @@ void AccessCase::forEachDependentCell(VM&, const Functor& functor) const
case CustomAccessorSetter:
case Load:
case LoadMegamorphic:
case StoreMegamorphic:
case Transition:
case Delete:
case DeleteNonConfigurable:
Expand All @@ -784,7 +773,6 @@ void AccessCase::forEachDependentCell(VM&, const Functor& functor) const
case ScopedArgumentsLength:
case InstanceOfGeneric:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -865,7 +853,6 @@ bool AccessCase::doesCalls(VM& vm, Vector<JSCell*>* cellsToMarkIfDoesCalls) cons
case DeleteMiss:
case Load:
case LoadMegamorphic:
case StoreMegamorphic:
case Miss:
case GetGetter:
case InHit:
Expand All @@ -881,7 +868,6 @@ bool AccessCase::doesCalls(VM& vm, Vector<JSCell*>* cellsToMarkIfDoesCalls) cons
case InstanceOfMiss:
case InstanceOfGeneric:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -992,9 +978,7 @@ bool AccessCase::canReplace(const AccessCase& other) const

switch (type()) {
case LoadMegamorphic:
case StoreMegamorphic:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -1204,7 +1188,6 @@ inline void AccessCase::runWithDowncast(const Func& func)
{
switch (m_type) {
case LoadMegamorphic:
case StoreMegamorphic:
case Transition:
case Delete:
case DeleteNonConfigurable:
Expand All @@ -1219,7 +1202,6 @@ inline void AccessCase::runWithDowncast(const Func& func)
case CheckPrivateBrand:
case SetPrivateBrand:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down Expand Up @@ -1346,7 +1328,6 @@ bool AccessCase::canBeShared(const AccessCase& lhs, const AccessCase& rhs)
switch (lhs.m_type) {
case Load:
case LoadMegamorphic:
case StoreMegamorphic:
case Transition:
case Delete:
case DeleteNonConfigurable:
Expand All @@ -1363,7 +1344,6 @@ bool AccessCase::canBeShared(const AccessCase& lhs, const AccessCase& rhs)
case CheckPrivateBrand:
case SetPrivateBrand:
case IndexedMegamorphicLoad:
case IndexedMegamorphicStore:
case IndexedInt32Load:
case IndexedDoubleLoad:
case IndexedContiguousLoad:
Expand Down
2 changes: 0 additions & 2 deletions Source/JavaScriptCore/bytecode/AccessCase.h
Expand Up @@ -95,7 +95,6 @@ DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(AccessCase);
macro(Load) \
macro(LoadMegamorphic) \
macro(Transition) \
macro(StoreMegamorphic) \
macro(Delete) \
macro(DeleteNonConfigurable) \
macro(DeleteMiss) \
Expand Down Expand Up @@ -152,7 +151,6 @@ DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(AccessCase);
macro(IndexedResizableTypedArrayFloat64Load) \
macro(IndexedStringLoad) \
macro(IndexedNoIndexingMiss) \
macro(IndexedMegamorphicStore) \
macro(IndexedInt32Store) \
macro(IndexedDoubleStore) \
macro(IndexedContiguousStore) \
Expand Down
14 changes: 14 additions & 0 deletions Source/JavaScriptCore/bytecode/GetByStatus.cpp
Expand Up @@ -217,6 +217,20 @@ GetByStatus::GetByStatus(const ProxyObjectAccessCase&)
{
}

static bool isSameStyledCodeOrigin(CodeOrigin lhs, CodeOrigin rhs)
{
while (true) {
if (lhs.bytecodeIndex() != rhs.bytecodeIndex())
return false;
if (!!lhs.inlineCallFrame() != !!rhs.inlineCallFrame())
return false;
if (!lhs.inlineCallFrame())
return true;
lhs = lhs.inlineCallFrame()->directCaller;
rhs = rhs.inlineCallFrame()->directCaller;
}
}

GetByStatus GetByStatus::computeForStubInfoWithoutExitSiteFeedback(const ConcurrentJSLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo, CallLinkStatus::ExitSiteData callExitSiteData, CodeOrigin codeOrigin)
{
StubInfoSummary summary = StructureStubInfo::summary(profiledBlock->vm(), stubInfo);
Expand Down

0 comments on commit 7b574a2

Please sign in to comment.