Exemplo n.º 1
0
FlushFormat VariableAccessData::flushFormat()
{
    ASSERT(find() == this);
    
    if (isArgumentsAlias())
        return FlushedArguments;
    
    if (!shouldUnboxIfPossible())
        return FlushedJSValue;
    
    if (shouldUseDoubleFormat())
        return FlushedDouble;
    
    SpeculatedType prediction = argumentAwarePrediction();
    
    // This guard is here to protect the call to couldRepresentInt52(), which will return
    // true for !prediction.
    if (!prediction)
        return FlushedJSValue;
    
    if (isInt32Speculation(prediction))
        return FlushedInt32;
    
    if (couldRepresentInt52Impl())
        return FlushedInt52;
    
    if (isCellSpeculation(prediction))
        return FlushedCell;
    
    if (isBooleanSpeculation(prediction))
        return FlushedBoolean;
    
    return FlushedJSValue;
}
Exemplo n.º 2
0
FlushFormat VariableAccessData::flushFormat()
{
    ASSERT(find() == this);
    
    if (isArgumentsAlias())
        return FlushedArguments;
    
    if (!shouldUnboxIfPossible())
        return FlushedJSValue;
    
    if (shouldUseDoubleFormat())
        return FlushedDouble;
    
    SpeculatedType prediction = argumentAwarePrediction();
    if (isInt32Speculation(prediction))
        return FlushedInt32;
    
    if (enableInt52() && !m_local.isArgument() && isMachineIntSpeculation(prediction))
        return FlushedInt52;
    
    if (isCellSpeculation(prediction))
        return FlushedCell;
    
    if (isBooleanSpeculation(prediction))
        return FlushedBoolean;
    
    return FlushedJSValue;
}