Ignore:
Timestamp:
Jan 11, 2011, 10:27:15 AM (14 years ago)
Author:
[email protected]
Message:

2011-01-10 Michael Saboff <[email protected]>

Reviewed by Geoffrey Garen.

ASSERTION Failure in JSC::binaryChop
https://bugs.webkit.org/show_bug.cgi?id=25614

Changed JITStubs::cti_register_file_check() to use the current stack's
return PC to find the bytecode for handling the exception in the prior
frame. Also added the appropriate arrity check routine call to the
JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.

  • jit/JIT.cpp: (JSC::JIT::privateCompile): Changed the arrity check call location so that it gets added to the m_calls list so that it's included in CodeBlock::m_callReturnIndexVector.
  • jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.

2011-01-11 Michael Saboff <[email protected]>

Reviewed by Geoffrey Garen.

ASSERTION Failure in JSC::binaryChop
https://bugs.webkit.org/show_bug.cgi?id=25614

Added new test to check for proper handling of stack overflow
exceptions and arrity exceptions while close to the top of the stack.

  • fast/js/script-tests/stack-overflow-arrity-catch.js: Added. (fWithTwoArgs): (test):
  • fast/js/script-tests/stack-overflow-catch.js: Added. (test):
  • fast/js/stack-overflow-arrity-catch-expected.txt: Added.
  • fast/js/stack-overflow-arrity-catch.html: Added.
  • fast/js/stack-overflow-catch-expected.txt: Added.
  • fast/js/stack-overflow-catch.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r75408 r75510  
    490490
    491491    Label arityCheck;
    492     Call callArityCheck;
    493492    if (m_codeBlock->codeType() == FunctionCode) {
    494493        registerFileCheck.link(this);
     
    505504        branch32(Equal, regT1, Imm32(m_codeBlock->m_numParameters)).linkTo(beginLabel, this);
    506505        restoreArgumentReference();
    507         callArityCheck = call();
    508         move(regT0, callFrameRegister);
     506
     507        JITStubCall(this, m_codeBlock->m_isConstructor ? cti_op_construct_arityCheck : cti_op_call_arityCheck).call(callFrameRegister);
     508
    509509        jump(beginLabel);
    510510    }
     
    586586    }
    587587
    588     if (m_codeBlock->codeType() == FunctionCode && functionEntryArityCheck) {
    589         patchBuffer.link(callArityCheck, FunctionPtr(m_codeBlock->m_isConstructor ? cti_op_construct_arityCheck : cti_op_call_arityCheck));
     588    if (m_codeBlock->codeType() == FunctionCode && functionEntryArityCheck)
    590589        *functionEntryArityCheck = patchBuffer.locationOf(arityCheck);
    591     }
    592590
    593591    return patchBuffer.finalizeCode();
Note: See TracChangeset for help on using the changeset viewer.