Ejemplo n.º 1
0
ValueFormat ExitValue::valueFormat() const
{
    switch (kind()) {
    case InvalidExitValue:
        RELEASE_ASSERT_NOT_REACHED();
        return InvalidValueFormat;
            
    case ExitValueDead:
    case ExitValueConstant:
    case ExitValueInJSStack:
    case ExitValueMaterializeNewObject:
        return ValueFormatJSValue;
            
    case ExitValueArgument:
        return exitArgument().format();
            
    case ExitValueInJSStackAsInt32:
        return ValueFormatInt32;
            
    case ExitValueInJSStackAsInt52:
        return ValueFormatInt52;
            
    case ExitValueInJSStackAsDouble:
        return ValueFormatDouble;
            
    case ExitValueRecovery:
        return recoveryFormat();
    }
        
    RELEASE_ASSERT_NOT_REACHED();
    return InvalidValueFormat;
}
Ejemplo n.º 2
0
void ExitValue::dumpInContext(PrintStream& out, DumpContext* context) const
{
    switch (kind()) {
    case InvalidExitValue:
        out.print("Invalid");
        return;
    case ExitValueDead:
        out.print("Dead");
        return;
    case ExitValueArgument:
        out.print("Argument(", exitArgument(), ")");
        return;
    case ExitValueConstant:
        out.print("Constant(", inContext(constant(), context), ")");
        return;
    case ExitValueInJSStack:
        out.print("InJSStack:r", virtualRegister());
        return;
    case ExitValueInJSStackAsInt32:
        out.print("InJSStackAsInt32:r", virtualRegister());
        return;
    case ExitValueInJSStackAsInt52:
        out.print("InJSStackAsInt52:r", virtualRegister());
        return;
    case ExitValueInJSStackAsDouble:
        out.print("InJSStackAsDouble:r", virtualRegister());
        return;
    case ExitValueRecovery:
        out.print("Recovery(", recoveryOpcode(), ", arg", leftRecoveryArgument(), ", arg", rightRecoveryArgument(), ", ", recoveryFormat(), ")");
        return;
    }
    
    RELEASE_ASSERT_NOT_REACHED();
}