Esempio n. 1
0
void CallLinkInfo::unlink(VM& vm)
{
    if (!isLinked()) {
        // We could be called even if we're not linked anymore because of how polymorphic calls
        // work. Each callsite within the polymorphic call stub may separately ask us to unlink().
        RELEASE_ASSERT(!isOnList());
        return;
    }
    
    unlinkFor(vm, *this);

    // It will be on a list if the callee has a code block.
    if (isOnList())
        remove();
}
Esempio n. 2
0
void CallLinkInfo::unlink(RepatchBuffer& repatchBuffer)
{
    if (!isLinked()) {
        // We could be called even if we're not linked anymore because of how polymorphic calls
        // work. Each callsite within the polymorphic call stub may separately ask us to unlink().
        RELEASE_ASSERT(!isOnList());
        return;
    }
    
    unlinkFor(
        repatchBuffer, *this,
        (m_callType == Construct || m_callType == ConstructVarargs)? CodeForConstruct : CodeForCall,
        m_isFTL ? MustPreserveRegisters : RegisterPreservationNotRequired);

    // It will be on a list if the callee has a code block.
    if (isOnList())
        remove();
}