Changeset 291736 in webkit
- Timestamp:
- Mar 22, 2022, 11:45:52 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/microbenchmarks/deltablue-varargs.js (modified) (1 diff)
-
JSTests/microbenchmarks/richards-try-catch.js (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/bytecode/InlineAccess.cpp (modified) (4 diffs)
-
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (modified) (28 diffs)
-
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (modified) (6 diffs)
-
Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (modified) (8 diffs)
-
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (modified) (15 diffs)
-
Source/JavaScriptCore/jit/JITCode.h (modified) (1 diff)
-
Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp (modified) (15 diffs)
-
Source/JavaScriptCore/jit/JITInlineCacheGenerator.h (modified) (20 diffs)
-
Source/JavaScriptCore/runtime/Options.cpp (modified) (1 diff)
-
Source/JavaScriptCore/runtime/OptionsList.h (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/Scripts/run-jsc-stress-tests (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r291603 r291736 1 2022-03-22 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Test DFG / FTL DataIC 4 https://bugs.webkit.org/show_bug.cgi?id=231224 5 6 Reviewed by Saam Barati. 7 8 * microbenchmarks/deltablue-varargs.js: 9 * microbenchmarks/richards-try-catch.js: 10 1 11 2022-03-21 Yusuke Suzuki <ysuzuki@apple.com> 2 12 -
trunk/JSTests/microbenchmarks/deltablue-varargs.js
r279449 r291736 1 1 //@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py 2 //@ requireOptions("--useDataIC =true", "--useDataICSharing=true")2 //@ requireOptions("--useDataICInOptimizingJIT=true", "--useDataICSharing=true") 3 3 4 4 // Copyright 2008 the V8 project authors. All rights reserved. -
trunk/JSTests/microbenchmarks/richards-try-catch.js
r279449 r291736 1 1 //@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py 2 //@ requireOptions("--useDataIC =true", "--useDataICSharing=true")2 //@ requireOptions("--useDataICInOptimizingJIT=true", "--useDataICSharing=true") 3 3 4 4 // Copyright 2006-2008 the V8 project authors. All rights reserved. -
trunk/Source/JavaScriptCore/ChangeLog
r291731 r291736 1 2022-03-22 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Test DFG / FTL DataIC 4 https://bugs.webkit.org/show_bug.cgi?id=231224 5 6 Reviewed by Saam Barati. 7 8 This patch revives DataIC in DFG and FTL, and re-enable testing to make it usable 9 for unlinked DFG. Currently, only x64 / ARM64 are supported. 10 11 * bytecode/InlineAccess.cpp: 12 (JSC::InlineAccess::isCacheableArrayLength): 13 (JSC::InlineAccess::isCacheableStringLength): 14 (JSC::InlineAccess::rewireStubAsJumpInAccess): 15 (JSC::InlineAccess::resetStubAsJumpInAccess): 16 * dfg/DFGSpeculativeJIT.cpp: 17 (JSC::DFG::SpeculativeJIT::compileGetById): 18 (JSC::DFG::SpeculativeJIT::compileGetByIdFlush): 19 (JSC::DFG::SpeculativeJIT::compileInById): 20 * dfg/DFGSpeculativeJIT.h: 21 * dfg/DFGSpeculativeJIT32_64.cpp: 22 (JSC::DFG::SpeculativeJIT::cachedGetById): 23 (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): 24 (JSC::DFG::SpeculativeJIT::compile): 25 * dfg/DFGSpeculativeJIT64.cpp: 26 (JSC::DFG::SpeculativeJIT::cachedGetById): 27 (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): 28 (JSC::DFG::SpeculativeJIT::compile): 29 * ftl/FTLLowerDFGToB3.cpp: 30 (JSC::FTL::DFG::LowerDFGToB3::cachedPutById): 31 (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): 32 * jit/JITCode.h: 33 (JSC::JITCode::useDataIC): 34 * jit/JITInlineCacheGenerator.cpp: 35 (JSC::JITByIdGenerator::generateFastCommon): 36 (JSC::generateGetByIdInlineAccess): 37 (JSC::JITGetByIdGenerator::generateFastPath): 38 (JSC::JITGetByIdWithThisGenerator::generateFastPath): 39 (JSC::generatePutByIdInlineAccess): 40 (JSC::JITPutByIdGenerator::generateBaselineDataICFastPath): 41 (JSC::JITPutByIdGenerator::generateFastPath): 42 (JSC::JITDelByValGenerator::generateFastPath): 43 (JSC::JITDelByIdGenerator::generateFastPath): 44 (JSC::JITInByValGenerator::generateFastPath): 45 (JSC::generateInByIdInlineAccess): 46 (JSC::JITInByIdGenerator::generateFastPath): 47 (JSC::JITInByIdGenerator::generateBaselineDataICFastPath): 48 (JSC::JITInstanceOfGenerator::generateFastPath): 49 (JSC::JITGetByValGenerator::generateFastPath): 50 (JSC::JITPutByValGenerator::generateFastPath): 51 (JSC::JITPrivateBrandAccessGenerator::generateFastPath): 52 * jit/JITInlineCacheGenerator.h: 53 (JSC::JITInlineCacheGenerator::reportSlowPathCall): 54 (JSC::JITInlineCacheGenerator::slowPathBegin const): 55 (JSC::JITByIdGenerator::slowPathJump const): 56 (JSC::JITInByValGenerator::slowPathJump const): 57 * runtime/Options.cpp: 58 (JSC::Options::recomputeDependentOptions): 59 * runtime/OptionsList.h: 60 1 61 2022-03-22 Chris Dumez <cdumez@apple.com> 2 62 -
trunk/Source/JavaScriptCore/bytecode/InlineAccess.cpp
r288815 r291736 300 300 return false; 301 301 302 if (codeBlock-> jitType() == JITType::BaselineJIT)302 if (codeBlock->useDataIC()) 303 303 return false; 304 304 … … 341 341 return false; 342 342 343 if (codeBlock-> jitType() == JITType::BaselineJIT)343 if (codeBlock->useDataIC()) 344 344 return false; 345 345 … … 429 429 { 430 430 if (codeBlock->useDataIC()) { 431 // If it is not GetById-like-thing, we do not emit nop sled (e.g. GetByVal).432 // The code is already an indirect jump, and only thing we should do is replacing m_codePtr.433 if (codeBlock->jitType() != JITType::BaselineJIT && stubInfo.hasConstantIdentifier) {434 // If m_codePtr is pointing to stubInfo.slowPathStartLocation, this means that InlineAccess code is not a stub one.435 // We rewrite this with the stub-based dispatching code once, and continue using it until we reset the code.436 if (stubInfo.m_codePtr.executableAddress() == stubInfo.slowPathStartLocation.executableAddress()) {437 CCallHelpers::emitJITCodeOver(stubInfo.start.retagged<JSInternalPtrTag>(), scopedLambda<void(CCallHelpers&)>([&](CCallHelpers& jit) {438 jit.move(CCallHelpers::TrustedImmPtr(&stubInfo), stubInfo.m_stubInfoGPR);439 jit.farJump(CCallHelpers::Address(stubInfo.m_stubInfoGPR, StructureStubInfo::offsetOfCodePtr()), JITStubRoutinePtrTag);440 auto jump = jit.jump();441 auto doneLocation = stubInfo.doneLocation;442 jit.addLinkTask([=](LinkBuffer& linkBuffer) {443 linkBuffer.link(jump, doneLocation);444 });445 }), "InlineAccess: linking stub call");446 }447 }448 449 431 stubInfo.m_codePtr = target; 450 432 stubInfo.m_inlineAccessBaseStructureID.clear(); // Clear out the inline access code. … … 463 445 void InlineAccess::resetStubAsJumpInAccess(CodeBlock* codeBlock, StructureStubInfo& stubInfo) 464 446 { 465 if (codeBlock->useDataIC() && codeBlock->jitType() == JITType::BaselineJIT) {447 if (codeBlock->useDataIC()) { 466 448 stubInfo.m_codePtr = stubInfo.slowPathStartLocation; 467 449 stubInfo.m_inlineAccessBaseStructureID.clear(); // Clear out the inline access code. -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r290768 r291736 1050 1050 case CellUse: { 1051 1051 std::optional<GPRTemporary> stubInfo; 1052 std::optional<GPRTemporary> scratch; 1052 1053 SpeculateCellOperand base(this, node->child1()); 1053 1054 JSValueRegsTemporary result(this, Reuse, base); 1054 1055 1055 1056 GPRReg stubInfoGPR = InvalidGPRReg; 1057 GPRReg scratchGPR = InvalidGPRReg; 1056 1058 if (JITCode::useDataIC(JITType::DFGJIT)) { 1057 1059 stubInfo.emplace(this); 1060 scratch.emplace(this); 1058 1061 stubInfoGPR = stubInfo->gpr(); 1062 scratchGPR = scratch->gpr(); 1059 1063 } 1060 1064 JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr()); … … 1063 1067 base.use(); 1064 1068 1065 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, node->cacheableIdentifier(), JITCompiler::Jump(), NeedToSpill, accessType);1069 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), JITCompiler::Jump(), NeedToSpill, accessType); 1066 1070 1067 1071 jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly); … … 1071 1075 case UntypedUse: { 1072 1076 std::optional<GPRTemporary> stubInfo; 1077 std::optional<GPRTemporary> scratch; 1073 1078 JSValueOperand base(this, node->child1()); 1074 1079 JSValueRegsTemporary result(this, Reuse, base); 1075 1080 1076 1081 GPRReg stubInfoGPR = InvalidGPRReg; 1082 GPRReg scratchGPR = InvalidGPRReg; 1077 1083 if (JITCode::useDataIC(JITType::DFGJIT)) { 1078 1084 stubInfo.emplace(this); 1085 scratch.emplace(this); 1079 1086 stubInfoGPR = stubInfo->gpr(); 1087 scratchGPR = scratch->gpr(); 1080 1088 } 1081 1089 JSValueRegs baseRegs = base.jsValueRegs(); … … 1086 1094 JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs); 1087 1095 1088 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, node->cacheableIdentifier(), notCell, NeedToSpill, accessType);1096 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), notCell, NeedToSpill, accessType); 1089 1097 1090 1098 jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly); … … 1103 1111 case CellUse: { 1104 1112 std::optional<GPRTemporary> stubInfo; 1113 std::optional<GPRTemporary> scratch; 1105 1114 SpeculateCellOperand base(this, node->child1()); 1106 1115 JSValueRegsFlushedCallResult result(this); 1107 1116 1108 1117 GPRReg stubInfoGPR = InvalidGPRReg; 1118 GPRReg scratchGPR = InvalidGPRReg; 1109 1119 if (JITCode::useDataIC(JITType::DFGJIT)) { 1110 1120 stubInfo.emplace(this); 1121 scratch.emplace(this); 1111 1122 stubInfoGPR = stubInfo->gpr(); 1123 scratchGPR = scratch->gpr(); 1112 1124 } 1113 1125 JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr()); … … 1118 1130 flushRegisters(); 1119 1131 1120 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, node->cacheableIdentifier(), JITCompiler::Jump(), DontSpill, accessType);1132 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), JITCompiler::Jump(), DontSpill, accessType); 1121 1133 1122 1134 jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly); … … 1126 1138 case UntypedUse: { 1127 1139 std::optional<GPRTemporary> stubInfo; 1140 std::optional<GPRTemporary> scratch; 1128 1141 JSValueOperand base(this, node->child1()); 1129 1142 JSValueRegsFlushedCallResult result(this); 1130 1143 1131 1144 GPRReg stubInfoGPR = InvalidGPRReg; 1145 GPRReg scratchGPR = InvalidGPRReg; 1132 1146 if (JITCode::useDataIC(JITType::DFGJIT)) { 1133 1147 stubInfo.emplace(this); 1148 scratch.emplace(this); 1134 1149 stubInfoGPR = stubInfo->gpr(); 1150 scratchGPR = scratch->gpr(); 1135 1151 } 1136 1152 JSValueRegs baseRegs = base.jsValueRegs(); … … 1143 1159 JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs); 1144 1160 1145 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, node->cacheableIdentifier(), notCell, DontSpill, accessType);1161 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), notCell, DontSpill, accessType); 1146 1162 1147 1163 jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly); … … 1324 1340 { 1325 1341 std::optional<GPRTemporary> stubInfo; 1342 std::optional<GPRTemporary> scratch; 1326 1343 SpeculateCellOperand base(this, node->child1()); 1327 1344 JSValueRegsTemporary result(this, Reuse, base, PayloadWord); 1328 1345 1329 1346 GPRReg stubInfoGPR = InvalidGPRReg; 1347 GPRReg scratchGPR = InvalidGPRReg; 1330 1348 if (JITCode::useDataIC(JITType::DFGJIT)) { 1331 1349 stubInfo.emplace(this); 1350 scratch.emplace(this); 1332 1351 stubInfoGPR = stubInfo->gpr(); 1352 scratchGPR = scratch->gpr(); 1333 1353 } 1334 1354 GPRReg baseGPR = base.gpr(); … … 1343 1363 m_jit.codeBlock(), &m_jit.jitCode()->common.m_stubInfos, JITType::DFGJIT, codeOrigin, callSite, usedRegisters, node->cacheableIdentifier(), 1344 1364 JSValueRegs::payloadOnly(baseGPR), resultRegs, stubInfoGPR); 1345 gen.generateFastPath(m_jit );1365 gen.generateFastPath(m_jit, scratchGPR); 1346 1366 1347 1367 JITCompiler::JumpList slowCases; … … 4155 4175 case CellUse: { 4156 4176 std::optional<GPRTemporary> stubInfo; 4177 std::optional<GPRTemporary> scratch; 4157 4178 SpeculateCellOperand base(this, m_graph.child(node, 0)); 4158 4179 JSValueRegsTemporary result(this, Reuse, base); 4159 4180 4160 4181 GPRReg stubInfoGPR = InvalidGPRReg; 4182 GPRReg scratchGPR = InvalidGPRReg; 4161 4183 if (JITCode::useDataIC(JITType::DFGJIT)) { 4162 4184 stubInfo.emplace(this); 4185 scratch.emplace(this); 4163 4186 stubInfoGPR = stubInfo->gpr(); 4187 scratchGPR = scratch->gpr(); 4164 4188 } 4165 4189 JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr()); 4166 4190 JSValueRegs resultRegs = result.regs(); 4167 4191 4168 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, node->cacheableIdentifier(), JITCompiler::Jump(), NeedToSpill, AccessType::GetPrivateName);4192 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), JITCompiler::Jump(), NeedToSpill, AccessType::GetPrivateName); 4169 4193 4170 4194 jsValueResult(resultRegs, node, DataFormatJS); … … 4174 4198 case UntypedUse: { 4175 4199 std::optional<GPRTemporary> stubInfo; 4200 std::optional<GPRTemporary> scratch; 4176 4201 JSValueOperand base(this, m_graph.child(node, 0)); 4177 4202 JSValueRegsTemporary result(this, Reuse, base); 4178 4203 4179 4204 GPRReg stubInfoGPR = InvalidGPRReg; 4205 GPRReg scratchGPR = InvalidGPRReg; 4180 4206 if (JITCode::useDataIC(JITType::DFGJIT)) { 4181 4207 stubInfo.emplace(this); 4208 scratch.emplace(this); 4182 4209 stubInfoGPR = stubInfo->gpr(); 4210 scratchGPR = scratch->gpr(); 4183 4211 } 4184 4212 JSValueRegs baseRegs = base.jsValueRegs(); … … 4187 4215 JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs); 4188 4216 4189 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, node->cacheableIdentifier(), notCell, NeedToSpill, AccessType::GetPrivateName);4217 cachedGetById(node->origin.semantic, baseRegs, resultRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), notCell, NeedToSpill, AccessType::GetPrivateName); 4190 4218 4191 4219 jsValueResult(resultRegs, node, DataFormatJS); … … 4343 4371 { 4344 4372 std::optional<GPRTemporary> stubInfo; 4373 std::optional<GPRTemporary> scratch2; 4345 4374 SpeculateCellOperand base(this, node->child1()); 4346 4375 JSValueOperand value(this, node->child2()); … … 4348 4377 4349 4378 GPRReg stubInfoGPR = InvalidGPRReg; 4379 GPRReg scratch2GPR = InvalidGPRReg; 4350 4380 if (JITCode::useDataIC(JITType::DFGJIT)) { 4351 4381 stubInfo.emplace(this); 4382 scratch2.emplace(this); 4352 4383 stubInfoGPR = stubInfo->gpr(); 4384 scratch2GPR = scratch2->gpr(); 4353 4385 } 4354 4386 JSValueRegs valueRegs = value.jsValueRegs(); … … 4359 4391 // to check it here. 4360 4392 auto putKind = node->privateFieldPutKind().isDefine() ? PutKind::DirectPrivateFieldDefine : PutKind::DirectPrivateFieldSet; 4361 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), putKind, ECMAMode::strict());4393 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, scratch2GPR, node->cacheableIdentifier(), putKind, ECMAMode::strict()); 4362 4394 4363 4395 noResult(node); … … 14129 14161 { 14130 14162 std::optional<GPRTemporary> stubInfo; 14163 std::optional<GPRTemporary> scratch2; 14131 14164 SpeculateCellOperand base(this, node->child1()); 14132 14165 JSValueOperand value(this, node->child2()); … … 14134 14167 14135 14168 GPRReg stubInfoGPR = InvalidGPRReg; 14169 GPRReg scratch2GPR = InvalidGPRReg; 14136 14170 if (JITCode::useDataIC(JITType::DFGJIT)) { 14137 14171 stubInfo.emplace(this); 14172 scratch2.emplace(this); 14138 14173 stubInfoGPR = stubInfo->gpr(); 14174 scratch2GPR = scratch2->gpr(); 14139 14175 } 14140 14176 GPRReg baseGPR = base.gpr(); … … 14143 14179 flushRegisters(); 14144 14180 14145 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), PutKind::NotDirect, node->ecmaMode(), MacroAssembler::Jump(), DontSpill);14181 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, scratch2GPR, node->cacheableIdentifier(), PutKind::NotDirect, node->ecmaMode(), MacroAssembler::Jump(), DontSpill); 14146 14182 14147 14183 noResult(node); … … 14151 14187 { 14152 14188 std::optional<GPRTemporary> stubInfo; 14189 std::optional<GPRTemporary> scratch2; 14153 14190 SpeculateCellOperand base(this, node->child1()); 14154 14191 JSValueOperand value(this, node->child2()); … … 14156 14193 14157 14194 GPRReg stubInfoGPR = InvalidGPRReg; 14195 GPRReg scratch2GPR = InvalidGPRReg; 14158 14196 if (JITCode::useDataIC(JITType::DFGJIT)) { 14159 14197 stubInfo.emplace(this); 14198 scratch2.emplace(this); 14160 14199 stubInfoGPR = stubInfo->gpr(); 14200 scratch2GPR = scratch2->gpr(); 14161 14201 } 14162 14202 GPRReg baseGPR = base.gpr(); … … 14164 14204 GPRReg scratchGPR = scratch.gpr(); 14165 14205 14166 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), PutKind::NotDirect, node->ecmaMode());14206 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, scratch2GPR, node->cacheableIdentifier(), PutKind::NotDirect, node->ecmaMode()); 14167 14207 14168 14208 noResult(node); … … 14172 14212 { 14173 14213 std::optional<GPRTemporary> stubInfo; 14214 std::optional<GPRTemporary> scratch2; 14174 14215 SpeculateCellOperand base(this, node->child1()); 14175 14216 JSValueOperand value(this, node->child2()); … … 14177 14218 14178 14219 GPRReg stubInfoGPR = InvalidGPRReg; 14220 GPRReg scratch2GPR = InvalidGPRReg; 14179 14221 if (JITCode::useDataIC(JITType::DFGJIT)) { 14180 14222 stubInfo.emplace(this); 14223 scratch2.emplace(this); 14181 14224 stubInfoGPR = stubInfo->gpr(); 14225 scratch2GPR = scratch2->gpr(); 14182 14226 } 14183 14227 GPRReg baseGPR = base.gpr(); … … 14185 14229 GPRReg scratchGPR = scratch.gpr(); 14186 14230 14187 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), PutKind::Direct, node->ecmaMode());14231 cachedPutById(node->origin.semantic, baseGPR, valueRegs, stubInfoGPR, scratchGPR, scratch2GPR, node->cacheableIdentifier(), PutKind::Direct, node->ecmaMode()); 14188 14232 14189 14233 noResult(node); … … 15779 15823 } 15780 15824 15781 void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg baseGPR, JSValueRegs valueRegs, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, PutKind putKind, ECMAMode ecmaMode, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode)15825 void SpeculativeJIT::cachedPutById(CodeOrigin codeOrigin, GPRReg baseGPR, JSValueRegs valueRegs, GPRReg stubInfoGPR, GPRReg scratchGPR, GPRReg scratch2GPR, CacheableIdentifier identifier, PutKind putKind, ECMAMode ecmaMode, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode) 15782 15826 { 15783 15827 RegisterSet usedRegisters = this->usedRegisters(); … … 15788 15832 if (stubInfoGPR != InvalidGPRReg) 15789 15833 usedRegisters.set(stubInfoGPR, false); 15834 if (scratchGPR != InvalidGPRReg) 15835 usedRegisters.set(scratchGPR, false); 15836 if (scratch2GPR != InvalidGPRReg) 15837 usedRegisters.set(scratch2GPR, false); 15790 15838 } 15791 15839 CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size()); … … 15795 15843 scratchGPR, ecmaMode, putKind); 15796 15844 15797 gen.generateFastPath(m_jit );15845 gen.generateFastPath(m_jit, scratchGPR, scratch2GPR); 15798 15846 15799 15847 JITCompiler::JumpList slowCases; -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r285651 r291736 724 724 void compileCheckDetached(Node*); 725 725 726 void cachedGetById(CodeOrigin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, CacheableIdentifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType);727 void cachedPutById(CodeOrigin, GPRReg baseGPR, JSValueRegs valueRegs, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier, PutKind, ECMAMode, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill);726 void cachedGetById(CodeOrigin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType); 727 void cachedPutById(CodeOrigin, GPRReg baseGPR, JSValueRegs valueRegs, GPRReg stubInfoGPR, GPRReg scratchGPR, GPRReg scratch2GPR, CacheableIdentifier, PutKind, ECMAMode, JITCompiler::Jump slowPathTarget = JITCompiler::Jump(), SpillRegistersMode = NeedToSpill); 728 728 void cachedGetByVal(CodeOrigin, JSValueRegs base, JSValueRegs property, JSValueRegs result, JITCompiler::Jump slowPathTarget); 729 729 730 730 #if USE(JSVALUE64) 731 void cachedGetById(CodeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg stubInfoGPR, CacheableIdentifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType);732 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, GPRReg stubInfoGPR, CacheableIdentifier, const JITCompiler::JumpList& slowPathTarget = JITCompiler::JumpList());731 void cachedGetById(CodeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType); 732 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier, const JITCompiler::JumpList& slowPathTarget = JITCompiler::JumpList()); 733 733 #elif USE(JSVALUE32_64) 734 void cachedGetById(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, CacheableIdentifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType);735 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPROrNone, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, CacheableIdentifier, const JITCompiler::JumpList& slowPathTarget = JITCompiler::JumpList());734 void cachedGetById(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode, AccessType); 735 void cachedGetByIdWithThis(CodeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPROrNone, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier, const JITCompiler::JumpList& slowPathTarget = JITCompiler::JumpList()); 736 736 #endif 737 737 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r287596 r291736 169 169 } 170 170 171 void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type)171 void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type) 172 172 { 173 cachedGetById(origin, base.tagGPR(), base.payloadGPR(), result.tagGPR(), result.payloadGPR(), stubInfoGPR, identifier, slowPathTarget, mode, type);173 cachedGetById(origin, base.tagGPR(), base.payloadGPR(), result.tagGPR(), result.payloadGPR(), stubInfoGPR, scratchGPR, identifier, slowPathTarget, mode, type); 174 174 } 175 175 176 176 void SpeculativeJIT::cachedGetById( 177 177 CodeOrigin codeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, 178 CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode, AccessType type)178 GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode, AccessType type) 179 179 { 180 180 UNUSED_PARAM(stubInfoGPR); … … 205 205 JSValueRegs(baseTagGPROrNone, basePayloadGPR), JSValueRegs(resultTagGPR, resultPayloadGPR), InvalidGPRReg, type); 206 206 207 gen.generateFastPath(m_jit );207 gen.generateFastPath(m_jit, scratchGPR); 208 208 209 209 JITCompiler::JumpList slowCases; … … 230 230 231 231 void SpeculativeJIT::cachedGetByIdWithThis( 232 CodeOrigin codeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPR, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, 232 CodeOrigin codeOrigin, GPRReg baseTagGPROrNone, GPRReg basePayloadGPR, GPRReg thisTagGPR, GPRReg thisPayloadGPR, GPRReg resultTagGPR, GPRReg resultPayloadGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, 233 233 CacheableIdentifier identifier, const JITCompiler::JumpList& slowPathTarget) 234 234 { … … 241 241 JSValueRegs(resultTagGPR, resultPayloadGPR), JSValueRegs(baseTagGPROrNone, basePayloadGPR), JSValueRegs(thisTagGPR, thisPayloadGPR), InvalidGPRReg); 242 242 243 gen.generateFastPath(m_jit );243 gen.generateFastPath(m_jit, scratchGPR); 244 244 245 245 JITCompiler::JumpList slowCases; … … 3233 3233 GPRReg resultPayloadGPR = resultPayload.gpr(); 3234 3234 3235 cachedGetByIdWithThis(node->origin.semantic, InvalidGPRReg, baseGPR, InvalidGPRReg, thisGPR, resultTagGPR, resultPayloadGPR, InvalidGPRReg, node->cacheableIdentifier());3235 cachedGetByIdWithThis(node->origin.semantic, InvalidGPRReg, baseGPR, InvalidGPRReg, thisGPR, resultTagGPR, resultPayloadGPR, InvalidGPRReg, InvalidGPRReg, node->cacheableIdentifier()); 3236 3236 3237 3237 jsValueResult(resultTagGPR, resultPayloadGPR, node); … … 3253 3253 notCellList.append(m_jit.branchIfNotCell(thisValue.jsValueRegs())); 3254 3254 3255 cachedGetByIdWithThis(node->origin.semantic, baseTagGPR, basePayloadGPR, thisTagGPR, thisPayloadGPR, resultTagGPR, resultPayloadGPR, InvalidGPRReg, node->cacheableIdentifier(), notCellList);3255 cachedGetByIdWithThis(node->origin.semantic, baseTagGPR, basePayloadGPR, thisTagGPR, thisPayloadGPR, resultTagGPR, resultPayloadGPR, InvalidGPRReg, InvalidGPRReg, node->cacheableIdentifier(), notCellList); 3256 3256 3257 3257 jsValueResult(resultTagGPR, resultPayloadGPR, node); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r291521 r291736 149 149 } 150 150 151 void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type)151 void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type) 152 152 { 153 cachedGetById(origin, base.gpr(), result.gpr(), stubInfoGPR, identifier, slowPathTarget, mode, type);153 cachedGetById(origin, base.gpr(), result.gpr(), stubInfoGPR, scratchGPR, identifier, slowPathTarget, mode, type); 154 154 } 155 155 156 void SpeculativeJIT::cachedGetById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg stubInfoGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode, AccessType type)156 void SpeculativeJIT::cachedGetById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode, AccessType type) 157 157 { 158 158 CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size()); … … 164 164 if (stubInfoGPR != InvalidGPRReg) 165 165 usedRegisters.set(stubInfoGPR, false); 166 if (scratchGPR != InvalidGPRReg) 167 usedRegisters.set(scratchGPR, false); 166 168 } 167 169 JITGetByIdGenerator gen( 168 170 m_jit.codeBlock(), &m_jit.jitCode()->common.m_stubInfos, JITType::DFGJIT, codeOrigin, callSite, usedRegisters, identifier, 169 171 JSValueRegs(baseGPR), JSValueRegs(resultGPR), stubInfoGPR, type); 170 gen.generateFastPath(m_jit );172 gen.generateFastPath(m_jit, scratchGPR); 171 173 172 174 JITCompiler::JumpList slowCases; 173 175 slowCases.append(slowPathTarget); 174 slowCases.append(gen.slowPathJump()); 176 if (!JITCode::useDataIC(JITType::DFGJIT)) 177 slowCases.append(gen.slowPathJump()); 175 178 176 179 std::unique_ptr<SlowPathGenerator> slowPath; … … 191 194 } 192 195 193 void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, GPRReg stubInfoGPR, CacheableIdentifier identifier, const JITCompiler::JumpList& slowPathTarget)196 void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, const JITCompiler::JumpList& slowPathTarget) 194 197 { 195 198 CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size()); … … 201 204 if (stubInfoGPR != InvalidGPRReg) 202 205 usedRegisters.set(stubInfoGPR, false); 206 if (scratchGPR != InvalidGPRReg) 207 usedRegisters.set(scratchGPR, false); 203 208 204 209 JITGetByIdWithThisGenerator gen( 205 210 m_jit.codeBlock(), &m_jit.jitCode()->common.m_stubInfos, JITType::DFGJIT, codeOrigin, callSite, usedRegisters, identifier, 206 211 JSValueRegs(resultGPR), JSValueRegs(baseGPR), JSValueRegs(thisGPR), stubInfoGPR); 207 gen.generateFastPath(m_jit );212 gen.generateFastPath(m_jit, scratchGPR); 208 213 209 214 JITCompiler::JumpList slowCases; 210 215 slowCases.append(slowPathTarget); 211 slowCases.append(gen.slowPathJump()); 216 if (!JITCode::useDataIC(JITType::DFGJIT)) 217 slowCases.append(gen.slowPathJump()); 212 218 213 219 std::unique_ptr<SlowPathGenerator> slowPath; … … 4243 4249 case GetByIdWithThis: { 4244 4250 if (node->child1().useKind() == CellUse && node->child2().useKind() == CellUse) { 4245 std::optional<GPRTemporary> stubInfo;4246 4251 SpeculateCellOperand base(this, node->child1()); 4247 4252 SpeculateCellOperand thisValue(this, node->child2()); 4248 4253 4249 GPRReg stubInfoGPR = InvalidGPRReg;4250 if (JITCode::useDataIC(JITType::DFGJIT)) {4251 stubInfo.emplace(this);4252 stubInfoGPR = stubInfo->gpr();4253 }4254 4254 GPRReg baseGPR = base.gpr(); 4255 4255 GPRReg thisValueGPR = thisValue.gpr(); … … 4257 4257 GPRFlushedCallResult result(this); 4258 4258 GPRReg resultGPR = result.gpr(); 4259 4260 std::optional<GPRTemporary> stubInfo; 4261 std::optional<GPRTemporary> scratch; 4262 GPRReg stubInfoGPR = InvalidGPRReg; 4263 GPRReg scratchGPR = InvalidGPRReg; 4264 if (JITCode::useDataIC(JITType::DFGJIT)) { 4265 stubInfo.emplace(this); 4266 scratch.emplace(this); 4267 stubInfoGPR = stubInfo->gpr(); 4268 scratchGPR = scratch->gpr(); 4269 } 4259 4270 4260 4271 flushRegisters(); 4261 4272 4262 cachedGetByIdWithThis(node->origin.semantic, baseGPR, thisValueGPR, resultGPR, stubInfoGPR, node->cacheableIdentifier(), JITCompiler::JumpList());4273 cachedGetByIdWithThis(node->origin.semantic, baseGPR, thisValueGPR, resultGPR, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), JITCompiler::JumpList()); 4263 4274 4264 4275 jsValueResult(resultGPR, node); 4265 4276 4266 4277 } else { 4267 std::optional<GPRTemporary> stubInfo;4268 4278 JSValueOperand base(this, node->child1()); 4269 4279 JSValueOperand thisValue(this, node->child2()); 4270 4280 4271 GPRReg stubInfoGPR = InvalidGPRReg;4272 if (JITCode::useDataIC(JITType::DFGJIT)) {4273 stubInfo.emplace(this);4274 stubInfoGPR = stubInfo->gpr();4275 }4276 4281 GPRReg baseGPR = base.gpr(); 4277 4282 GPRReg thisValueGPR = thisValue.gpr(); … … 4279 4284 GPRFlushedCallResult result(this); 4280 4285 GPRReg resultGPR = result.gpr(); 4286 4287 std::optional<GPRTemporary> stubInfo; 4288 std::optional<GPRTemporary> scratch; 4289 GPRReg stubInfoGPR = InvalidGPRReg; 4290 GPRReg scratchGPR = InvalidGPRReg; 4291 if (JITCode::useDataIC(JITType::DFGJIT)) { 4292 stubInfo.emplace(this); 4293 scratch.emplace(this); 4294 stubInfoGPR = stubInfo->gpr(); 4295 scratchGPR = scratch->gpr(); 4296 } 4281 4297 4282 4298 flushRegisters(); … … 4286 4302 notCellList.append(m_jit.branchIfNotCell(JSValueRegs(thisValueGPR))); 4287 4303 4288 cachedGetByIdWithThis(node->origin.semantic, baseGPR, thisValueGPR, resultGPR, stubInfoGPR, node->cacheableIdentifier(), notCellList);4304 cachedGetByIdWithThis(node->origin.semantic, baseGPR, thisValueGPR, resultGPR, stubInfoGPR, scratchGPR, node->cacheableIdentifier(), notCellList); 4289 4305 4290 4306 jsValueResult(resultGPR, node); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r290768 r291736 4666 4666 patchpoint->append(m_numberTag, ValueRep::reg(GPRInfo::numberTagRegister)); 4667 4667 patchpoint->clobber(RegisterSet::macroScratchRegisters()); 4668 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1: 0;4668 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 3 : 0; 4669 4669 4670 4670 // FIXME: If this is a PutByIdFlush, we might want to late-clobber volatile registers. … … 4690 4690 exceptionHandle->scheduleExitCreationForUnwind(params, callSiteIndex); 4691 4691 4692 GPRReg stubInfoGPR = JITCode::useDataIC(JITType::FTLJIT) ? params.gpScratch(0) : InvalidGPRReg; 4692 GPRReg stubInfoGPR = InvalidGPRReg; 4693 GPRReg scratchGPR = InvalidGPRReg; 4694 GPRReg scratch2GPR = InvalidGPRReg; 4695 if (JITCode::useDataIC(JITType::FTLJIT)) { 4696 stubInfoGPR = params.gpScratch(0); 4697 scratchGPR = params.gpScratch(1); 4698 scratch2GPR = params.gpScratch(2); 4699 } 4693 4700 4694 4701 auto generator = Box<JITPutByIdGenerator>::create( … … 4698 4705 putKind); 4699 4706 4700 generator->generateFastPath(jit );4707 generator->generateFastPath(jit, scratchGPR, scratch2GPR); 4701 4708 CCallHelpers::Label done = jit.label(); 4702 4709 … … 4705 4712 AllowMacroScratchRegisterUsage allowScratch(jit); 4706 4713 4707 generator->slowPathJump().link(&jit); 4714 if (!JITCode::useDataIC(JITType::FTLJIT)) 4715 generator->slowPathJump().link(&jit); 4708 4716 CCallHelpers::Label slowPathBegin = jit.label(); 4709 4717 CCallHelpers::Call slowPathCall; … … 12842 12850 patchpoint->append(m_numberTag, ValueRep::lateReg(GPRInfo::numberTagRegister)); 12843 12851 patchpoint->clobber(RegisterSet::macroScratchRegisters()); 12844 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1 : 0; 12852 if constexpr (type == AccessType::InById) 12853 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 2 : 0; 12854 else 12855 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1 : 0; 12845 12856 12846 12857 RefPtr<PatchpointExceptionHandle> exceptionHandle = preparePatchpointForExceptions(patchpoint); … … 12858 12869 Box<CCallHelpers::JumpList> exceptions = exceptionHandle->scheduleExitCreation(params)->jumps(jit); 12859 12870 12860 GPRReg stubInfoGPR = JITCode::useDataIC(JITType::FTLJIT) ? params.gpScratch(0) : InvalidGPRReg; 12871 GPRReg stubInfoGPR = InvalidGPRReg; 12872 GPRReg scratchGPR = InvalidGPRReg; 12873 if (JITCode::useDataIC(JITType::FTLJIT)) { 12874 stubInfoGPR = params.gpScratch(0); 12875 if constexpr (type == AccessType::InById) 12876 scratchGPR = params.gpScratch(1); 12877 } 12861 12878 auto returnGPR = params[0].gpr(); 12862 12879 auto base = JSValueRegs(params[1].gpr()); … … 12897 12914 12898 12915 CCallHelpers::JumpList slowCases; 12899 generator->generateFastPath(jit);12900 12916 if constexpr (type == AccessType::InById) 12917 generator->generateFastPath(jit, scratchGPR); 12918 else 12919 generator->generateFastPath(jit); 12920 if (!JITCode::useDataIC(JITType::FTLJIT)) 12901 12921 slowCases.append(generator->slowPathJump()); 12902 else {12903 if (!JITCode::useDataIC(JITType::FTLJIT))12904 slowCases.append(generator->slowPathJump());12905 }12906 12922 CCallHelpers::Label done = jit.label(); 12907 12923 … … 15069 15085 patchpoint->append(m_notCellMask, ValueRep::lateReg(GPRInfo::notCellMaskRegister)); 15070 15086 patchpoint->append(m_numberTag, ValueRep::lateReg(GPRInfo::numberTagRegister)); 15071 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1: 0;15087 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 2 : 0; 15072 15088 15073 15089 // FIXME: If this is a GetByIdFlush/GetByIdDirectFlush, we might get some performance boost if we claim that it … … 15099 15115 exceptionHandle->scheduleExitCreationForUnwind(params, callSiteIndex); 15100 15116 15101 GPRReg stubInfoGPR = JITCode::useDataIC(JITType::FTLJIT) ? params.gpScratch(0) : InvalidGPRReg; 15117 GPRReg stubInfoGPR = InvalidGPRReg; 15118 GPRReg scratchGPR = InvalidGPRReg; 15119 if (JITCode::useDataIC(JITType::FTLJIT)) { 15120 stubInfoGPR = params.gpScratch(0); 15121 scratchGPR = params.gpScratch(1); 15122 } 15102 15123 15103 15124 auto generator = Box<JITGetByIdGenerator>::create( … … 15106 15127 JSValueRegs(params[0].gpr()), stubInfoGPR, type); 15107 15128 15108 generator->generateFastPath(jit );15129 generator->generateFastPath(jit, scratchGPR); 15109 15130 CCallHelpers::Label done = jit.label(); 15110 15131 … … 15115 15136 auto optimizationFunction = appropriateOptimizingGetByIdFunction(type); 15116 15137 15117 generator->slowPathJump().link(&jit); 15138 if (!JITCode::useDataIC(JITType::FTLJIT)) 15139 generator->slowPathJump().link(&jit); 15118 15140 CCallHelpers::Label slowPathBegin = jit.label(); 15119 15141 CCallHelpers::Call slowPathCall; … … 15160 15182 patchpoint->append(m_numberTag, ValueRep::lateReg(GPRInfo::numberTagRegister)); 15161 15183 patchpoint->clobber(RegisterSet::macroScratchRegisters()); 15162 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1: 0;15184 patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 2 : 0; 15163 15185 15164 15186 RefPtr<PatchpointExceptionHandle> exceptionHandle = … … 15183 15205 exceptionHandle->scheduleExitCreationForUnwind(params, callSiteIndex); 15184 15206 15185 GPRReg stubInfoGPR = JITCode::useDataIC(JITType::FTLJIT) ? params.gpScratch(0) : InvalidGPRReg; 15207 GPRReg stubInfoGPR = InvalidGPRReg; 15208 GPRReg scratchGPR = InvalidGPRReg; 15209 if (JITCode::useDataIC(JITType::FTLJIT)) { 15210 stubInfoGPR = params.gpScratch(0); 15211 scratchGPR = params.gpScratch(1); 15212 } 15186 15213 15187 15214 auto generator = Box<JITGetByIdWithThisGenerator>::create( … … 15190 15217 JSValueRegs(params[1].gpr()), JSValueRegs(params[2].gpr()), stubInfoGPR); 15191 15218 15192 generator->generateFastPath(jit );15219 generator->generateFastPath(jit, scratchGPR); 15193 15220 CCallHelpers::Label done = jit.label(); 15194 15221 … … 15199 15226 auto optimizationFunction = operationGetByIdWithThisOptimize; 15200 15227 15201 generator->slowPathJump().link(&jit); 15228 if (!JITCode::useDataIC(JITType::FTLJIT)) 15229 generator->slowPathJump().link(&jit); 15202 15230 CCallHelpers::Label slowPathBegin = jit.label(); 15203 15231 CCallHelpers::Call slowPathCall; -
trunk/Source/JavaScriptCore/jit/JITCode.h
r288363 r291736 166 166 if (JITCode::isBaselineCode(jitType)) 167 167 return true; 168 if (!Options::useDataIC()) 169 return false; 168 #if CPU(X86_64) || CPU(ARM64) || CPU(RISCV64) 170 169 return Options::useDataICInOptimizingJIT(); 170 #else 171 return false; 172 #endif 171 173 } 172 174 -
trunk/Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp
r290647 r291736 106 106 } 107 107 108 void JITByIdGenerator::generateFastCommon(MacroAssembler& jit, size_t inlineICSize) 109 { 110 // We generate the same code regardless of whether SharedIC is enabled because we still need to use InlineAccess 111 // for the performance reason. 112 m_start = jit.label(); 113 size_t startSize = jit.m_assembler.buffer().codeSize(); 114 m_slowPathJump = jit.jump(); 115 size_t jumpSize = jit.m_assembler.buffer().codeSize() - startSize; 116 size_t nopsToEmitInBytes = inlineICSize - jumpSize; 117 jit.emitNops(nopsToEmitInBytes); 118 ASSERT(jit.m_assembler.buffer().codeSize() - startSize == inlineICSize); 108 void JITByIdGenerator::generateFastCommon(CCallHelpers& jit, size_t inlineICSize) 109 { 110 m_start = jit.label(); 111 if (JITCode::useDataIC(m_jitType)) { 112 jit.move(CCallHelpers::TrustedImmPtr(m_stubInfo), m_stubInfo->m_stubInfoGPR); 113 jit.farJump(CCallHelpers::Address(m_stubInfo->m_stubInfoGPR, StructureStubInfo::offsetOfCodePtr()), JITStubRoutinePtrTag); 114 } else { 115 size_t startSize = jit.m_assembler.buffer().codeSize(); 116 m_slowPathJump = jit.jump(); 117 size_t jumpSize = jit.m_assembler.buffer().codeSize() - startSize; 118 size_t nopsToEmitInBytes = inlineICSize - jumpSize; 119 jit.emitNops(nopsToEmitInBytes); 120 ASSERT(jit.m_assembler.buffer().codeSize() - startSize == inlineICSize); 121 } 119 122 m_done = jit.label(); 120 123 } … … 129 132 } 130 133 131 void JITGetByIdGenerator::generateFastPath(MacroAssembler& jit) 132 { 133 ASSERT(m_stubInfo); 134 generateFastCommon(jit, m_isLengthAccess ? InlineAccess::sizeForLengthAccess() : InlineAccess::sizeForPropertyAccess()); 135 } 136 137 static void generateGetByIdInlineAccess(JIT& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, GPRReg scratchGPR, JSValueRegs resultJSR) 134 static void generateGetByIdInlineAccess(CCallHelpers& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, GPRReg scratchGPR, JSValueRegs resultJSR) 138 135 { 139 136 jit.load32(CCallHelpers::Address(baseJSR.payloadGPR(), JSCell::structureIDOffset()), scratchGPR); … … 145 142 } 146 143 144 void JITGetByIdGenerator::generateFastPath(CCallHelpers& jit, GPRReg scratchGPR) 145 { 146 ASSERT(m_stubInfo); 147 if (!JITCode::useDataIC(m_jitType)) { 148 generateFastCommon(jit, m_isLengthAccess ? InlineAccess::sizeForLengthAccess() : InlineAccess::sizeForPropertyAccess()); 149 return; 150 } 151 152 ASSERT(scratchGPR != InvalidGPRReg); 153 m_start = jit.label(); 154 jit.move(CCallHelpers::TrustedImmPtr(m_stubInfo), m_stubInfo->m_stubInfoGPR); 155 generateGetByIdInlineAccess(jit, m_stubInfo->m_stubInfoGPR, m_base, scratchGPR, m_value); 156 m_done = jit.label(); 157 } 158 147 159 void JITGetByIdGenerator::generateBaselineDataICFastPath(JIT& jit, unsigned stubInfo, GPRReg stubInfoGPR) 148 160 { … … 175 187 } 176 188 177 void JITGetByIdWithThisGenerator::generateFastPath(MacroAssembler& jit) 178 { 179 ASSERT(m_stubInfo); 180 generateFastCommon(jit, InlineAccess::sizeForPropertyAccess()); 189 void JITGetByIdWithThisGenerator::generateFastPath(CCallHelpers& jit, GPRReg scratchGPR) 190 { 191 ASSERT(m_stubInfo); 192 if (!JITCode::useDataIC(m_jitType)) { 193 generateFastCommon(jit, InlineAccess::sizeForPropertyAccess()); 194 return; 195 } 196 197 ASSERT(scratchGPR != InvalidGPRReg); 198 m_start = jit.label(); 199 jit.move(CCallHelpers::TrustedImmPtr(m_stubInfo), m_stubInfo->m_stubInfoGPR); 200 generateGetByIdInlineAccess(jit, m_stubInfo->m_stubInfoGPR, m_base, scratchGPR, m_value); 201 m_done = jit.label(); 181 202 } 182 203 … … 209 230 } 210 231 211 void JITPutByIdGenerator::generateBaselineDataICFastPath(JIT& jit, unsigned stubInfo, GPRReg stubInfoGPR) 212 { 213 RELEASE_ASSERT(JITCode::useDataIC(m_jitType)); 214 215 m_start = jit.label(); 216 217 jit.loadConstant(stubInfo, stubInfoGPR); 218 219 using BaselineJITRegisters::PutById::baseJSR; 220 using BaselineJITRegisters::PutById::valueJSR; 221 using BaselineJITRegisters::PutById::FastPath::scratchGPR; 222 using BaselineJITRegisters::PutById::FastPath::scratch2GPR; 223 232 static void generatePutByIdInlineAccess(CCallHelpers& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, JSValueRegs valueJSR, GPRReg scratchGPR, GPRReg scratch2GPR) 233 { 224 234 jit.load32(CCallHelpers::Address(baseJSR.payloadGPR(), JSCell::structureIDOffset()), scratchGPR); 225 235 auto doInlineAccess = jit.branch32(CCallHelpers::Equal, scratchGPR, CCallHelpers::Address(stubInfoGPR, StructureStubInfo::offsetOfInlineAccessBaseStructureID())); … … 228 238 jit.load32(CCallHelpers::Address(stubInfoGPR, StructureStubInfo::offsetOfByIdSelfOffset()), scratchGPR); 229 239 jit.storeProperty(valueJSR, baseJSR.payloadGPR(), scratchGPR, scratch2GPR); 230 m_done = jit.label(); 231 } 232 233 void JITPutByIdGenerator::generateFastPath(MacroAssembler& jit) 234 { 235 ASSERT(m_stubInfo); 236 generateFastCommon(jit, InlineAccess::sizeForPropertyReplace()); 240 } 241 242 void JITPutByIdGenerator::generateBaselineDataICFastPath(JIT& jit, unsigned stubInfo, GPRReg stubInfoGPR) 243 { 244 RELEASE_ASSERT(JITCode::useDataIC(m_jitType)); 245 246 m_start = jit.label(); 247 248 jit.loadConstant(stubInfo, stubInfoGPR); 249 250 using BaselineJITRegisters::PutById::baseJSR; 251 using BaselineJITRegisters::PutById::valueJSR; 252 using BaselineJITRegisters::PutById::FastPath::scratchGPR; 253 using BaselineJITRegisters::PutById::FastPath::scratch2GPR; 254 255 generatePutByIdInlineAccess(jit, stubInfoGPR, baseJSR, valueJSR, scratchGPR, scratch2GPR); 256 m_done = jit.label(); 257 } 258 259 void JITPutByIdGenerator::generateFastPath(CCallHelpers& jit, GPRReg scratchGPR, GPRReg scratch2GPR) 260 { 261 ASSERT(m_stubInfo); 262 if (!JITCode::useDataIC(m_jitType)) { 263 generateFastCommon(jit, InlineAccess::sizeForPropertyReplace()); 264 return; 265 } 266 267 ASSERT(scratchGPR != InvalidGPRReg); 268 m_start = jit.label(); 269 jit.move(CCallHelpers::TrustedImmPtr(m_stubInfo), m_stubInfo->m_stubInfoGPR); 270 generatePutByIdInlineAccess(jit, m_stubInfo->m_stubInfoGPR, m_base, m_value, scratchGPR, scratch2GPR); 271 m_done = jit.label(); 237 272 } 238 273 … … 282 317 } 283 318 284 void JITDelByValGenerator::generateFastPath( MacroAssembler& jit)319 void JITDelByValGenerator::generateFastPath(CCallHelpers& jit) 285 320 { 286 321 ASSERT(m_stubInfo); … … 324 359 } 325 360 326 void JITDelByIdGenerator::generateFastPath( MacroAssembler& jit)361 void JITDelByIdGenerator::generateFastPath(CCallHelpers& jit) 327 362 { 328 363 ASSERT(m_stubInfo); … … 361 396 } 362 397 363 void JITInByValGenerator::generateFastPath( MacroAssembler& jit)398 void JITInByValGenerator::generateFastPath(CCallHelpers& jit) 364 399 { 365 400 ASSERT(m_stubInfo); … … 393 428 } 394 429 395 void JITInByIdGenerator::generateFastPath(MacroAssembler& jit) 396 { 397 ASSERT(m_stubInfo); 398 generateFastCommon(jit, InlineAccess::sizeForPropertyAccess()); 399 } 400 401 void JITInByIdGenerator::generateBaselineDataICFastPath(JIT& jit, unsigned stubInfo, GPRReg stubInfoGPR) 402 { 403 RELEASE_ASSERT(JITCode::useDataIC(m_jitType)); 404 405 m_start = jit.label(); 406 407 jit.loadConstant(stubInfo, stubInfoGPR); 408 409 using BaselineJITRegisters::InById::baseJSR; 410 using BaselineJITRegisters::InById::resultJSR; 411 using BaselineJITRegisters::InById::scratchGPR; 412 413 CCallHelpers::JumpList done; 414 430 static void generateInByIdInlineAccess(CCallHelpers& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, GPRReg scratchGPR, JSValueRegs resultJSR) 431 { 415 432 jit.load32(CCallHelpers::Address(baseJSR.payloadGPR(), JSCell::structureIDOffset()), scratchGPR); 416 433 auto skipInlineAccess = jit.branch32(CCallHelpers::NotEqual, scratchGPR, CCallHelpers::Address(stubInfoGPR, StructureStubInfo::offsetOfInlineAccessBaseStructureID())); … … 422 439 423 440 finished.link(&jit); 441 } 442 443 void JITInByIdGenerator::generateFastPath(CCallHelpers& jit, GPRReg scratchGPR) 444 { 445 ASSERT(m_stubInfo); 446 if (!JITCode::useDataIC(m_jitType)) { 447 generateFastCommon(jit, InlineAccess::sizeForPropertyAccess()); 448 return; 449 } 450 451 ASSERT(scratchGPR != InvalidGPRReg); 452 m_start = jit.label(); 453 jit.move(CCallHelpers::TrustedImmPtr(m_stubInfo), m_stubInfo->m_stubInfoGPR); 454 generateInByIdInlineAccess(jit, m_stubInfo->m_stubInfoGPR, m_base, scratchGPR, m_value); 455 m_done = jit.label(); 456 } 457 458 void JITInByIdGenerator::generateBaselineDataICFastPath(JIT& jit, unsigned stubInfo, GPRReg stubInfoGPR) 459 { 460 RELEASE_ASSERT(JITCode::useDataIC(m_jitType)); 461 462 m_start = jit.label(); 463 464 jit.loadConstant(stubInfo, stubInfoGPR); 465 466 using BaselineJITRegisters::InById::baseJSR; 467 using BaselineJITRegisters::InById::resultJSR; 468 using BaselineJITRegisters::InById::scratchGPR; 469 470 generateInByIdInlineAccess(jit, stubInfoGPR, baseJSR, scratchGPR, resultJSR); 471 424 472 m_done = jit.label(); 425 473 } … … 453 501 } 454 502 455 void JITInstanceOfGenerator::generateFastPath( MacroAssembler& jit)503 void JITInstanceOfGenerator::generateFastPath(CCallHelpers& jit) 456 504 { 457 505 ASSERT(m_stubInfo); … … 492 540 } 493 541 494 void JITGetByValGenerator::generateFastPath( MacroAssembler& jit)542 void JITGetByValGenerator::generateFastPath(CCallHelpers& jit) 495 543 { 496 544 ASSERT(m_stubInfo); … … 532 580 } 533 581 534 void JITPutByValGenerator::generateFastPath( MacroAssembler& jit)582 void JITPutByValGenerator::generateFastPath(CCallHelpers& jit) 535 583 { 536 584 ASSERT(m_stubInfo); … … 570 618 } 571 619 572 void JITPrivateBrandAccessGenerator::generateFastPath( MacroAssembler& jit)620 void JITPrivateBrandAccessGenerator::generateFastPath(CCallHelpers& jit) 573 621 { 574 622 ASSERT(m_stubInfo); -
trunk/Source/JavaScriptCore/jit/JITInlineCacheGenerator.h
r290647 r291736 29 29 30 30 #include "AssemblyHelpers.h" 31 #include "CCallHelpers.h" 31 32 #include "CodeOrigin.h" 32 33 #include "JITOperationValidation.h" … … 57 58 StructureStubInfo* stubInfo() const { return m_stubInfo; } 58 59 59 void reportSlowPathCall( MacroAssembler::Label slowPathBegin, MacroAssembler::Call call)60 void reportSlowPathCall(CCallHelpers::Label slowPathBegin, CCallHelpers::Call call) 60 61 { 61 62 m_slowPathBegin = slowPathBegin; … … 63 64 } 64 65 65 MacroAssembler::Label slowPathBegin() const { return m_slowPathBegin; }66 CCallHelpers::Label slowPathBegin() const { return m_slowPathBegin; } 66 67 67 68 void finalize( … … 79 80 80 81 public: 81 MacroAssembler::Label m_start;82 MacroAssembler::Label m_done;83 MacroAssembler::Label m_slowPathBegin;84 MacroAssembler::Call m_slowPathCall;82 CCallHelpers::Label m_start; 83 CCallHelpers::Label m_done; 84 CCallHelpers::Label m_slowPathBegin; 85 CCallHelpers::Call m_slowPathCall; 85 86 }; 86 87 … … 94 95 95 96 public: 96 MacroAssembler::Jump slowPathJump() const97 CCallHelpers::Jump slowPathJump() const 97 98 { 98 99 ASSERT(m_slowPathJump.isSet()); … … 105 106 protected: 106 107 107 void generateFastCommon( MacroAssembler&, size_t size);108 void generateFastCommon(CCallHelpers&, size_t size); 108 109 109 110 JSValueRegs m_base; … … 111 112 112 113 public: 113 MacroAssembler::Jump m_slowPathJump;114 CCallHelpers::Jump m_slowPathJump; 114 115 }; 115 116 … … 122 123 JSValueRegs base, JSValueRegs value, GPRReg stubInfoGPR, AccessType); 123 124 124 void generateFastPath( MacroAssembler&);125 void generateFastPath(CCallHelpers&, GPRReg scratchGPR); 125 126 void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR); 126 127 … … 137 138 JSValueRegs value, JSValueRegs base, JSValueRegs thisRegs, GPRReg stubInfoGPR); 138 139 139 void generate BaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR);140 void generate FastPath(MacroAssembler&);140 void generateFastPath(CCallHelpers&, GPRReg scratchGPR); 141 void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR); 141 142 }; 142 143 … … 149 150 JSValueRegs base, JSValueRegs value, GPRReg stubInfoGPR, GPRReg scratch, ECMAMode, PutKind); 150 151 151 void generateFastPath( MacroAssembler&);152 void generateFastPath(CCallHelpers&, GPRReg scratchGPR, GPRReg scratch2GPR); 152 153 void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR); 153 154 … … 168 169 JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg arrayProfileGPR, GPRReg stubInfoGPR); 169 170 170 MacroAssembler::Jump slowPathJump() const171 CCallHelpers::Jump slowPathJump() const 171 172 { 172 173 ASSERT(m_slowPathJump.m_jump.isSet()); … … 176 177 void finalize(LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 177 178 178 void generateFastPath( MacroAssembler&);179 void generateFastPath(CCallHelpers&); 179 180 180 181 JSValueRegs m_base; 181 182 JSValueRegs m_value; 182 183 183 MacroAssembler::PatchableJump m_slowPathJump;184 CCallHelpers::PatchableJump m_slowPathJump; 184 185 }; 185 186 … … 193 194 JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratch); 194 195 195 MacroAssembler::Jump slowPathJump() const196 { 197 ASSERT(m_slowPathJump.m_jump.isSet()); 198 return m_slowPathJump.m_jump; 199 } 200 201 void finalize( 202 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 203 204 void generateFastPath( MacroAssembler&);205 206 MacroAssembler::PatchableJump m_slowPathJump;196 CCallHelpers::Jump slowPathJump() const 197 { 198 ASSERT(m_slowPathJump.m_jump.isSet()); 199 return m_slowPathJump.m_jump; 200 } 201 202 void finalize( 203 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 204 205 void generateFastPath(CCallHelpers&); 206 207 CCallHelpers::PatchableJump m_slowPathJump; 207 208 }; 208 209 … … 216 217 JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratch); 217 218 218 MacroAssembler::Jump slowPathJump() const219 { 220 ASSERT(m_slowPathJump.m_jump.isSet()); 221 return m_slowPathJump.m_jump; 222 } 223 224 void finalize( 225 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 226 227 void generateFastPath( MacroAssembler&);228 229 MacroAssembler::PatchableJump m_slowPathJump;219 CCallHelpers::Jump slowPathJump() const 220 { 221 ASSERT(m_slowPathJump.m_jump.isSet()); 222 return m_slowPathJump.m_jump; 223 } 224 225 void finalize( 226 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 227 228 void generateFastPath(CCallHelpers&); 229 230 CCallHelpers::PatchableJump m_slowPathJump; 230 231 }; 231 232 … … 239 240 JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg stubInfoGPR); 240 241 241 MacroAssembler::Jump slowPathJump() const242 { 243 ASSERT(m_slowPathJump.m_jump.isSet()); 244 return m_slowPathJump.m_jump; 245 } 246 247 void finalize( 248 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 249 250 void generateFastPath( MacroAssembler&);251 252 MacroAssembler::PatchableJump m_slowPathJump;242 CCallHelpers::Jump slowPathJump() const 243 { 244 ASSERT(m_slowPathJump.m_jump.isSet()); 245 return m_slowPathJump.m_jump; 246 } 247 248 void finalize( 249 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 250 251 void generateFastPath(CCallHelpers&); 252 253 CCallHelpers::PatchableJump m_slowPathJump; 253 254 }; 254 255 … … 261 262 JSValueRegs base, JSValueRegs value, GPRReg stubInfoGPR); 262 263 263 void generateFastPath( MacroAssembler&);264 void generateFastPath(CCallHelpers&, GPRReg scratchGPR); 264 265 void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR); 265 266 }; … … 275 276 bool prototypeIsKnownObject = false); 276 277 277 void generateFastPath( MacroAssembler&);278 279 MacroAssembler::Jump slowPathJump() const278 void generateFastPath(CCallHelpers&); 279 280 CCallHelpers::Jump slowPathJump() const 280 281 { 281 282 ASSERT(m_slowPathJump.m_jump.isSet()); … … 285 286 void finalize(LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 286 287 287 MacroAssembler::PatchableJump m_slowPathJump;288 CCallHelpers::PatchableJump m_slowPathJump; 288 289 }; 289 290 … … 297 298 JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg stubInfoGPR); 298 299 299 MacroAssembler::Jump slowPathJump() const300 { 301 ASSERT(m_slowPathJump.m_jump.isSet()); 302 return m_slowPathJump.m_jump; 303 } 304 305 void finalize( 306 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 307 308 void generateFastPath( MacroAssembler&);300 CCallHelpers::Jump slowPathJump() const 301 { 302 ASSERT(m_slowPathJump.m_jump.isSet()); 303 return m_slowPathJump.m_jump; 304 } 305 306 void finalize( 307 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 308 309 void generateFastPath(CCallHelpers&); 309 310 310 311 JSValueRegs m_base; 311 312 JSValueRegs m_result; 312 313 313 MacroAssembler::PatchableJump m_slowPathJump;314 CCallHelpers::PatchableJump m_slowPathJump; 314 315 }; 315 316 … … 323 324 JSValueRegs base, JSValueRegs brand, GPRReg stubInfoGPR); 324 325 325 MacroAssembler::Jump slowPathJump() const326 { 327 ASSERT(m_slowPathJump.m_jump.isSet()); 328 return m_slowPathJump.m_jump; 329 } 330 331 void finalize( 332 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 333 334 void generateFastPath( MacroAssembler&);335 336 MacroAssembler::PatchableJump m_slowPathJump;326 CCallHelpers::Jump slowPathJump() const 327 { 328 ASSERT(m_slowPathJump.m_jump.isSet()); 329 return m_slowPathJump.m_jump; 330 } 331 332 void finalize( 333 LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer); 334 335 void generateFastPath(CCallHelpers&); 336 337 CCallHelpers::PatchableJump m_slowPathJump; 337 338 }; 338 339 -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r290405 r291736 434 434 Options::useConcurrentGC() = false; 435 435 #endif 436 437 if (!Options::useDataIC())438 Options::useDataICInOptimizingJIT() = false;439 436 440 437 // At initialization time, we may decide that useJIT should be false for any -
trunk/Source/JavaScriptCore/runtime/OptionsList.h
r290129 r291736 532 532 v(Bool, dumpDFGJITSizeStatistics, false, Normal, nullptr) \ 533 533 v(Bool, verboseExecutablePoolAllocation, false, Normal, nullptr) \ 534 v(Bool, useDataIC, false, Normal, nullptr) \535 534 v(Bool, useDataICInOptimizingJIT, false, Normal, nullptr) \ 536 535 v(Bool, useDataICSharing, false, Normal, nullptr) \ -
trunk/Tools/ChangeLog
r291735 r291736 1 2022-03-22 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Test DFG / FTL DataIC 4 https://bugs.webkit.org/show_bug.cgi?id=231224 5 6 Reviewed by Saam Barati. 7 8 * Scripts/run-jsc-stress-tests: 9 1 10 2022-03-22 Alex Christensen <achristensen@webkit.org> 2 11 -
trunk/Tools/Scripts/run-jsc-stress-tests
r291045 r291736 1092 1092 "misc-ftl-no-cjit", 1093 1093 [ 1094 "--useDataIC =true",1094 "--useDataICInOptimizingJIT=true", 1095 1095 ] + 1096 1096 FTL_OPTIONS + … … 1118 1118 "--useSamplingProfiler=true", 1119 1119 "--airForceIRCAllocator=true", 1120 "--useDataIC =true",1120 "--useDataICInOptimizingJIT=true", 1121 1121 ] + 1122 1122 FTL_OPTIONS + … … 1179 1179 "--useRandomizingExecutableIslandAllocation=true", 1180 1180 "--forcePolyProto=true", 1181 "--useDataIC =true",1181 "--useDataICInOptimizingJIT=true", 1182 1182 ] + 1183 1183 FTL_OPTIONS +
Note:
See TracChangeset
for help on using the changeset viewer.