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

Changeset 252725 in webkit


Ignore:
Timestamp:
Nov 20, 2019, 6:00:20 PM (7 years ago)
Author:
sbarati@apple.com
Message:

Baseline JIT should fill in StructureStubInfo's propertyIsInt32 and the slow path should update the array profile more frequently
https://bugs.webkit.org/show_bug.cgi?id=204432

Reviewed by Tadeu Zagallo.

When I added inline caching for get by val, I removed code which updated the
ArrayProfile with some frequency. This patch adds code that does that back,
which recovers some of the JetStream2 regressions we are seeing.

  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r252721 r252725  
     12019-11-20  Saam Barati  <sbarati@apple.com>
     2
     3        Baseline JIT should fill in StructureStubInfo's propertyIsInt32 and the slow path should update the array profile more frequently
     4        https://bugs.webkit.org/show_bug.cgi?id=204432
     5
     6        Reviewed by Tadeu Zagallo.
     7
     8        When I added inline caching for get by val, I removed code which updated the
     9        ArrayProfile with some frequency. This patch adds code that does that back,
     10        which recovers some of the JetStream2 regressions we are seeing.
     11
     12        * jit/JITOperations.cpp:
     13        * jit/JITPropertyAccess.cpp:
     14        (JSC::JIT::emit_op_get_by_val):
     15
    1162019-11-20  Ross Kirsling  <ross.kirsling@sony.com>
    217
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r252684 r252725  
    20082008    JSValue subscript = JSValue::decode(encodedSubscript);
    20092009
     2010    CodeBlock* codeBlock = callFrame->codeBlock();
     2011
    20102012    if (baseValue.isCell() && subscript.isInt32()) {
    2011         if (stubInfo->considerCaching(vm, callFrame->codeBlock(), baseValue.structureOrNull()))
    2012             repatchArrayGetByVal(globalObject, callFrame->codeBlock(), baseValue, subscript, *stubInfo);
     2013        Structure* structure = baseValue.asCell()->structure(vm);
     2014        if (stubInfo->considerCaching(vm, codeBlock, structure)) {
     2015            if (profile) {
     2016                ConcurrentJSLocker locker(codeBlock->m_lock);
     2017                profile->computeUpdatedPrediction(locker, codeBlock, structure);
     2018            }
     2019            repatchArrayGetByVal(globalObject, codeBlock, baseValue, subscript, *stubInfo);
     2020        }
    20132021    }
    20142022
     
    20212029                LOG_IC((ICEvent::OperationGetByValOptimize, baseValue.classInfoOrNull(vm), propertyName, baseValue == slot.slotBase()));
    20222030               
    2023                 CodeBlock* codeBlock = callFrame->codeBlock();
    20242031                if (stubInfo->considerCaching(vm, codeBlock, baseValue.structureOrNull()))
    20252032                    repatchGetBy(globalObject, codeBlock, baseValue, propertyName, slot, *stubInfo, GetByKind::NormalByVal);
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r252684 r252725  
    7171        m_codeBlock, CodeOrigin(m_bytecodeIndex), CallSiteIndex(m_bytecodeIndex), RegisterSet::stubUnavailableRegisters(),
    7272        JSValueRegs(regT0), JSValueRegs(regT1), JSValueRegs(regT0));
     73    if (isOperandConstantInt(property))
     74        gen.stubInfo()->propertyIsInt32 = true;
    7375    gen.generateFastPath(*this);
    7476    addSlowCase(gen.slowPathJump());
Note: See TracChangeset for help on using the changeset viewer.