Skip to content

Commit 64dfd00

Browse files
committed
[JSC] Implement JIT ICs for InByVal
https://bugs.webkit.org/show_bug.cgi?id=226563 Reviewed by Saam Barati. JSTests: * microbenchmarks/in-by-val-int32.js: Added. * microbenchmarks/in-by-val-string-index.js: Added. * microbenchmarks/in-by-val-symbol.js: Added. Source/JavaScriptCore: Until now, InByVal has had few optimizations implemented: DFG would attempt to convert string index lookups to InById and int32 lookups to HasIndexedProperty, but there has been no inline caching nor any special handling for symbol lookups. This has become a more urgent problem now, as `#x in obj` (i.e. HasPrivateName / HasPrivateBrand) will need to mimic InByVal's inline caching strategy in order to be deemed performant enough to ship. This patch thus implements inline caching for InByVal at all JIT tiers. The result is a night-and-day difference for symbols, a nice boost for string indices, and no change for int32s: in-by-val-symbol 203.5572+-2.7647 ^ 19.1035+-0.7498 ^ definitely 10.6555x faster in-by-val-string-index 87.0368+-44.7766 45.9971+-32.0007 might be 1.8922x faster in-by-val-int32 110.9904+-1.7109 ? 111.3431+-1.7558 ? * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * bytecode/CheckPrivateBrandStatus.cpp: (JSC::CheckPrivateBrandStatus::singleIdentifier const): * bytecode/DeleteByStatus.cpp: (JSC::DeleteByStatus::singleIdentifier const): * bytecode/GetByStatus.cpp: (JSC::GetByStatus::singleIdentifier const): * bytecode/ICStatusMap.h: * bytecode/ICStatusUtils.h: (JSC::singleIdentifierForICStatus): * bytecode/InByIdVariant.cpp: (JSC::InByIdVariant::InByIdVariant): (JSC::InByIdVariant::attemptToMerge): (JSC::InByIdVariant::dumpInContext const): * bytecode/InByIdVariant.h: (JSC::InByIdVariant::identifier const): (JSC::InByIdVariant::overlaps): * bytecode/InByStatus.cpp: Renamed from Source/JavaScriptCore/bytecode/InByIdStatus.cpp. (JSC::InByStatus::appendVariant): (JSC::InByStatus::shrinkToFit): (JSC::InByStatus::computeFor): (JSC::InByStatus::computeForStubInfo): (JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback): (JSC::InByStatus::merge): (JSC::InByStatus::filter): (JSC::InByStatus::markIfCheap): (JSC::InByStatus::finalize): (JSC::InByStatus::singleIdentifier const): (JSC::InByStatus::dump const): * bytecode/InByStatus.h: Renamed from Source/JavaScriptCore/bytecode/InByIdStatus.h. * bytecode/RecordedStatuses.cpp: (JSC::RecordedStatuses::addInByStatus): Renamed from addInByIdStatus. * bytecode/RecordedStatuses.h: * bytecode/SetPrivateBrandStatus.cpp: (JSC::SetPrivateBrandStatus::singleIdentifier const): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::reset): * bytecode/StructureStubInfo.h: * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): (JSC::DFG::AbstractInterpreter<AbstractStateType>::filterICStatus): * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleInById): (JSC::DFG::ByteCodeParser::parseBlock): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGClobbersExitState.cpp: (JSC::DFG::clobbersExitState): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::link): * dfg/DFGJITCompiler.h: (JSC::DFG::JITCompiler::addInByVal): * dfg/DFGMayExit.cpp: * dfg/DFGNode.h: (JSC::DFG::Node::hasInByStatus): Renamed from hasInByIdStatus. (JSC::DFG::Node::inByStatus): Renamed from inByIdStatus. * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPredictionPropagationPhase.cpp: * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileInByVal): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGVarargsForwardingPhase.cpp: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileInBy): (JSC::FTL::DFG::LowerDFGToB3::compileInById): (JSC::FTL::DFG::LowerDFGToB3::compileInByVal): * jit/ICStats.h: * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases): (JSC::JIT::link): * jit/JIT.h: * jit/JITInlineCacheGenerator.cpp: (JSC::JITInByValGenerator::JITInByValGenerator): (JSC::JITInByValGenerator::generateFastPath): (JSC::JITInByValGenerator::finalize): (JSC::JITInByIdGenerator::JITInByIdGenerator): * jit/JITInlineCacheGenerator.h: (JSC::JITDelByIdGenerator::slowPathJump const): (JSC::JITInByValGenerator::JITInByValGenerator): (JSC::JITInByValGenerator::slowPathJump const): * jit/JITOperations.cpp: (JSC::JSC_DEFINE_JIT_OPERATION): * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_in_by_val): (JSC::JIT::emitSlow_op_in_by_val): * jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_in_by_val): (JSC::JIT::emitSlow_op_in_by_val): * jit/Repatch.cpp: (JSC::tryCacheInBy): Renamed from tryCacheInByID. (JSC::repatchInBy): Renamed from repatchInByID. (JSC::resetInBy): Renamed from resetInByID. * jit/Repatch.h: * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): * llint/LLIntSlowPaths.h: * llint/LowLevelInterpreter.asm: * runtime/CommonSlowPaths.cpp: * runtime/CommonSlowPaths.h: Canonical link: https://commits.webkit.org/238465@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 289e58e commit 64dfd00

59 files changed

Lines changed: 799 additions & 277 deletions

Some content is hidden

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

‎JSTests/ChangeLog‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2021-06-03 Ross Kirsling <ross.kirsling@sony.com>
2+
3+
[JSC] Implement JIT ICs for InByVal
4+
https://bugs.webkit.org/show_bug.cgi?id=226563
5+
6+
Reviewed by Saam Barati.
7+
8+
* microbenchmarks/in-by-val-int32.js: Added.
9+
* microbenchmarks/in-by-val-string-index.js: Added.
10+
* microbenchmarks/in-by-val-symbol.js: Added.
11+
112
2021-06-03 Mark Lam <mark.lam@apple.com>
213

314
Fix an ASSERT in objectPrototypeHasOwnProperty() to account for TerminationException.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
2+
function test(object)
3+
{
4+
if (1 in object)
5+
return object[1];
6+
return 0;
7+
}
8+
noInline(test);
9+
10+
var o1 = [42];
11+
var o2 = [42, 41];
12+
13+
for (var i = 0; i < 1e6; ++i) {
14+
test(o1);
15+
test(o2);
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
2+
function test(object)
3+
{
4+
if ('1' in object)
5+
return object[1];
6+
return 0;
7+
}
8+
noInline(test);
9+
10+
var o1 = [42];
11+
var o2 = [42, 41];
12+
13+
for (var i = 0; i < 1e6; ++i) {
14+
test(o1);
15+
test(o2);
16+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
2+
const cocoaSymbol = Symbol('cocoa');
3+
const cappuccinoSymbol = Symbol('cappuccino');
4+
5+
function test(object)
6+
{
7+
if (cocoaSymbol in object)
8+
return object[cocoaSymbol];
9+
return 0;
10+
}
11+
noInline(test);
12+
13+
var o1 = {
14+
[cocoaSymbol]: 42
15+
};
16+
var o2 = {
17+
[cappuccinoSymbol]: 41
18+
};
19+
20+
for (var i = 0; i < 1e6; ++i) {
21+
test(o1);
22+
test(o2);
23+
}

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,143 @@
1+
2021-06-03 Ross Kirsling <ross.kirsling@sony.com>
2+
3+
[JSC] Implement JIT ICs for InByVal
4+
https://bugs.webkit.org/show_bug.cgi?id=226563
5+
6+
Reviewed by Saam Barati.
7+
8+
Until now, InByVal has had few optimizations implemented:
9+
DFG would attempt to convert string index lookups to InById and int32 lookups to HasIndexedProperty,
10+
but there has been no inline caching nor any special handling for symbol lookups.
11+
12+
This has become a more urgent problem now, as `#x in obj` (i.e. HasPrivateName / HasPrivateBrand)
13+
will need to mimic InByVal's inline caching strategy in order to be deemed performant enough to ship.
14+
15+
This patch thus implements inline caching for InByVal at all JIT tiers.
16+
The result is a night-and-day difference for symbols, a nice boost for string indices, and no change for int32s:
17+
18+
in-by-val-symbol 203.5572+-2.7647 ^ 19.1035+-0.7498 ^ definitely 10.6555x faster
19+
in-by-val-string-index 87.0368+-44.7766 45.9971+-32.0007 might be 1.8922x faster
20+
in-by-val-int32 110.9904+-1.7109 ? 111.3431+-1.7558 ?
21+
22+
* JavaScriptCore.xcodeproj/project.pbxproj:
23+
* Sources.txt:
24+
* bytecode/CheckPrivateBrandStatus.cpp:
25+
(JSC::CheckPrivateBrandStatus::singleIdentifier const):
26+
* bytecode/DeleteByStatus.cpp:
27+
(JSC::DeleteByStatus::singleIdentifier const):
28+
* bytecode/GetByStatus.cpp:
29+
(JSC::GetByStatus::singleIdentifier const):
30+
* bytecode/ICStatusMap.h:
31+
* bytecode/ICStatusUtils.h:
32+
(JSC::singleIdentifierForICStatus):
33+
* bytecode/InByIdVariant.cpp:
34+
(JSC::InByIdVariant::InByIdVariant):
35+
(JSC::InByIdVariant::attemptToMerge):
36+
(JSC::InByIdVariant::dumpInContext const):
37+
* bytecode/InByIdVariant.h:
38+
(JSC::InByIdVariant::identifier const):
39+
(JSC::InByIdVariant::overlaps):
40+
* bytecode/InByStatus.cpp: Renamed from Source/JavaScriptCore/bytecode/InByIdStatus.cpp.
41+
(JSC::InByStatus::appendVariant):
42+
(JSC::InByStatus::shrinkToFit):
43+
(JSC::InByStatus::computeFor):
44+
(JSC::InByStatus::computeForStubInfo):
45+
(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
46+
(JSC::InByStatus::merge):
47+
(JSC::InByStatus::filter):
48+
(JSC::InByStatus::markIfCheap):
49+
(JSC::InByStatus::finalize):
50+
(JSC::InByStatus::singleIdentifier const):
51+
(JSC::InByStatus::dump const):
52+
* bytecode/InByStatus.h: Renamed from Source/JavaScriptCore/bytecode/InByIdStatus.h.
53+
* bytecode/RecordedStatuses.cpp:
54+
(JSC::RecordedStatuses::addInByStatus): Renamed from addInByIdStatus.
55+
* bytecode/RecordedStatuses.h:
56+
* bytecode/SetPrivateBrandStatus.cpp:
57+
(JSC::SetPrivateBrandStatus::singleIdentifier const):
58+
* bytecode/StructureStubInfo.cpp:
59+
(JSC::StructureStubInfo::reset):
60+
* bytecode/StructureStubInfo.h:
61+
* dfg/DFGAbstractInterpreterInlines.h:
62+
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
63+
(JSC::DFG::AbstractInterpreter<AbstractStateType>::filterICStatus):
64+
* dfg/DFGArgumentsEliminationPhase.cpp:
65+
* dfg/DFGByteCodeParser.cpp:
66+
(JSC::DFG::ByteCodeParser::handleInById):
67+
(JSC::DFG::ByteCodeParser::parseBlock):
68+
* dfg/DFGClobberize.h:
69+
(JSC::DFG::clobberize):
70+
* dfg/DFGClobbersExitState.cpp:
71+
(JSC::DFG::clobbersExitState):
72+
* dfg/DFGDoesGC.cpp:
73+
(JSC::DFG::doesGC):
74+
* dfg/DFGFixupPhase.cpp:
75+
(JSC::DFG::FixupPhase::fixupNode):
76+
* dfg/DFGGraph.cpp:
77+
(JSC::DFG::Graph::dump):
78+
* dfg/DFGJITCompiler.cpp:
79+
(JSC::DFG::JITCompiler::link):
80+
* dfg/DFGJITCompiler.h:
81+
(JSC::DFG::JITCompiler::addInByVal):
82+
* dfg/DFGMayExit.cpp:
83+
* dfg/DFGNode.h:
84+
(JSC::DFG::Node::hasInByStatus): Renamed from hasInByIdStatus.
85+
(JSC::DFG::Node::inByStatus): Renamed from inByIdStatus.
86+
* dfg/DFGNodeType.h:
87+
* dfg/DFGObjectAllocationSinkingPhase.cpp:
88+
* dfg/DFGPredictionPropagationPhase.cpp:
89+
* dfg/DFGSafeToExecute.h:
90+
(JSC::DFG::safeToExecute):
91+
* dfg/DFGSpeculativeJIT.cpp:
92+
(JSC::DFG::SpeculativeJIT::compileInByVal):
93+
* dfg/DFGSpeculativeJIT32_64.cpp:
94+
(JSC::DFG::SpeculativeJIT::compile):
95+
* dfg/DFGSpeculativeJIT64.cpp:
96+
(JSC::DFG::SpeculativeJIT::compile):
97+
* dfg/DFGVarargsForwardingPhase.cpp:
98+
* ftl/FTLCapabilities.cpp:
99+
(JSC::FTL::canCompile):
100+
* ftl/FTLLowerDFGToB3.cpp:
101+
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
102+
(JSC::FTL::DFG::LowerDFGToB3::compileInBy):
103+
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
104+
(JSC::FTL::DFG::LowerDFGToB3::compileInByVal):
105+
* jit/ICStats.h:
106+
* jit/JIT.cpp:
107+
(JSC::JIT::privateCompileMainPass):
108+
(JSC::JIT::privateCompileSlowCases):
109+
(JSC::JIT::link):
110+
* jit/JIT.h:
111+
* jit/JITInlineCacheGenerator.cpp:
112+
(JSC::JITInByValGenerator::JITInByValGenerator):
113+
(JSC::JITInByValGenerator::generateFastPath):
114+
(JSC::JITInByValGenerator::finalize):
115+
(JSC::JITInByIdGenerator::JITInByIdGenerator):
116+
* jit/JITInlineCacheGenerator.h:
117+
(JSC::JITDelByIdGenerator::slowPathJump const):
118+
(JSC::JITInByValGenerator::JITInByValGenerator):
119+
(JSC::JITInByValGenerator::slowPathJump const):
120+
* jit/JITOperations.cpp:
121+
(JSC::JSC_DEFINE_JIT_OPERATION):
122+
* jit/JITOperations.h:
123+
* jit/JITPropertyAccess.cpp:
124+
(JSC::JIT::emit_op_in_by_val):
125+
(JSC::JIT::emitSlow_op_in_by_val):
126+
* jit/JITPropertyAccess32_64.cpp:
127+
(JSC::JIT::emit_op_in_by_val):
128+
(JSC::JIT::emitSlow_op_in_by_val):
129+
* jit/Repatch.cpp:
130+
(JSC::tryCacheInBy): Renamed from tryCacheInByID.
131+
(JSC::repatchInBy): Renamed from repatchInByID.
132+
(JSC::resetInBy): Renamed from resetInByID.
133+
* jit/Repatch.h:
134+
* llint/LLIntSlowPaths.cpp:
135+
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
136+
* llint/LLIntSlowPaths.h:
137+
* llint/LowLevelInterpreter.asm:
138+
* runtime/CommonSlowPaths.cpp:
139+
* runtime/CommonSlowPaths.h:
140+
1141
2021-06-03 Mark Lam <mark.lam@apple.com>
2142

3143
Fix an ASSERT in objectPrototypeHasOwnProperty() to account for TerminationException.

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,9 @@
14011401
A1D792FF1B43864B004516F5 /* IntlNumberFormatConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A1D792F91B43864B004516F5 /* IntlNumberFormatConstructor.h */; };
14021402
A1D793011B43864B004516F5 /* IntlNumberFormatPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A1D792FB1B43864B004516F5 /* IntlNumberFormatPrototype.h */; };
14031403
A321AA6D2626359B0023ADA2 /* IntlWorkaround.h in Headers */ = {isa = PBXBuildFile; fileRef = A321AA6C2626359B0023ADA2 /* IntlWorkaround.h */; };
1404+
A382C5312667111D0042CD99 /* InByIdVariant.h in Headers */ = {isa = PBXBuildFile; fileRef = E3305FB120B0F78800CEB82B /* InByIdVariant.h */; settings = {ATTRIBUTES = (Private, ); }; };
14041405
A38D250E25800D440042BFDD /* JSArrayBufferPrototypeInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A38D250D25800D430042BFDD /* JSArrayBufferPrototypeInlines.h */; };
1406+
A38D5BFC2666D3DA00A109A6 /* InByStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = A38D5BFA2666D3DA00A109A6 /* InByStatus.h */; settings = {ATTRIBUTES = (Private, ); }; };
14051407
A3EE8543262514B000FC9B8D /* IntlWorkaround.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A37619402625127C00CBCBA9 /* IntlWorkaround.cpp */; };
14061408
A3FF9BC72234749100B1A9AB /* YarrFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = A3FF9BC52234746600B1A9AB /* YarrFlags.h */; settings = {ATTRIBUTES = (Private, ); }; };
14071409
A503FA1A188E0FB000110F14 /* JavaScriptCallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA14188E0FAF00110F14 /* JavaScriptCallFrame.h */; };
@@ -4430,6 +4432,8 @@
44304432
A321AA6C2626359B0023ADA2 /* IntlWorkaround.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlWorkaround.h; sourceTree = "<group>"; };
44314433
A37619402625127C00CBCBA9 /* IntlWorkaround.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntlWorkaround.cpp; sourceTree = "<group>"; };
44324434
A38D250D25800D430042BFDD /* JSArrayBufferPrototypeInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferPrototypeInlines.h; sourceTree = "<group>"; };
4435+
A38D5BF92666D3DA00A109A6 /* InByStatus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InByStatus.cpp; sourceTree = "<group>"; };
4436+
A38D5BFA2666D3DA00A109A6 /* InByStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InByStatus.h; sourceTree = "<group>"; };
44334437
A3AFF92B245A3CF900C9BA3B /* IntlLocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlLocale.h; sourceTree = "<group>"; };
44344438
A3AFF92C245A3CFA00C9BA3B /* IntlLocaleConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlLocaleConstructor.h; sourceTree = "<group>"; };
44354439
A3AFF92D245A3CFA00C9BA3B /* IntlLocale.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntlLocale.cpp; sourceTree = "<group>"; };
@@ -5058,10 +5062,8 @@
50585062
E3282BB91FE930A300EDAF71 /* YarrErrorCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrErrorCode.cpp; path = yarr/YarrErrorCode.cpp; sourceTree = "<group>"; };
50595063
E3282BBA1FE930A400EDAF71 /* YarrErrorCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrErrorCode.h; path = yarr/YarrErrorCode.h; sourceTree = "<group>"; };
50605064
E32C3C6823E94C1E00BC97C0 /* UnlinkedCodeBlockGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedCodeBlockGenerator.h; sourceTree = "<group>"; };
5061-
E3305FAF20B0F78700CEB82B /* InByIdStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InByIdStatus.h; sourceTree = "<group>"; };
50625065
E3305FB020B0F78700CEB82B /* InByIdVariant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InByIdVariant.cpp; sourceTree = "<group>"; };
50635066
E3305FB120B0F78800CEB82B /* InByIdVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InByIdVariant.h; sourceTree = "<group>"; };
5064-
E3305FB220B0F78800CEB82B /* InByIdStatus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InByIdStatus.cpp; sourceTree = "<group>"; };
50655067
E33095DC23210A1400EB7856 /* JSInternalFieldObjectImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSInternalFieldObjectImpl.h; sourceTree = "<group>"; };
50665068
E334CBB221FD96A8000EB178 /* RegExpGlobalData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExpGlobalData.cpp; sourceTree = "<group>"; };
50675069
E334CBB321FD96A9000EB178 /* RegExpGlobalData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpGlobalData.h; sourceTree = "<group>"; };
@@ -6282,9 +6284,9 @@
62826284
FE3A06B91C1103D900390FDD /* JITRightShiftGenerator.h */,
62836285
72131BF326587EF2007114CF /* JITSafepoint.cpp */,
62846286
72131BF526587EF2007114CF /* JITSafepoint.h */,
6287+
72131BF426587EF2007114CF /* JITScannable.h */,
62856288
52B5100C265EFCD4008970E7 /* JITSizeStatistics.cpp */,
62866289
52B5100B265EFCD4008970E7 /* JITSizeStatistics.h */,
6287-
72131BF426587EF2007114CF /* JITScannable.h */,
62886290
0F766D2615A8CC1B008F363E /* JITStubRoutine.cpp */,
62896291
0F766D1C15A5028D008F363E /* JITStubRoutine.h */,
62906292
FE42388F1BE18C1200514737 /* JITSubGenerator.cpp */,
@@ -8577,10 +8579,10 @@
85778579
0F44A7AF20BF685F0022B171 /* ICStatusMap.h */,
85788580
0F44A7B520C0BE3F0022B171 /* ICStatusUtils.cpp */,
85798581
0FB399BD20AF6B380017E213 /* ICStatusUtils.h */,
8580-
E3305FB220B0F78800CEB82B /* InByIdStatus.cpp */,
8581-
E3305FAF20B0F78700CEB82B /* InByIdStatus.h */,
85828582
E3305FB020B0F78700CEB82B /* InByIdVariant.cpp */,
85838583
E3305FB120B0F78800CEB82B /* InByIdVariant.h */,
8584+
A38D5BF92666D3DA00A109A6 /* InByStatus.cpp */,
8585+
A38D5BFA2666D3DA00A109A6 /* InByStatus.h */,
85848586
7905BB661D12050E0019FE57 /* InlineAccess.cpp */,
85858587
7905BB671D12050E0019FE57 /* InlineAccess.h */,
85868588
148A7BED1B82975A002D9157 /* InlineCallFrame.cpp */,
@@ -9617,7 +9619,6 @@
96179619
0F2BDC21151E803B00CD8910 /* DFGInsertionSet.h in Headers */,
96189620
0F300B7C18AB1B1400A6D72E /* DFGIntegerCheckCombiningPhase.h in Headers */,
96199621
0F898F321B27689F0083A33C /* DFGIntegerRangeOptimizationPhase.h in Headers */,
9620-
52B5100D265EFCDB008970E7 /* JITSizeStatistics.h in Headers */,
96219622
0FC97F3E18202119002C9B26 /* DFGInvalidationPointInjectionPhase.h in Headers */,
96229623
0FEA0A34170D40BF00BB722C /* DFGJITCode.h in Headers */,
96239624
86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */,
@@ -9920,6 +9921,8 @@
99209921
BC18C40F0E16F5CD00B34460 /* Identifier.h in Headers */,
99219922
8606DDEA18DA44AB00A383D0 /* IdentifierInlines.h in Headers */,
99229923
A5FD0076189B038C00633231 /* IdentifiersFactory.h in Headers */,
9924+
A382C5312667111D0042CD99 /* InByIdVariant.h in Headers */,
9925+
A38D5BFC2666D3DA00A109A6 /* InByStatus.h in Headers */,
99239926
C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */,
99249927
0FB7F39915ED8E4600F167B2 /* IndexingHeader.h in Headers */,
99259928
0FB7F39A15ED8E4600F167B2 /* IndexingHeaderInlines.h in Headers */,
@@ -10071,6 +10074,7 @@
1007110074
FE3A06C01C11041A00390FDD /* JITRightShiftGenerator.h in Headers */,
1007210075
72131BF926587EF2007114CF /* JITSafepoint.h in Headers */,
1007310076
72131BF826587EF2007114CF /* JITScannable.h in Headers */,
10077+
52B5100D265EFCDB008970E7 /* JITSizeStatistics.h in Headers */,
1007410078
0F766D3115AA8112008F363E /* JITStubRoutine.h in Headers */,
1007510079
0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */,
1007610080
0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */,

‎Source/JavaScriptCore/Sources.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ bytecode/GetByIdVariant.cpp
239239
bytecode/GetterSetterAccessCase.cpp
240240
bytecode/ICStatusMap.cpp
241241
bytecode/ICStatusUtils.cpp
242-
bytecode/InByIdStatus.cpp
242+
bytecode/InByStatus.cpp
243243
bytecode/InByIdVariant.cpp
244244
bytecode/InlineAccess.cpp
245245
bytecode/InlineCallFrame.cpp

‎Source/JavaScriptCore/bytecode/CheckPrivateBrandStatus.cpp‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,7 @@ void CheckPrivateBrandStatus::filter(const StructureSet& structureSet)
219219

220220
CacheableIdentifier CheckPrivateBrandStatus::singleIdentifier() const
221221
{
222-
if (m_variants.isEmpty())
223-
return nullptr;
224-
225-
CacheableIdentifier result = m_variants.first().identifier();
226-
if (!result)
227-
return nullptr;
228-
for (size_t i = 1; i < m_variants.size(); ++i) {
229-
CacheableIdentifier identifier = m_variants[i].identifier();
230-
if (!identifier)
231-
return nullptr;
232-
if (identifier != result)
233-
return nullptr;
234-
}
235-
return result;
222+
return singleIdentifierForICStatus(m_variants);
236223
}
237224

238225
template<typename Visitor>

‎Source/JavaScriptCore/bytecode/DeleteByStatus.cpp‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,7 @@ void DeleteByStatus::filter(const StructureSet& set)
245245

246246
CacheableIdentifier DeleteByStatus::singleIdentifier() const
247247
{
248-
if (m_variants.isEmpty())
249-
return nullptr;
250-
251-
CacheableIdentifier result = m_variants.first().identifier();
252-
if (!result)
253-
return nullptr;
254-
for (size_t i = 1; i < m_variants.size(); ++i) {
255-
CacheableIdentifier identifier = m_variants[i].identifier();
256-
if (!identifier)
257-
return nullptr;
258-
if (identifier != result)
259-
return nullptr;
260-
}
261-
return result;
248+
return singleIdentifierForICStatus(m_variants);
262249
}
263250

264251
template<typename Visitor>

‎Source/JavaScriptCore/bytecode/GetByStatus.cpp‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -579,20 +579,7 @@ CacheableIdentifier GetByStatus::singleIdentifier() const
579579
if (isModuleNamespace())
580580
return m_moduleNamespaceData->m_identifier;
581581

582-
if (m_variants.isEmpty())
583-
return nullptr;
584-
585-
CacheableIdentifier result = m_variants.first().identifier();
586-
if (!result)
587-
return nullptr;
588-
for (size_t i = 1; i < m_variants.size(); ++i) {
589-
CacheableIdentifier identifier = m_variants[i].identifier();
590-
if (!identifier)
591-
return nullptr;
592-
if (identifier != result)
593-
return nullptr;
594-
}
595-
return result;
582+
return singleIdentifierForICStatus(m_variants);
596583
}
597584

598585
void GetByStatus::dump(PrintStream& out) const

0 commit comments

Comments
 (0)