⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 291736 in webkit


Ignore:
Timestamp:
Mar 22, 2022, 11:45:52 PM (5 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Test DFG / FTL DataIC
​https://bugs.webkit.org/show_bug.cgi?id=231224

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/deltablue-varargs.js:
  • microbenchmarks/richards-try-catch.js:

Source/JavaScriptCore:

This patch revives DataIC in DFG and FTL, and re-enable testing to make it usable
for unlinked DFG. Currently, only x64 / ARM64 are supported.

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::isCacheableArrayLength):
(JSC::InlineAccess::isCacheableStringLength):
(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetById):
(JSC::DFG::SpeculativeJIT::compileGetByIdFlush):
(JSC::DFG::SpeculativeJIT::compileInById):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::cachedPutById):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/JITCode.h:

(JSC::JITCode::useDataIC):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::generateFastCommon):
(JSC::generateGetByIdInlineAccess):
(JSC::JITGetByIdGenerator::generateFastPath):
(JSC::JITGetByIdWithThisGenerator::generateFastPath):
(JSC::generatePutByIdInlineAccess):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateFastPath):
(JSC::JITDelByValGenerator::generateFastPath):
(JSC::JITDelByIdGenerator::generateFastPath):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::generateInByIdInlineAccess):
(JSC::JITInByIdGenerator::generateFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITGetByValGenerator::generateFastPath):
(JSC::JITPutByValGenerator::generateFastPath):
(JSC::JITPrivateBrandAccessGenerator::generateFastPath):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITInlineCacheGenerator::reportSlowPathCall):
(JSC::JITInlineCacheGenerator::slowPathBegin const):
(JSC::JITByIdGenerator::slowPathJump const):
(JSC::JITInByValGenerator::slowPathJump const):

  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r291603 r291736  
     12022-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
    1112022-03-21  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/JSTests/microbenchmarks/deltablue-varargs.js

    r279449 r291736  
    11//@ 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")
    33
    44// Copyright 2008 the V8 project authors. All rights reserved.
  • trunk/JSTests/microbenchmarks/richards-try-catch.js

    r279449 r291736  
    11//@ 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")
    33
    44// Copyright 2006-2008 the V8 project authors. All rights reserved.
  • trunk/Source/JavaScriptCore/ChangeLog

    r291731 r291736  
     12022-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
    1612022-03-22  Chris Dumez  <cdumez@apple.com>
    262
  • trunk/Source/JavaScriptCore/bytecode/InlineAccess.cpp

    r288815 r291736  
    300300        return false;
    301301
    302     if (codeBlock->jitType() == JITType::BaselineJIT)
     302    if (codeBlock->useDataIC())
    303303        return false;
    304304
    … …  
    341341        return false;
    342342
    343     if (codeBlock->jitType() == JITType::BaselineJIT)
     343    if (codeBlock->useDataIC())
    344344        return false;
    345345
    … …  
    429429{
    430430    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 
    449431        stubInfo.m_codePtr = target;
    450432        stubInfo.m_inlineAccessBaseStructureID.clear(); // Clear out the inline access code.
    … …  
    463445void InlineAccess::resetStubAsJumpInAccess(CodeBlock* codeBlock, StructureStubInfo& stubInfo)
    464446{
    465     if (codeBlock->useDataIC() && codeBlock->jitType() == JITType::BaselineJIT) {
     447    if (codeBlock->useDataIC()) {
    466448        stubInfo.m_codePtr = stubInfo.slowPathStartLocation;
    467449        stubInfo.m_inlineAccessBaseStructureID.clear(); // Clear out the inline access code.
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r290768 r291736  
    10501050    case CellUse: {
    10511051        std::optional<GPRTemporary> stubInfo;
     1052        std::optional<GPRTemporary> scratch;
    10521053        SpeculateCellOperand base(this, node->child1());
    10531054        JSValueRegsTemporary result(this, Reuse, base);
    10541055
    10551056        GPRReg stubInfoGPR = InvalidGPRReg;
     1057        GPRReg scratchGPR = InvalidGPRReg;
    10561058        if (JITCode::useDataIC(JITType::DFGJIT)) {
    10571059            stubInfo.emplace(this);
     1060            scratch.emplace(this);
    10581061            stubInfoGPR = stubInfo->gpr();
     1062            scratchGPR = scratch->gpr();
    10591063        }
    10601064        JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr());
    … …  
    10631067        base.use();
    10641068
    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);
    10661070
    10671071        jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly);
    … …  
    10711075    case UntypedUse: {
    10721076        std::optional<GPRTemporary> stubInfo;
     1077        std::optional<GPRTemporary> scratch;
    10731078        JSValueOperand base(this, node->child1());
    10741079        JSValueRegsTemporary result(this, Reuse, base);
    10751080
    10761081        GPRReg stubInfoGPR = InvalidGPRReg;
     1082        GPRReg scratchGPR = InvalidGPRReg;
    10771083        if (JITCode::useDataIC(JITType::DFGJIT)) {
    10781084            stubInfo.emplace(this);
     1085            scratch.emplace(this);
    10791086            stubInfoGPR = stubInfo->gpr();
     1087            scratchGPR = scratch->gpr();
    10801088        }
    10811089        JSValueRegs baseRegs = base.jsValueRegs();
    … …  
    10861094        JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs);
    10871095
    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);
    10891097
    10901098        jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly);
    … …  
    11031111    case CellUse: {
    11041112        std::optional<GPRTemporary> stubInfo;
     1113        std::optional<GPRTemporary> scratch;
    11051114        SpeculateCellOperand base(this, node->child1());
    11061115        JSValueRegsFlushedCallResult result(this);
    11071116
    11081117        GPRReg stubInfoGPR = InvalidGPRReg;
     1118        GPRReg scratchGPR = InvalidGPRReg;
    11091119        if (JITCode::useDataIC(JITType::DFGJIT)) {
    11101120            stubInfo.emplace(this);
     1121            scratch.emplace(this);
    11111122            stubInfoGPR = stubInfo->gpr();
     1123            scratchGPR = scratch->gpr();
    11121124        }
    11131125        JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr());
    … …  
    11181130        flushRegisters();
    11191131
    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);
    11211133
    11221134        jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly);
    … …  
    11261138    case UntypedUse: {
    11271139        std::optional<GPRTemporary> stubInfo;
     1140        std::optional<GPRTemporary> scratch;
    11281141        JSValueOperand base(this, node->child1());
    11291142        JSValueRegsFlushedCallResult result(this);
    11301143
    11311144        GPRReg stubInfoGPR = InvalidGPRReg;
     1145        GPRReg scratchGPR = InvalidGPRReg;
    11321146        if (JITCode::useDataIC(JITType::DFGJIT)) {
    11331147            stubInfo.emplace(this);
     1148            scratch.emplace(this);
    11341149            stubInfoGPR = stubInfo->gpr();
     1150            scratchGPR = scratch->gpr();
    11351151        }
    11361152        JSValueRegs baseRegs = base.jsValueRegs();
    … …  
    11431159        JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs);
    11441160
    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);
    11461162
    11471163        jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly);
    … …  
    13241340{
    13251341    std::optional<GPRTemporary> stubInfo;
     1342    std::optional<GPRTemporary> scratch;
    13261343    SpeculateCellOperand base(this, node->child1());
    13271344    JSValueRegsTemporary result(this, Reuse, base, PayloadWord);
    13281345
    13291346    GPRReg stubInfoGPR = InvalidGPRReg;
     1347    GPRReg scratchGPR = InvalidGPRReg;
    13301348    if (JITCode::useDataIC(JITType::DFGJIT)) {
    13311349        stubInfo.emplace(this);
     1350        scratch.emplace(this);
    13321351        stubInfoGPR = stubInfo->gpr();
     1352        scratchGPR = scratch->gpr();
    13331353    }
    13341354    GPRReg baseGPR = base.gpr();
    … …  
    13431363        m_jit.codeBlock(), &m_jit.jitCode()->common.m_stubInfos, JITType::DFGJIT, codeOrigin, callSite, usedRegisters, node->cacheableIdentifier(),
    13441364        JSValueRegs::payloadOnly(baseGPR), resultRegs, stubInfoGPR);
    1345     gen.generateFastPath(m_jit);
     1365    gen.generateFastPath(m_jit, scratchGPR);
    13461366
    13471367    JITCompiler::JumpList slowCases;
    … …  
    41554175    case CellUse: {
    41564176        std::optional<GPRTemporary> stubInfo;
     4177        std::optional<GPRTemporary> scratch;
    41574178        SpeculateCellOperand base(this, m_graph.child(node, 0));
    41584179        JSValueRegsTemporary result(this, Reuse, base);
    41594180
    41604181        GPRReg stubInfoGPR = InvalidGPRReg;
     4182        GPRReg scratchGPR = InvalidGPRReg;
    41614183        if (JITCode::useDataIC(JITType::DFGJIT)) {
    41624184            stubInfo.emplace(this);
     4185            scratch.emplace(this);
    41634186            stubInfoGPR = stubInfo->gpr();
     4187            scratchGPR = scratch->gpr();
    41644188        }
    41654189        JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr());
    41664190        JSValueRegs resultRegs = result.regs();
    41674191
    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);
    41694193
    41704194        jsValueResult(resultRegs, node, DataFormatJS);
    … …  
    41744198    case UntypedUse: {
    41754199        std::optional<GPRTemporary> stubInfo;
     4200        std::optional<GPRTemporary> scratch;
    41764201        JSValueOperand base(this, m_graph.child(node, 0));
    41774202        JSValueRegsTemporary result(this, Reuse, base);
    41784203
    41794204        GPRReg stubInfoGPR = InvalidGPRReg;
     4205        GPRReg scratchGPR = InvalidGPRReg;
    41804206        if (JITCode::useDataIC(JITType::DFGJIT)) {
    41814207            stubInfo.emplace(this);
     4208            scratch.emplace(this);
    41824209            stubInfoGPR = stubInfo->gpr();
     4210            scratchGPR = scratch->gpr();
    41834211        }
    41844212        JSValueRegs baseRegs = base.jsValueRegs();
    … …  
    41874215        JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs);
    41884216
    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);
    41904218
    41914219        jsValueResult(resultRegs, node, DataFormatJS);
    … …  
    43434371{
    43444372    std::optional<GPRTemporary> stubInfo;
     4373    std::optional<GPRTemporary> scratch2;
    43454374    SpeculateCellOperand base(this, node->child1());
    43464375    JSValueOperand value(this, node->child2());
    … …  
    43484377
    43494378    GPRReg stubInfoGPR = InvalidGPRReg;
     4379    GPRReg scratch2GPR = InvalidGPRReg;
    43504380    if (JITCode::useDataIC(JITType::DFGJIT)) {
    43514381        stubInfo.emplace(this);
     4382        scratch2.emplace(this);
    43524383        stubInfoGPR = stubInfo->gpr();
     4384        scratch2GPR = scratch2->gpr();
    43534385    }
    43544386    JSValueRegs valueRegs = value.jsValueRegs();
    … …  
    43594391    // to check it here.
    43604392    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());
    43624394
    43634395    noResult(node);
    … …  
    1412914161{
    1413014162    std::optional<GPRTemporary> stubInfo;
     14163    std::optional<GPRTemporary> scratch2;
    1413114164    SpeculateCellOperand base(this, node->child1());
    1413214165    JSValueOperand value(this, node->child2());
    … …  
    1413414167
    1413514168    GPRReg stubInfoGPR = InvalidGPRReg;
     14169    GPRReg scratch2GPR = InvalidGPRReg;
    1413614170    if (JITCode::useDataIC(JITType::DFGJIT)) {
    1413714171        stubInfo.emplace(this);
     14172        scratch2.emplace(this);
    1413814173        stubInfoGPR = stubInfo->gpr();
     14174        scratch2GPR = scratch2->gpr();
    1413914175    }
    1414014176    GPRReg baseGPR = base.gpr();
    … …  
    1414314179    flushRegisters();
    1414414180
    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);
    1414614182
    1414714183    noResult(node);
    … …  
    1415114187{
    1415214188    std::optional<GPRTemporary> stubInfo;
     14189    std::optional<GPRTemporary> scratch2;
    1415314190    SpeculateCellOperand base(this, node->child1());
    1415414191    JSValueOperand value(this, node->child2());
    … …  
    1415614193
    1415714194    GPRReg stubInfoGPR = InvalidGPRReg;
     14195    GPRReg scratch2GPR = InvalidGPRReg;
    1415814196    if (JITCode::useDataIC(JITType::DFGJIT)) {
    1415914197        stubInfo.emplace(this);
     14198        scratch2.emplace(this);
    1416014199        stubInfoGPR = stubInfo->gpr();
     14200        scratch2GPR = scratch2->gpr();
    1416114201    }
    1416214202    GPRReg baseGPR = base.gpr();
    … …  
    1416414204    GPRReg scratchGPR = scratch.gpr();
    1416514205
    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());
    1416714207
    1416814208    noResult(node);
    … …  
    1417214212{
    1417314213    std::optional<GPRTemporary> stubInfo;
     14214    std::optional<GPRTemporary> scratch2;
    1417414215    SpeculateCellOperand base(this, node->child1());
    1417514216    JSValueOperand value(this, node->child2());
    … …  
    1417714218
    1417814219    GPRReg stubInfoGPR = InvalidGPRReg;
     14220    GPRReg scratch2GPR = InvalidGPRReg;
    1417914221    if (JITCode::useDataIC(JITType::DFGJIT)) {
    1418014222        stubInfo.emplace(this);
     14223        scratch2.emplace(this);
    1418114224        stubInfoGPR = stubInfo->gpr();
     14225        scratch2GPR = scratch2->gpr();
    1418214226    }
    1418314227    GPRReg baseGPR = base.gpr();
    … …  
    1418514229    GPRReg scratchGPR = scratch.gpr();
    1418614230
    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());
    1418814232
    1418914233    noResult(node);
    … …  
    1577915823}
    1578015824
    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)
     15825void 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)
    1578215826{
    1578315827    RegisterSet usedRegisters = this->usedRegisters();
    … …  
    1578815832        if (stubInfoGPR != InvalidGPRReg)
    1578915833            usedRegisters.set(stubInfoGPR, false);
     15834        if (scratchGPR != InvalidGPRReg)
     15835            usedRegisters.set(scratchGPR, false);
     15836        if (scratch2GPR != InvalidGPRReg)
     15837            usedRegisters.set(scratch2GPR, false);
    1579015838    }
    1579115839    CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size());
    … …  
    1579515843        scratchGPR, ecmaMode, putKind);
    1579615844
    15797     gen.generateFastPath(m_jit);
     15845    gen.generateFastPath(m_jit, scratchGPR, scratch2GPR);
    1579815846
    1579915847    JITCompiler::JumpList slowCases;
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r285651 r291736  
    724724    void compileCheckDetached(Node*);
    725725
    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);
    728728    void cachedGetByVal(CodeOrigin, JSValueRegs base, JSValueRegs property, JSValueRegs result, JITCompiler::Jump slowPathTarget);
    729729
    730730#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());
    733733#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());
    736736#endif
    737737
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r287596 r291736  
    169169}
    170170
    171 void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type)
     171void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type)
    172172{
    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);
    174174}
    175175
    176176void SpeculativeJIT::cachedGetById(
    177177    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)
    179179{
    180180    UNUSED_PARAM(stubInfoGPR);
    … …  
    205205        JSValueRegs(baseTagGPROrNone, basePayloadGPR), JSValueRegs(resultTagGPR, resultPayloadGPR), InvalidGPRReg, type);
    206206   
    207     gen.generateFastPath(m_jit);
     207    gen.generateFastPath(m_jit, scratchGPR);
    208208   
    209209    JITCompiler::JumpList slowCases;
    … …  
    230230
    231231void 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,
    233233    CacheableIdentifier identifier, const JITCompiler::JumpList& slowPathTarget)
    234234{
    … …  
    241241        JSValueRegs(resultTagGPR, resultPayloadGPR), JSValueRegs(baseTagGPROrNone, basePayloadGPR), JSValueRegs(thisTagGPR, thisPayloadGPR), InvalidGPRReg);
    242242   
    243     gen.generateFastPath(m_jit);
     243    gen.generateFastPath(m_jit, scratchGPR);
    244244   
    245245    JITCompiler::JumpList slowCases;
    … …  
    32333233            GPRReg resultPayloadGPR = resultPayload.gpr();
    32343234           
    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());
    32363236           
    32373237            jsValueResult(resultTagGPR, resultPayloadGPR, node);
    … …  
    32533253            notCellList.append(m_jit.branchIfNotCell(thisValue.jsValueRegs()));
    32543254           
    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);
    32563256           
    32573257            jsValueResult(resultTagGPR, resultPayloadGPR, node);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r291521 r291736  
    149149}
    150150
    151 void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type)
     151void SpeculativeJIT::cachedGetById(CodeOrigin origin, JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget , SpillRegistersMode mode, AccessType type)
    152152{
    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);
    154154}
    155155
    156 void SpeculativeJIT::cachedGetById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg stubInfoGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode, AccessType type)
     156void SpeculativeJIT::cachedGetById(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg resultGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, JITCompiler::Jump slowPathTarget, SpillRegistersMode spillMode, AccessType type)
    157157{
    158158    CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size());
    … …  
    164164        if (stubInfoGPR != InvalidGPRReg)
    165165            usedRegisters.set(stubInfoGPR, false);
     166        if (scratchGPR != InvalidGPRReg)
     167            usedRegisters.set(scratchGPR, false);
    166168    }
    167169    JITGetByIdGenerator gen(
    168170        m_jit.codeBlock(), &m_jit.jitCode()->common.m_stubInfos, JITType::DFGJIT, codeOrigin, callSite, usedRegisters, identifier,
    169171        JSValueRegs(baseGPR), JSValueRegs(resultGPR), stubInfoGPR, type);
    170     gen.generateFastPath(m_jit);
     172    gen.generateFastPath(m_jit, scratchGPR);
    171173   
    172174    JITCompiler::JumpList slowCases;
    173175    slowCases.append(slowPathTarget);
    174     slowCases.append(gen.slowPathJump());
     176    if (!JITCode::useDataIC(JITType::DFGJIT))
     177        slowCases.append(gen.slowPathJump());
    175178
    176179    std::unique_ptr<SlowPathGenerator> slowPath;
    … …  
    191194}
    192195
    193 void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, GPRReg stubInfoGPR, CacheableIdentifier identifier, const JITCompiler::JumpList& slowPathTarget)
     196void SpeculativeJIT::cachedGetByIdWithThis(CodeOrigin codeOrigin, GPRReg baseGPR, GPRReg thisGPR, GPRReg resultGPR, GPRReg stubInfoGPR, GPRReg scratchGPR, CacheableIdentifier identifier, const JITCompiler::JumpList& slowPathTarget)
    194197{
    195198    CallSiteIndex callSite = m_jit.recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded(codeOrigin, m_stream->size());
    … …  
    201204    if (stubInfoGPR != InvalidGPRReg)
    202205        usedRegisters.set(stubInfoGPR, false);
     206    if (scratchGPR != InvalidGPRReg)
     207        usedRegisters.set(scratchGPR, false);
    203208   
    204209    JITGetByIdWithThisGenerator gen(
    205210        m_jit.codeBlock(), &m_jit.jitCode()->common.m_stubInfos, JITType::DFGJIT, codeOrigin, callSite, usedRegisters, identifier,
    206211        JSValueRegs(resultGPR), JSValueRegs(baseGPR), JSValueRegs(thisGPR), stubInfoGPR);
    207     gen.generateFastPath(m_jit);
     212    gen.generateFastPath(m_jit, scratchGPR);
    208213   
    209214    JITCompiler::JumpList slowCases;
    210215    slowCases.append(slowPathTarget);
    211     slowCases.append(gen.slowPathJump());
     216    if (!JITCode::useDataIC(JITType::DFGJIT))
     217        slowCases.append(gen.slowPathJump());
    212218   
    213219    std::unique_ptr<SlowPathGenerator> slowPath;
    … …  
    42434249    case GetByIdWithThis: {
    42444250        if (node->child1().useKind() == CellUse && node->child2().useKind() == CellUse) {
    4245             std::optional<GPRTemporary> stubInfo;
    42464251            SpeculateCellOperand base(this, node->child1());
    42474252            SpeculateCellOperand thisValue(this, node->child2());
    42484253
    4249             GPRReg stubInfoGPR = InvalidGPRReg;
    4250             if (JITCode::useDataIC(JITType::DFGJIT)) {
    4251                 stubInfo.emplace(this);
    4252                 stubInfoGPR = stubInfo->gpr();
    4253             }
    42544254            GPRReg baseGPR = base.gpr();
    42554255            GPRReg thisValueGPR = thisValue.gpr();
    … …  
    42574257            GPRFlushedCallResult result(this);
    42584258            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            }
    42594270           
    42604271            flushRegisters();
    42614272           
    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());
    42634274           
    42644275            jsValueResult(resultGPR, node);
    42654276           
    42664277        } else {
    4267             std::optional<GPRTemporary> stubInfo;
    42684278            JSValueOperand base(this, node->child1());
    42694279            JSValueOperand thisValue(this, node->child2());
    42704280
    4271             GPRReg stubInfoGPR = InvalidGPRReg;
    4272             if (JITCode::useDataIC(JITType::DFGJIT)) {
    4273                 stubInfo.emplace(this);
    4274                 stubInfoGPR = stubInfo->gpr();
    4275             }
    42764281            GPRReg baseGPR = base.gpr();
    42774282            GPRReg thisValueGPR = thisValue.gpr();
    … …  
    42794284            GPRFlushedCallResult result(this);
    42804285            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            }
    42814297           
    42824298            flushRegisters();
    … …  
    42864302            notCellList.append(m_jit.branchIfNotCell(JSValueRegs(thisValueGPR)));
    42874303           
    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);
    42894305           
    42904306            jsValueResult(resultGPR, node);
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r290768 r291736  
    46664666        patchpoint->append(m_numberTag, ValueRep::reg(GPRInfo::numberTagRegister));
    46674667        patchpoint->clobber(RegisterSet::macroScratchRegisters());
    4668         patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1 : 0;
     4668        patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 3 : 0;
    46694669
    46704670        // FIXME: If this is a PutByIdFlush, we might want to late-clobber volatile registers.
    … …  
    46904690                exceptionHandle->scheduleExitCreationForUnwind(params, callSiteIndex);
    46914691
    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                }
    46934700
    46944701                auto generator = Box<JITPutByIdGenerator>::create(
    … …  
    46984705                    putKind);
    46994706
    4700                 generator->generateFastPath(jit);
     4707                generator->generateFastPath(jit, scratchGPR, scratch2GPR);
    47014708                CCallHelpers::Label done = jit.label();
    47024709
    … …  
    47054712                        AllowMacroScratchRegisterUsage allowScratch(jit);
    47064713
    4707                         generator->slowPathJump().link(&jit);
     4714                        if (!JITCode::useDataIC(JITType::FTLJIT))
     4715                            generator->slowPathJump().link(&jit);
    47084716                        CCallHelpers::Label slowPathBegin = jit.label();
    47094717                        CCallHelpers::Call slowPathCall;
    … …  
    1284212850        patchpoint->append(m_numberTag, ValueRep::lateReg(GPRInfo::numberTagRegister));
    1284312851        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;
    1284512856
    1284612857        RefPtr<PatchpointExceptionHandle> exceptionHandle = preparePatchpointForExceptions(patchpoint);
    … …  
    1285812869                Box<CCallHelpers::JumpList> exceptions = exceptionHandle->scheduleExitCreation(params)->jumps(jit);
    1285912870
    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                }
    1286112878                auto returnGPR = params[0].gpr();
    1286212879                auto base = JSValueRegs(params[1].gpr());
    … …  
    1289712914
    1289812915                CCallHelpers::JumpList slowCases;
    12899                 generator->generateFastPath(jit);
    1290012916                if constexpr (type == AccessType::InById)
     12917                    generator->generateFastPath(jit, scratchGPR);
     12918                else
     12919                    generator->generateFastPath(jit);
     12920                if (!JITCode::useDataIC(JITType::FTLJIT))
    1290112921                    slowCases.append(generator->slowPathJump());
    12902                 else {
    12903                     if (!JITCode::useDataIC(JITType::FTLJIT))
    12904                         slowCases.append(generator->slowPathJump());
    12905                 }
    1290612922                CCallHelpers::Label done = jit.label();
    1290712923
    … …  
    1506915085        patchpoint->append(m_notCellMask, ValueRep::lateReg(GPRInfo::notCellMaskRegister));
    1507015086        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;
    1507215088
    1507315089        // FIXME: If this is a GetByIdFlush/GetByIdDirectFlush, we might get some performance boost if we claim that it
    … …  
    1509915115                exceptionHandle->scheduleExitCreationForUnwind(params, callSiteIndex);
    1510015116
    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                }
    1510215123
    1510315124                auto generator = Box<JITGetByIdGenerator>::create(
    … …  
    1510615127                    JSValueRegs(params[0].gpr()), stubInfoGPR, type);
    1510715128
    15108                 generator->generateFastPath(jit);
     15129                generator->generateFastPath(jit, scratchGPR);
    1510915130                CCallHelpers::Label done = jit.label();
    1511015131
    … …  
    1511515136                        auto optimizationFunction = appropriateOptimizingGetByIdFunction(type);
    1511615137
    15117                         generator->slowPathJump().link(&jit);
     15138                        if (!JITCode::useDataIC(JITType::FTLJIT))
     15139                            generator->slowPathJump().link(&jit);
    1511815140                        CCallHelpers::Label slowPathBegin = jit.label();
    1511915141                        CCallHelpers::Call slowPathCall;
    … …  
    1516015182        patchpoint->append(m_numberTag, ValueRep::lateReg(GPRInfo::numberTagRegister));
    1516115183        patchpoint->clobber(RegisterSet::macroScratchRegisters());
    15162         patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 1 : 0;
     15184        patchpoint->numGPScratchRegisters = JITCode::useDataIC(JITType::FTLJIT) ? 2 : 0;
    1516315185
    1516415186        RefPtr<PatchpointExceptionHandle> exceptionHandle =
    … …  
    1518315205                exceptionHandle->scheduleExitCreationForUnwind(params, callSiteIndex);
    1518415206
    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                }
    1518615213
    1518715214                auto generator = Box<JITGetByIdWithThisGenerator>::create(
    … …  
    1519015217                    JSValueRegs(params[1].gpr()), JSValueRegs(params[2].gpr()), stubInfoGPR);
    1519115218
    15192                 generator->generateFastPath(jit);
     15219                generator->generateFastPath(jit, scratchGPR);
    1519315220                CCallHelpers::Label done = jit.label();
    1519415221
    … …  
    1519915226                        auto optimizationFunction = operationGetByIdWithThisOptimize;
    1520015227
    15201                         generator->slowPathJump().link(&jit);
     15228                        if (!JITCode::useDataIC(JITType::FTLJIT))
     15229                            generator->slowPathJump().link(&jit);
    1520215230                        CCallHelpers::Label slowPathBegin = jit.label();
    1520315231                        CCallHelpers::Call slowPathCall;
  • trunk/Source/JavaScriptCore/jit/JITCode.h

    r288363 r291736  
    166166        if (JITCode::isBaselineCode(jitType))
    167167            return true;
    168         if (!Options::useDataIC())
    169             return false;
     168#if CPU(X86_64) || CPU(ARM64) || CPU(RISCV64)
    170169        return Options::useDataICInOptimizingJIT();
     170#else
     171        return false;
     172#endif
    171173    }
    172174
  • trunk/Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp

    r290647 r291736  
    106106}
    107107
    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);
     108void 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    }
    119122    m_done = jit.label();
    120123}
    … …  
    129132}
    130133
    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)
     134static void generateGetByIdInlineAccess(CCallHelpers& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, GPRReg scratchGPR, JSValueRegs resultJSR)
    138135{
    139136    jit.load32(CCallHelpers::Address(baseJSR.payloadGPR(), JSCell::structureIDOffset()), scratchGPR);
    … …  
    145142}
    146143
     144void 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
    147159void JITGetByIdGenerator::generateBaselineDataICFastPath(JIT& jit, unsigned stubInfo, GPRReg stubInfoGPR)
    148160{
    … …  
    175187}
    176188
    177 void JITGetByIdWithThisGenerator::generateFastPath(MacroAssembler& jit)
    178 {
    179     ASSERT(m_stubInfo);
    180     generateFastCommon(jit, InlineAccess::sizeForPropertyAccess());
     189void 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();
    181202}
    182203
    … …  
    209230}
    210231
    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 
     232static void generatePutByIdInlineAccess(CCallHelpers& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, JSValueRegs valueJSR, GPRReg scratchGPR, GPRReg scratch2GPR)
     233{
    224234    jit.load32(CCallHelpers::Address(baseJSR.payloadGPR(), JSCell::structureIDOffset()), scratchGPR);
    225235    auto doInlineAccess = jit.branch32(CCallHelpers::Equal, scratchGPR, CCallHelpers::Address(stubInfoGPR, StructureStubInfo::offsetOfInlineAccessBaseStructureID()));
    … …  
    228238    jit.load32(CCallHelpers::Address(stubInfoGPR, StructureStubInfo::offsetOfByIdSelfOffset()), scratchGPR);
    229239    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
     242void 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
     259void 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();
    237272}
    238273
    … …  
    282317}
    283318
    284 void JITDelByValGenerator::generateFastPath(MacroAssembler& jit)
     319void JITDelByValGenerator::generateFastPath(CCallHelpers& jit)
    285320{
    286321    ASSERT(m_stubInfo);
    … …  
    324359}
    325360
    326 void JITDelByIdGenerator::generateFastPath(MacroAssembler& jit)
     361void JITDelByIdGenerator::generateFastPath(CCallHelpers& jit)
    327362{
    328363    ASSERT(m_stubInfo);
    … …  
    361396}
    362397
    363 void JITInByValGenerator::generateFastPath(MacroAssembler& jit)
     398void JITInByValGenerator::generateFastPath(CCallHelpers& jit)
    364399{
    365400    ASSERT(m_stubInfo);
    … …  
    393428}
    394429
    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 
     430static void generateInByIdInlineAccess(CCallHelpers& jit, GPRReg stubInfoGPR, JSValueRegs baseJSR, GPRReg scratchGPR, JSValueRegs resultJSR)
     431{
    415432    jit.load32(CCallHelpers::Address(baseJSR.payloadGPR(), JSCell::structureIDOffset()), scratchGPR);
    416433    auto skipInlineAccess = jit.branch32(CCallHelpers::NotEqual, scratchGPR, CCallHelpers::Address(stubInfoGPR, StructureStubInfo::offsetOfInlineAccessBaseStructureID()));
    … …  
    422439
    423440    finished.link(&jit);
     441}
     442
     443void 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
     458void 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
    424472    m_done = jit.label();
    425473}
    … …  
    453501}
    454502
    455 void JITInstanceOfGenerator::generateFastPath(MacroAssembler& jit)
     503void JITInstanceOfGenerator::generateFastPath(CCallHelpers& jit)
    456504{
    457505    ASSERT(m_stubInfo);
    … …  
    492540}
    493541
    494 void JITGetByValGenerator::generateFastPath(MacroAssembler& jit)
     542void JITGetByValGenerator::generateFastPath(CCallHelpers& jit)
    495543{
    496544    ASSERT(m_stubInfo);
    … …  
    532580}
    533581
    534 void JITPutByValGenerator::generateFastPath(MacroAssembler& jit)
     582void JITPutByValGenerator::generateFastPath(CCallHelpers& jit)
    535583{
    536584    ASSERT(m_stubInfo);
    … …  
    570618}
    571619
    572 void JITPrivateBrandAccessGenerator::generateFastPath(MacroAssembler& jit)
     620void JITPrivateBrandAccessGenerator::generateFastPath(CCallHelpers& jit)
    573621{
    574622    ASSERT(m_stubInfo);
  • trunk/Source/JavaScriptCore/jit/JITInlineCacheGenerator.h

    r290647 r291736  
    2929
    3030#include "AssemblyHelpers.h"
     31#include "CCallHelpers.h"
    3132#include "CodeOrigin.h"
    3233#include "JITOperationValidation.h"
    … …  
    5758    StructureStubInfo* stubInfo() const { return m_stubInfo; }
    5859
    59     void reportSlowPathCall(MacroAssembler::Label slowPathBegin, MacroAssembler::Call call)
     60    void reportSlowPathCall(CCallHelpers::Label slowPathBegin, CCallHelpers::Call call)
    6061    {
    6162        m_slowPathBegin = slowPathBegin;
    … …  
    6364    }
    6465   
    65     MacroAssembler::Label slowPathBegin() const { return m_slowPathBegin; }
     66    CCallHelpers::Label slowPathBegin() const { return m_slowPathBegin; }
    6667
    6768    void finalize(
    … …  
    7980
    8081public:
    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;
    8586};
    8687
    … …  
    9495
    9596public:
    96     MacroAssembler::Jump slowPathJump() const
     97    CCallHelpers::Jump slowPathJump() const
    9798    {
    9899        ASSERT(m_slowPathJump.isSet());
    … …  
    105106protected:
    106107   
    107     void generateFastCommon(MacroAssembler&, size_t size);
     108    void generateFastCommon(CCallHelpers&, size_t size);
    108109   
    109110    JSValueRegs m_base;
    … …  
    111112
    112113public:
    113     MacroAssembler::Jump m_slowPathJump;
     114    CCallHelpers::Jump m_slowPathJump;
    114115};
    115116
    … …  
    122123        JSValueRegs base, JSValueRegs value, GPRReg stubInfoGPR, AccessType);
    123124   
    124     void generateFastPath(MacroAssembler&);
     125    void generateFastPath(CCallHelpers&, GPRReg scratchGPR);
    125126    void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR);
    126127
    … …  
    137138        JSValueRegs value, JSValueRegs base, JSValueRegs thisRegs, GPRReg stubInfoGPR);
    138139
    139     void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR);
    140     void generateFastPath(MacroAssembler&);
     140    void generateFastPath(CCallHelpers&, GPRReg scratchGPR);
     141    void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR);
    141142};
    142143
    … …  
    149150        JSValueRegs base, JSValueRegs value, GPRReg stubInfoGPR, GPRReg scratch, ECMAMode, PutKind);
    150151   
    151     void generateFastPath(MacroAssembler&);
     152    void generateFastPath(CCallHelpers&, GPRReg scratchGPR, GPRReg scratch2GPR);
    152153    void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR);
    153154   
    … …  
    168169        JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg arrayProfileGPR, GPRReg stubInfoGPR);
    169170
    170     MacroAssembler::Jump slowPathJump() const
     171    CCallHelpers::Jump slowPathJump() const
    171172    {
    172173        ASSERT(m_slowPathJump.m_jump.isSet());
    … …  
    176177    void finalize(LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer);
    177178
    178     void generateFastPath(MacroAssembler&);
     179    void generateFastPath(CCallHelpers&);
    179180
    180181    JSValueRegs m_base;
    181182    JSValueRegs m_value;
    182183
    183     MacroAssembler::PatchableJump m_slowPathJump;
     184    CCallHelpers::PatchableJump m_slowPathJump;
    184185};
    185186
    … …  
    193194        JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratch);
    194195
    195     MacroAssembler::Jump slowPathJump() const
    196     {
    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;
    207208};
    208209
    … …  
    216217        JSValueRegs base, JSValueRegs result, GPRReg stubInfoGPR, GPRReg scratch);
    217218
    218     MacroAssembler::Jump slowPathJump() const
    219     {
    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;
    230231};
    231232
    … …  
    239240        JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg stubInfoGPR);
    240241
    241     MacroAssembler::Jump slowPathJump() const
    242     {
    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;
    253254};
    254255
    … …  
    261262        JSValueRegs base, JSValueRegs value, GPRReg stubInfoGPR);
    262263
    263     void generateFastPath(MacroAssembler&);
     264    void generateFastPath(CCallHelpers&, GPRReg scratchGPR);
    264265    void generateBaselineDataICFastPath(JIT&, unsigned stubInfoConstant, GPRReg stubInfoGPR);
    265266};
    … …  
    275276        bool prototypeIsKnownObject = false);
    276277   
    277     void generateFastPath(MacroAssembler&);
    278 
    279     MacroAssembler::Jump slowPathJump() const
     278    void generateFastPath(CCallHelpers&);
     279
     280    CCallHelpers::Jump slowPathJump() const
    280281    {
    281282        ASSERT(m_slowPathJump.m_jump.isSet());
    … …  
    285286    void finalize(LinkBuffer& fastPathLinkBuffer, LinkBuffer& slowPathLinkBuffer);
    286287
    287     MacroAssembler::PatchableJump m_slowPathJump;
     288    CCallHelpers::PatchableJump m_slowPathJump;
    288289};
    289290
    … …  
    297298        JSValueRegs base, JSValueRegs property, JSValueRegs result, GPRReg stubInfoGPR);
    298299
    299     MacroAssembler::Jump slowPathJump() const
    300     {
    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&);
    309310
    310311    JSValueRegs m_base;
    311312    JSValueRegs m_result;
    312313
    313     MacroAssembler::PatchableJump m_slowPathJump;
     314    CCallHelpers::PatchableJump m_slowPathJump;
    314315};
    315316
    … …  
    323324        JSValueRegs base, JSValueRegs brand, GPRReg stubInfoGPR);
    324325
    325     MacroAssembler::Jump slowPathJump() const
    326     {
    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;
    337338};
    338339
  • trunk/Source/JavaScriptCore/runtime/Options.cpp

    r290405 r291736  
    434434    Options::useConcurrentGC() = false;
    435435#endif
    436 
    437     if (!Options::useDataIC())
    438         Options::useDataICInOptimizingJIT() = false;
    439436
    440437    // At initialization time, we may decide that useJIT should be false for any
  • trunk/Source/JavaScriptCore/runtime/OptionsList.h

    r290129 r291736  
    532532    v(Bool, dumpDFGJITSizeStatistics, false, Normal, nullptr) \
    533533    v(Bool, verboseExecutablePoolAllocation, false, Normal, nullptr) \
    534     v(Bool, useDataIC, false, Normal, nullptr) \
    535534    v(Bool, useDataICInOptimizingJIT, false, Normal, nullptr) \
    536535    v(Bool, useDataICSharing, false, Normal, nullptr) \
  • trunk/Tools/ChangeLog

    r291735 r291736  
     12022-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
    1102022-03-22  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r291045 r291736  
    10921092        "misc-ftl-no-cjit",
    10931093        [
    1094             "--useDataIC=true",
     1094            "--useDataICInOptimizingJIT=true",
    10951095        ] +
    10961096        FTL_OPTIONS +
    … …  
    11181118            "--useSamplingProfiler=true",
    11191119            "--airForceIRCAllocator=true",
    1120             "--useDataIC=true",
     1120            "--useDataICInOptimizingJIT=true",
    11211121        ] +
    11221122        FTL_OPTIONS +
    … …  
    11791179            "--useRandomizingExecutableIslandAllocation=true",
    11801180            "--forcePolyProto=true",
    1181             "--useDataIC=true",
     1181            "--useDataICInOptimizingJIT=true",
    11821182        ] +
    11831183        FTL_OPTIONS +
Note: See TracChangeset for help on using the changeset viewer.