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

Changeset 245350 in webkit


Ignore:
Timestamp:
May 15, 2019, 2:44:48 PM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r244865. rdar://problem/50753937

Baseline JIT should do argument value profiling after checking for stack overflow
https://bugs.webkit.org/show_bug.cgi?id=197052
<rdar://problem/50009602>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/check-stack-overflow-before-value-profiling-arguments.js: Added.

Source/JavaScriptCore:

Otherwise, we may do value profiling without running a write barrier, which
is against the rules of how we do value profiling.

  • jit/JIT.cpp: (JSC::JIT::compileWithoutLinking):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244865 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-607-branch
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-607-branch/JSTests/ChangeLog

    r245349 r245350  
     12019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r244865. rdar://problem/50753937
     4
     5    Baseline JIT should do argument value profiling after checking for stack overflow
     6    https://bugs.webkit.org/show_bug.cgi?id=197052
     7    <rdar://problem/50009602>
     8   
     9    Reviewed by Yusuke Suzuki.
     10   
     11    JSTests:
     12   
     13    * stress/check-stack-overflow-before-value-profiling-arguments.js: Added.
     14   
     15    Source/JavaScriptCore:
     16   
     17    Otherwise, we may do value profiling without running a write barrier, which
     18    is against the rules of how we do value profiling.
     19   
     20    * jit/JIT.cpp:
     21    (JSC::JIT::compileWithoutLinking):
     22   
     23   
     24   
     25    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     26
     27    2019-05-01  Saam barati  <sbarati@apple.com>
     28
     29            Baseline JIT should do argument value profiling after checking for stack overflow
     30            https://bugs.webkit.org/show_bug.cgi?id=197052
     31            <rdar://problem/50009602>
     32
     33            Reviewed by Yusuke Suzuki.
     34
     35            * stress/check-stack-overflow-before-value-profiling-arguments.js: Added.
     36
    1372019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
    238
  • branches/safari-607-branch/Source/JavaScriptCore/ChangeLog

    r245349 r245350  
     12019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r244865. rdar://problem/50753937
     4
     5    Baseline JIT should do argument value profiling after checking for stack overflow
     6    https://bugs.webkit.org/show_bug.cgi?id=197052
     7    <rdar://problem/50009602>
     8   
     9    Reviewed by Yusuke Suzuki.
     10   
     11    JSTests:
     12   
     13    * stress/check-stack-overflow-before-value-profiling-arguments.js: Added.
     14   
     15    Source/JavaScriptCore:
     16   
     17    Otherwise, we may do value profiling without running a write barrier, which
     18    is against the rules of how we do value profiling.
     19   
     20    * jit/JIT.cpp:
     21    (JSC::JIT::compileWithoutLinking):
     22   
     23   
     24   
     25    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     26
     27    2019-05-01  Saam barati  <sbarati@apple.com>
     28
     29            Baseline JIT should do argument value profiling after checking for stack overflow
     30            https://bugs.webkit.org/show_bug.cgi?id=197052
     31            <rdar://problem/50009602>
     32
     33            Reviewed by Yusuke Suzuki.
     34
     35            Otherwise, we may do value profiling without running a write barrier, which
     36            is against the rules of how we do value profiling.
     37
     38            * jit/JIT.cpp:
     39            (JSC::JIT::compileWithoutLinking):
     40
    1412019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
    242
  • branches/safari-607-branch/Source/JavaScriptCore/jit/JIT.cpp

    r239552 r245350  
    681681#endif
    682682
     683    int frameTopOffset = stackPointerOffsetFor(m_codeBlock) * sizeof(Register);
     684    unsigned maxFrameSize = -frameTopOffset;
     685    addPtr(TrustedImm32(frameTopOffset), callFrameRegister, regT1);
     686    JumpList stackOverflow;
     687    if (UNLIKELY(maxFrameSize > Options::reservedZoneSize()))
     688        stackOverflow.append(branchPtr(Above, regT1, callFrameRegister));
     689    stackOverflow.append(branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), regT1));
     690
     691    move(regT1, stackPointerRegister);
     692    checkStackPointerAlignment();
     693    if (Options::zeroStackFrame())
     694        clearStackFrame(callFrameRegister, stackPointerRegister, regT0, maxFrameSize);
     695
     696    emitSaveCalleeSaves();
     697    emitMaterializeTagCheckRegisters();
     698
    683699    if (m_codeBlock->codeType() == FunctionCode) {
    684700        ASSERT(m_bytecodeOffset == std::numeric_limits<unsigned>::max());
     
    700716        }
    701717    }
    702 
    703     int frameTopOffset = stackPointerOffsetFor(m_codeBlock) * sizeof(Register);
    704     unsigned maxFrameSize = -frameTopOffset;
    705     addPtr(TrustedImm32(frameTopOffset), callFrameRegister, regT1);
    706     JumpList stackOverflow;
    707     if (UNLIKELY(maxFrameSize > Options::reservedZoneSize()))
    708         stackOverflow.append(branchPtr(Above, regT1, callFrameRegister));
    709     stackOverflow.append(branchPtr(Above, AbsoluteAddress(m_vm->addressOfSoftStackLimit()), regT1));
    710 
    711     move(regT1, stackPointerRegister);
    712     checkStackPointerAlignment();
    713     if (Options::zeroStackFrame())
    714         clearStackFrame(callFrameRegister, stackPointerRegister, regT0, maxFrameSize);
    715 
    716     emitSaveCalleeSaves();
    717     emitMaterializeTagCheckRegisters();
    718718   
    719719    RELEASE_ASSERT(!JITCode::isJIT(m_codeBlock->jitType()));
Note: See TracChangeset for help on using the changeset viewer.