コード例 #1
0
ファイル: FTLAbstractHeap.cpp プロジェクト: sailei1/webkit
TypedPointer IndexedAbstractHeap::baseIndex(Output& out, LValue base, LValue index, JSValue indexAsConstant, ptrdiff_t offset)
{
    if (indexAsConstant.isInt32())
        return out.address(base, at(indexAsConstant.asInt32()), offset);
    
    LValue result;
    if (m_canShift) {
        if (!m_scaleTerm)
            result = out.add(base, index);
        else
            result = out.add(base, out.shl(index, m_scaleTerm));
    } else
        result = out.add(base, out.mul(index, m_scaleTerm));
    
    return TypedPointer(atAnyIndex(), out.addPtr(result, m_offset + offset));
}