Skip to content

Commit f16f6e4

Browse files
webkit-commit-queueConstellation
authored andcommitted
Unreviewed, reverting r262808@main.
https://bugs.webkit.org/show_bug.cgi?id=255308 Need to handle own-is-dictionary case correctly. Reverted changeset: "[JSC] Add megamorphic cache" https://bugs.webkit.org/show_bug.cgi?id=255060 https://commits.webkit.org/262808@main Canonical link: https://commits.webkit.org/262848@main
1 parent 18a93f5 commit f16f6e4

132 files changed

Lines changed: 193 additions & 1014 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎JSTests/microbenchmarks/megamorphic-miss.js‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎JSTests/microbenchmarks/megamorphic-own-load.js‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎JSTests/microbenchmarks/megamorphic-prototype-load.js‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎Source/JavaScriptCore/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,6 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
11461146
runtime/Lookup.h
11471147
runtime/MatchResult.h
11481148
runtime/MathCommon.h
1149-
runtime/MegamorphicCache.h
11501149
runtime/MemoryMode.h
11511150
runtime/MemoryStatistics.h
11521151
runtime/Microtask.h

‎Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,6 @@
19961996
E3A421431D6F58930007C617 /* PreciseJumpTargetsInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A421421D6F588F0007C617 /* PreciseJumpTargetsInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
19971997
E3AC277721FDB4940024452C /* RegExpCachedResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F75EFC151C062F007C9BA3 /* RegExpCachedResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
19981998
E3B24859291224540029C08A /* BufferMemoryHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B24857291224530029C08A /* BufferMemoryHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
1999-
E3BAEA8B29CEA43900A8E3BB /* MegamorphicCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BAEA8929CEA43800A8E3BB /* MegamorphicCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
20001999
E3BD2B7622F275020011765C /* WasmCompilationMode.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BD2B7522F275020011765C /* WasmCompilationMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
20012000
E3BF1BAE238AAEDB003A1C2B /* IsoHeapCellType.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BF1BAD238AAED1003A1C2B /* IsoHeapCellType.h */; settings = {ATTRIBUTES = (Private, ); }; };
20022001
E3BF3C4D2390D1E8008BC752 /* JSWebAssemblyGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BF3C4B2390D1E2008BC752 /* JSWebAssemblyGlobal.h */; };
@@ -5518,8 +5517,6 @@
55185517
E3A421421D6F588F0007C617 /* PreciseJumpTargetsInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreciseJumpTargetsInlines.h; sourceTree = "<group>"; };
55195518
E3B24857291224530029C08A /* BufferMemoryHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BufferMemoryHandle.h; sourceTree = "<group>"; };
55205519
E3B24858291224530029C08A /* BufferMemoryHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BufferMemoryHandle.cpp; sourceTree = "<group>"; };
5521-
E3BAEA8929CEA43800A8E3BB /* MegamorphicCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MegamorphicCache.h; sourceTree = "<group>"; };
5522-
E3BAEA8A29CEA43800A8E3BB /* MegamorphicCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MegamorphicCache.cpp; sourceTree = "<group>"; };
55235520
E3BD2B7522F275020011765C /* WasmCompilationMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmCompilationMode.h; sourceTree = "<group>"; };
55245521
E3BF1BAD238AAED1003A1C2B /* IsoHeapCellType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IsoHeapCellType.h; sourceTree = "<group>"; };
55255522
E3BF3C4B2390D1E2008BC752 /* JSWebAssemblyGlobal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSWebAssemblyGlobal.h; path = js/JSWebAssemblyGlobal.h; sourceTree = "<group>"; };
@@ -8162,8 +8159,6 @@
81628159
4340A4831A9051AF00D73CCA /* MathCommon.h */,
81638160
F692A86A0255597D01FF60F7 /* MathObject.cpp */,
81648161
F692A86B0255597D01FF60F7 /* MathObject.h */,
8165-
E3BAEA8A29CEA43800A8E3BB /* MegamorphicCache.cpp */,
8166-
E3BAEA8929CEA43800A8E3BB /* MegamorphicCache.h */,
81678162
E320B66B2912298000E87CDB /* MemoryMode.cpp */,
81688163
E320B66A2912298000E87CDB /* MemoryMode.h */,
81698164
90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */,
@@ -10970,7 +10965,6 @@
1097010965
4340A4851A9051AF00D73CCA /* MathCommon.h in Headers */,
1097110966
BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */,
1097210967
E328C6C71DA4304500D255FD /* MaxFrameExtentForSlowPathCall.h in Headers */,
10973-
E3BAEA8B29CEA43900A8E3BB /* MegamorphicCache.h in Headers */,
1097410968
E320B66C2912298100E87CDB /* MemoryMode.h in Headers */,
1097510969
90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */,
1097610970
142F16E021558802003D49C9 /* MetadataTable.h in Headers */,

‎Source/JavaScriptCore/Sources.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,6 @@ runtime/MapPrototype.cpp
968968
runtime/MatchResult.cpp
969969
runtime/MathCommon.cpp
970970
runtime/MathObject.cpp
971-
runtime/MegamorphicCache.cpp
972971
runtime/MemoryMode.cpp
973972
runtime/MemoryStatistics.cpp
974973
runtime/ModuleProgramExecutable.cpp

‎Source/JavaScriptCore/bytecode/AccessCase.cpp‎

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ AccessCase::AccessCase(VM& vm, JSCell* owner, AccessType type, CacheableIdentifi
7272
Ref<AccessCase> AccessCase::create(VM& vm, JSCell* owner, AccessType type, CacheableIdentifier identifier, PropertyOffset offset, Structure* structure, const ObjectPropertyConditionSet& conditionSet, RefPtr<PolyProtoAccessChain>&& prototypeAccessChain)
7373
{
7474
switch (type) {
75-
case LoadMegamorphic:
7675
case InHit:
7776
case InMiss:
7877
case DeleteNonConfigurable:
@@ -138,22 +137,7 @@ Ref<AccessCase> AccessCase::create(VM& vm, JSCell* owner, AccessType type, Cache
138137
case IndexedResizableTypedArrayFloat64Store:
139138
RELEASE_ASSERT(!prototypeAccessChain);
140139
break;
141-
case Load:
142-
case Miss:
143-
case Delete:
144-
case Transition:
145-
case GetGetter:
146-
case Getter:
147-
case Setter:
148-
case CustomValueGetter:
149-
case CustomValueSetter:
150-
case CustomAccessorGetter:
151-
case CustomAccessorSetter:
152-
case IntrinsicGetter:
153-
case InstanceOfHit:
154-
case InstanceOfMiss:
155-
case CheckPrivateBrand:
156-
case SetPrivateBrand:
140+
default:
157141
RELEASE_ASSERT_NOT_REACHED();
158142
};
159143

@@ -337,7 +321,6 @@ bool AccessCase::guardedByStructureCheckSkippingConstantIdentifierCheck() const
337321
return false;
338322

339323
switch (m_type) {
340-
case LoadMegamorphic:
341324
case ArrayLength:
342325
case StringLength:
343326
case DirectArgumentsLength:
@@ -397,36 +380,16 @@ bool AccessCase::guardedByStructureCheckSkippingConstantIdentifierCheck() const
397380
case IndexedResizableTypedArrayFloat32Store:
398381
case IndexedResizableTypedArrayFloat64Store:
399382
return false;
400-
case Load:
401-
case Miss:
402-
case Delete:
403-
case DeleteNonConfigurable:
404-
case DeleteMiss:
405-
case Replace:
406383
case IndexedNoIndexingMiss:
407-
case Transition:
408-
case GetGetter:
409-
case Getter:
410-
case Setter:
411-
case CustomValueGetter:
412-
case CustomValueSetter:
413-
case CustomAccessorGetter:
414-
case CustomAccessorSetter:
415-
case InHit:
416-
case InMiss:
417-
case IntrinsicGetter:
418-
case CheckPrivateBrand:
419-
case SetPrivateBrand:
384+
default:
420385
return true;
421386
}
422-
RELEASE_ASSERT_NOT_REACHED();
423387
}
424388

425389
bool AccessCase::requiresIdentifierNameMatch() const
426390
{
427391
switch (m_type) {
428392
case Load:
429-
case LoadMegamorphic:
430393
// We don't currently have a by_val for these puts, but we do care about the identifier.
431394
case Transition:
432395
case Delete:
@@ -515,7 +478,6 @@ bool AccessCase::requiresInt32PropertyCheck() const
515478
{
516479
switch (m_type) {
517480
case Load:
518-
case LoadMegamorphic:
519481
case Transition:
520482
case Delete:
521483
case DeleteNonConfigurable:
@@ -603,7 +565,6 @@ bool AccessCase::needsScratchFPR() const
603565
{
604566
switch (m_type) {
605567
case Load:
606-
case LoadMegamorphic:
607568
case Transition:
608569
case Delete:
609570
case DeleteNonConfigurable:
@@ -744,7 +705,6 @@ void AccessCase::forEachDependentCell(VM&, const Functor& functor) const
744705
case CustomAccessorGetter:
745706
case CustomAccessorSetter:
746707
case Load:
747-
case LoadMegamorphic:
748708
case Transition:
749709
case Delete:
750710
case DeleteNonConfigurable:
@@ -839,7 +799,6 @@ bool AccessCase::doesCalls(VM& vm, Vector<JSCell*>* cellsToMarkIfDoesCalls) cons
839799
case DeleteNonConfigurable:
840800
case DeleteMiss:
841801
case Load:
842-
case LoadMegamorphic:
843802
case Miss:
844803
case GetGetter:
845804
case InHit:
@@ -963,7 +922,6 @@ bool AccessCase::canReplace(const AccessCase& other) const
963922
};
964923

965924
switch (type()) {
966-
case LoadMegamorphic:
967925
case IndexedInt32Load:
968926
case IndexedDoubleLoad:
969927
case IndexedContiguousLoad:
@@ -1171,7 +1129,6 @@ template<typename Func>
11711129
inline void AccessCase::runWithDowncast(const Func& func)
11721130
{
11731131
switch (m_type) {
1174-
case LoadMegamorphic:
11751132
case Transition:
11761133
case Delete:
11771134
case DeleteNonConfigurable:
@@ -1309,7 +1266,6 @@ bool AccessCase::canBeShared(const AccessCase& lhs, const AccessCase& rhs)
13091266

13101267
switch (lhs.m_type) {
13111268
case Load:
1312-
case LoadMegamorphic:
13131269
case Transition:
13141270
case Delete:
13151271
case DeleteNonConfigurable:

‎Source/JavaScriptCore/bytecode/AccessCase.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(AccessCase);
9191

9292
#define JSC_FOR_EACH_ACCESS_TYPE(macro) \
9393
macro(Load) \
94-
macro(LoadMegamorphic) \
9594
macro(Transition) \
9695
macro(Delete) \
9796
macro(DeleteNonConfigurable) \

‎Source/JavaScriptCore/bytecode/CheckPrivateBrandStatus.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ CheckPrivateBrandStatus::CheckPrivateBrandStatus(StubInfoSummary summary, Struct
7575
m_state = NoInformation;
7676
return;
7777
case StubInfoSummary::Simple:
78-
case StubInfoSummary::Megamorphic:
7978
case StubInfoSummary::MakesCalls:
8079
case StubInfoSummary::TakesSlowPathAndMakesCalls:
8180
RELEASE_ASSERT_NOT_REACHED();

‎Source/JavaScriptCore/bytecode/DeleteByStatus.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ DeleteByStatus::DeleteByStatus(StubInfoSummary summary, StructureStubInfo& stubI
7474
m_state = NoInformation;
7575
return;
7676
case StubInfoSummary::Simple:
77-
case StubInfoSummary::Megamorphic:
7877
case StubInfoSummary::MakesCalls:
7978
case StubInfoSummary::TakesSlowPathAndMakesCalls:
8079
RELEASE_ASSERT_NOT_REACHED();

0 commit comments

Comments
 (0)