Merge inbound to mozilla-central. a=merge

This commit is contained in:
Oana Pop Rus 2019-02-01 11:37:15 +02:00
Родитель fa24444292 d958723822
Коммит e62b311b2e
29 изменённых файлов: 319 добавлений и 226 удалений

Просмотреть файл

@ -2443,8 +2443,9 @@ void StoreToTypedArray(JSContext* cx, MacroAssembler& masm, Scalar::Type type,
if (type == Scalar::Float32 || type == Scalar::Float64) {
masm.ensureDouble(value, FloatReg0, failure);
if (type == Scalar::Float32) {
masm.convertDoubleToFloat32(FloatReg0, ScratchFloat32Reg);
masm.storeToTypedFloatArray(type, ScratchFloat32Reg, dest);
ScratchFloat32Scope fpscratch(masm);
masm.convertDoubleToFloat32(FloatReg0, fpscratch);
masm.storeToTypedFloatArray(type, fpscratch, dest);
} else {
masm.storeToTypedFloatArray(type, FloatReg0, dest);
}

Просмотреть файл

@ -80,7 +80,10 @@ ValueOperand CacheRegisterAllocator::useValueRegister(MacroAssembler& masm,
case OperandLocation::DoubleReg: {
ValueOperand reg = allocateValueRegister(masm);
masm.boxDouble(loc.doubleReg(), reg, ScratchDoubleReg);
{
ScratchDoubleScope fpscratch(masm);
masm.boxDouble(loc.doubleReg(), reg, fpscratch);
}
loc.setValueReg(reg);
return reg;
}
@ -171,9 +174,11 @@ ValueOperand CacheRegisterAllocator::useFixedValueRegister(MacroAssembler& masm,
popPayload(masm, &loc, reg.scratchReg());
masm.tagValue(loc.payloadType(), reg.scratchReg(), reg);
break;
case OperandLocation::DoubleReg:
masm.boxDouble(loc.doubleReg(), reg, ScratchDoubleReg);
case OperandLocation::DoubleReg: {
ScratchDoubleScope fpscratch(masm);
masm.boxDouble(loc.doubleReg(), reg, fpscratch);
break;
}
case OperandLocation::Uninitialized:
MOZ_CRASH();
}
@ -2397,8 +2402,9 @@ bool CacheIRCompiler::emitInt32URightShiftResult() {
masm.jump(&intDone);
masm.bind(&toUint);
masm.convertUInt32ToDouble(lhs, ScratchDoubleReg);
masm.boxDouble(ScratchDoubleReg, output.valueReg(), ScratchDoubleReg);
ScratchDoubleScope fpscratch(masm);
masm.convertUInt32ToDouble(lhs, fpscratch);
masm.boxDouble(fpscratch, output.valueReg(), fpscratch);
masm.jump(&floatDone);
} else {
masm.branchTest32(Assembler::Signed, lhs, lhs, failure->label());
@ -2523,11 +2529,14 @@ bool CacheIRCompiler::emitDoubleIncDecResult(bool isInc) {
masm.ensureDouble(
val, FloatReg0,
(mode_ != Mode::Baseline) ? &failurePopReg : failure->label());
masm.loadConstantDouble(1.0, ScratchDoubleReg);
if (isInc) {
masm.addDouble(ScratchDoubleReg, FloatReg0);
} else {
masm.subDouble(ScratchDoubleReg, FloatReg0);
{
ScratchDoubleScope fpscratch(masm);
masm.loadConstantDouble(1.0, fpscratch);
if (isInc) {
masm.addDouble(fpscratch, FloatReg0);
} else {
masm.subDouble(fpscratch, FloatReg0);
}
}
masm.boxDouble(FloatReg0, output.valueReg(), FloatReg0);

Просмотреть файл

@ -612,8 +612,9 @@ void CodeGenerator::visitValueToFloat32(LValueToFloat32* lir) {
// ARM and MIPS may not have a double register available if we've
// allocated output as a float32.
#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_MIPS32)
masm.unboxDouble(operand, ScratchDoubleReg);
masm.convertDoubleToFloat32(ScratchDoubleReg, output);
ScratchDoubleScope fpscratch(masm);
masm.unboxDouble(operand, fpscratch);
masm.convertDoubleToFloat32(fpscratch, output);
#else
masm.unboxDouble(operand, output);
masm.convertDoubleToFloat32(output, output);

Просмотреть файл

@ -1798,14 +1798,15 @@ static void EmitStoreDenseElement(MacroAssembler& masm,
masm.jump(&done);
masm.bind(&convert);
ScratchDoubleScope fpscratch(masm);
if (reg.hasValue()) {
masm.branchTestInt32(Assembler::NotEqual, reg.valueReg(), &storeValue);
masm.int32ValueToDouble(reg.valueReg(), ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, target);
masm.int32ValueToDouble(reg.valueReg(), fpscratch);
masm.storeDouble(fpscratch, target);
} else {
MOZ_ASSERT(reg.type() == MIRType::Int32);
masm.convertInt32ToDouble(reg.typedReg().gpr(), ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, target);
masm.convertInt32ToDouble(reg.typedReg().gpr(), fpscratch);
masm.storeDouble(fpscratch, target);
}
masm.bind(&done);

Просмотреть файл

@ -468,8 +468,9 @@ void MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T& src,
}
bind(&isDouble);
{
convertUInt32ToDouble(temp, ScratchDoubleReg);
boxDouble(ScratchDoubleReg, dest, ScratchDoubleReg);
ScratchDoubleScope fpscratch(*this);
convertUInt32ToDouble(temp, fpscratch);
boxDouble(fpscratch, dest, fpscratch);
}
bind(&done);
} else {
@ -478,17 +479,22 @@ void MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T& src,
tagValue(JSVAL_TYPE_INT32, temp, dest);
}
break;
case Scalar::Float32:
loadFromTypedArray(arrayType, src, AnyRegister(ScratchFloat32Reg),
case Scalar::Float32: {
ScratchDoubleScope dscratch(*this);
FloatRegister fscratch = dscratch.asSingle();
loadFromTypedArray(arrayType, src, AnyRegister(fscratch),
dest.scratchReg(), nullptr);
convertFloat32ToDouble(ScratchFloat32Reg, ScratchDoubleReg);
boxDouble(ScratchDoubleReg, dest, ScratchDoubleReg);
convertFloat32ToDouble(fscratch, dscratch);
boxDouble(dscratch, dest, dscratch);
break;
case Scalar::Float64:
loadFromTypedArray(arrayType, src, AnyRegister(ScratchDoubleReg),
}
case Scalar::Float64: {
ScratchDoubleScope fpscratch(*this);
loadFromTypedArray(arrayType, src, AnyRegister(fpscratch),
dest.scratchReg(), nullptr);
boxDouble(ScratchDoubleReg, dest, ScratchDoubleReg);
boxDouble(fpscratch, dest, fpscratch);
break;
}
default:
MOZ_CRASH("Invalid typed array type");
}
@ -667,15 +673,17 @@ void MacroAssembler::storeUnboxedProperty(T address, JSValueType type,
case JSVAL_TYPE_DOUBLE:
if (value.constant()) {
if (value.value().isNumber()) {
loadConstantDouble(value.value().toNumber(), ScratchDoubleReg);
storeDouble(ScratchDoubleReg, address);
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(value.value().toNumber(), fpscratch);
storeDouble(fpscratch, address);
} else {
StoreUnboxedFailure(*this, failure);
}
} else if (value.reg().hasTyped()) {
if (value.reg().type() == MIRType::Int32) {
convertInt32ToDouble(value.reg().typedReg().gpr(), ScratchDoubleReg);
storeDouble(ScratchDoubleReg, address);
ScratchDoubleScope fpscratch(*this);
convertInt32ToDouble(value.reg().typedReg().gpr(), fpscratch);
storeDouble(fpscratch, address);
} else if (value.reg().type() == MIRType::Double) {
storeDouble(value.reg().typedReg().fpu(), address);
} else {
@ -685,8 +693,11 @@ void MacroAssembler::storeUnboxedProperty(T address, JSValueType type,
ValueOperand reg = value.reg().valueReg();
Label notInt32, end;
branchTestInt32(Assembler::NotEqual, reg, &notInt32);
int32ValueToDouble(reg, ScratchDoubleReg);
storeDouble(ScratchDoubleReg, address);
{
ScratchDoubleScope fpscratch(*this);
int32ValueToDouble(reg, fpscratch);
storeDouble(fpscratch, address);
}
jump(&end);
bind(&notInt32);
if (failure) {
@ -2231,16 +2242,18 @@ void MacroAssembler::convertInt32ValueToDouble(const Address& address,
Register scratch, Label* done) {
branchTestInt32(Assembler::NotEqual, address, done);
unboxInt32(address, scratch);
convertInt32ToDouble(scratch, ScratchDoubleReg);
storeDouble(ScratchDoubleReg, address);
ScratchDoubleScope fpscratch(*this);
convertInt32ToDouble(scratch, fpscratch);
storeDouble(fpscratch, address);
}
void MacroAssembler::convertInt32ValueToDouble(ValueOperand val) {
Label done;
branchTestInt32(Assembler::NotEqual, val, &done);
unboxInt32(val, val.scratchReg());
convertInt32ToDouble(val.scratchReg(), ScratchDoubleReg);
boxDouble(ScratchDoubleReg, val, ScratchDoubleReg);
ScratchDoubleScope fpscratch(*this);
convertInt32ToDouble(val.scratchReg(), fpscratch);
boxDouble(fpscratch, val, fpscratch);
bind(&done);
}
@ -2278,15 +2291,19 @@ void MacroAssembler::convertValueToFloatingPoint(ValueOperand value,
int32ValueToFloatingPoint(value, output, outputType);
jump(&done);
// On some non-multiAlias platforms, unboxDouble may use the scratch register,
// so do not merge code paths here.
bind(&isDouble);
FloatRegister tmp = output.asDouble();
if (outputType == MIRType::Float32 && hasMultiAlias()) {
tmp = ScratchDoubleReg;
}
unboxDouble(value, tmp);
if (outputType == MIRType::Float32) {
ScratchDoubleScope tmp(*this);
unboxDouble(value, tmp);
convertDoubleToFloat32(tmp, output);
} else {
FloatRegister tmp = output.asDouble();
unboxDouble(value, tmp);
if (outputType == MIRType::Float32) {
convertDoubleToFloat32(tmp, output);
}
}
bind(&done);
@ -2402,9 +2419,10 @@ void MacroAssembler::outOfLineTruncateSlow(FloatRegister src, Register dest,
wasm::BytecodeOffset callOffset) {
#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64) || \
defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
ScratchDoubleScope fpscratch(*this);
if (widenFloatToDouble) {
convertFloat32ToDouble(src, ScratchDoubleReg);
src = ScratchDoubleReg;
convertFloat32ToDouble(src, fpscratch);
src = fpscratch;
}
#elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
FloatRegister srcSingle;
@ -2939,10 +2957,12 @@ void MacroAssembler::Push(TypedOrValueRegister v) {
} else if (IsFloatingPointType(v.type())) {
FloatRegister reg = v.typedReg().fpu();
if (v.type() == MIRType::Float32) {
convertFloat32ToDouble(reg, ScratchDoubleReg);
reg = ScratchDoubleReg;
ScratchDoubleScope fpscratch(*this);
convertFloat32ToDouble(reg, fpscratch);
Push(fpscratch);
} else {
Push(reg);
}
Push(reg);
} else {
Push(ValueTypeFromMIRType(v.type()), v.typedReg().gpr());
}

Просмотреть файл

@ -2548,10 +2548,12 @@ class MacroAssembler : public MacroAssemblerSpecific {
} else if (IsFloatingPointType(src.type())) {
FloatRegister reg = src.typedReg().fpu();
if (src.type() == MIRType::Float32) {
convertFloat32ToDouble(reg, ScratchDoubleReg);
reg = ScratchDoubleReg;
ScratchDoubleScope fpscratch(*this);
convertFloat32ToDouble(reg, fpscratch);
storeDouble(fpscratch, dest);
} else {
storeDouble(reg, dest);
}
storeDouble(reg, dest);
} else {
storeValue(ValueTypeFromMIRType(src.type()), src.typedReg().gpr(), dest);
}

Просмотреть файл

@ -2443,9 +2443,9 @@ void CodeGenerator::visitWasmTruncateToInt64(LWasmTruncateToInt64* lir) {
addOutOfLineCode(ool, mir);
}
ScratchDoubleScope scratchScope(masm);
ScratchDoubleScope fpscratch(masm);
if (fromType == MIRType::Float32) {
inputDouble = ScratchDoubleReg;
inputDouble = fpscratch;
masm.convertFloat32ToDouble(input, inputDouble);
}

Просмотреть файл

@ -4474,11 +4474,11 @@ void MacroAssembler::moveValue(const TypedOrValueRegister& src,
return;
}
ScratchDoubleScope scratch(*this);
ScratchFloat32Scope scratch(*this);
FloatRegister freg = reg.fpu();
if (type == MIRType::Float32) {
convertFloat32ToDouble(freg, ScratchFloat32Reg);
freg = ScratchFloat32Reg;
convertFloat32ToDouble(freg, scratch);
freg = scratch;
}
ma_vxfer(freg, dest.payloadReg(), dest.typeReg());
}

Просмотреть файл

@ -949,8 +949,8 @@ void CodeGenerator::visitRound(LRound* lir) {
const FloatRegister input = ToFloatRegister(lir->input());
const ARMFPRegister input64(input, 64);
const FloatRegister temp = ToFloatRegister(lir->temp());
const FloatRegister scratch = ScratchDoubleReg;
const Register output = ToRegister(lir->output());
ScratchDoubleScope scratch(masm);
Label negative, done;
@ -1026,8 +1026,8 @@ void CodeGenerator::visitRoundF(LRoundF* lir) {
const FloatRegister input = ToFloatRegister(lir->input());
const ARMFPRegister input32(input, 32);
const FloatRegister temp = ToFloatRegister(lir->temp());
const FloatRegister scratch = ScratchFloat32Reg;
const Register output = ToRegister(lir->output());
ScratchFloat32Scope scratch(masm);
Label negative, done;

Просмотреть файл

@ -899,7 +899,7 @@ void MacroAssembler::moveValue(const TypedOrValueRegister& src,
return;
}
FloatRegister scratch = ScratchDoubleReg;
ScratchDoubleScope scratch(*this);
FloatRegister freg = reg.fpu();
if (type == MIRType::Float32) {
convertFloat32ToDouble(freg, scratch);
@ -1235,18 +1235,19 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
Label isOverflow;
const float two_31 = -float(INT32_MIN);
ScratchFloat32Scope fpscratch(*this);
if (flags & TRUNC_UNSIGNED) {
loadConstantFloat32(two_31 * 2, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(two_31 * 2, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantFloat32(-1.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThan, input, ScratchFloat32Reg, rejoin);
loadConstantFloat32(-1.0f, fpscratch);
branchFloat(Assembler::DoubleGreaterThan, input, fpscratch, rejoin);
} else {
loadConstantFloat32(two_31, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(two_31, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantFloat32(-two_31, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(-two_31, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
rejoin);
}
bind(&isOverflow);
@ -1265,18 +1266,19 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI32(FloatRegister input,
Label isOverflow;
const double two_31 = -double(INT32_MIN);
ScratchDoubleScope fpscratch(*this);
if (flags & TRUNC_UNSIGNED) {
loadConstantDouble(two_31 * 2, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
loadConstantDouble(two_31 * 2, fpscratch);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantDouble(-1.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThan, input, ScratchDoubleReg, rejoin);
loadConstantDouble(-1.0, fpscratch);
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch, rejoin);
} else {
loadConstantDouble(two_31, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
loadConstantDouble(two_31, fpscratch);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantDouble(-two_31 - 1, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThan, input, ScratchDoubleReg, rejoin);
loadConstantDouble(-two_31 - 1, fpscratch);
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch, rejoin);
}
bind(&isOverflow);
wasmTrap(wasm::Trap::IntegerOverflow, off);
@ -1294,18 +1296,19 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
Label isOverflow;
const float two_63 = -float(INT64_MIN);
ScratchFloat32Scope fpscratch(*this);
if (flags & TRUNC_UNSIGNED) {
loadConstantFloat32(two_63 * 2, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(two_63 * 2, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantFloat32(-1.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThan, input, ScratchFloat32Reg, rejoin);
loadConstantFloat32(-1.0f, fpscratch);
branchFloat(Assembler::DoubleGreaterThan, input, fpscratch, rejoin);
} else {
loadConstantFloat32(two_63, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(two_63, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantFloat32(-two_63, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(-two_63, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
rejoin);
}
bind(&isOverflow);
@ -1324,18 +1327,19 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
Label isOverflow;
const double two_63 = -double(INT64_MIN);
ScratchDoubleScope fpscratch(*this);
if (flags & TRUNC_UNSIGNED) {
loadConstantDouble(two_63 * 2, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
loadConstantDouble(two_63 * 2, fpscratch);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantDouble(-1.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThan, input, ScratchDoubleReg, rejoin);
loadConstantDouble(-1.0, fpscratch);
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch, rejoin);
} else {
loadConstantDouble(two_63, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
loadConstantDouble(two_63, fpscratch);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&isOverflow);
loadConstantDouble(-two_63, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
loadConstantDouble(-two_63, fpscratch);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
rejoin);
}
bind(&isOverflow);

Просмотреть файл

@ -27,6 +27,14 @@ static constexpr FloatRegister ScratchSimd128Reg = {
FloatRegisters::invalid_reg};
static constexpr FloatRegister InvalidFloatReg = {FloatRegisters::invalid_reg};
struct ScratchFloat32Scope : FloatRegister {
explicit ScratchFloat32Scope(MacroAssembler& masm) {}
};
struct ScratchDoubleScope : FloatRegister {
explicit ScratchDoubleScope(MacroAssembler& masm) {}
};
static constexpr Register OsrFrameReg{Registers::invalid_reg};
static constexpr Register PreBarrierReg{Registers::invalid_reg};
static constexpr Register CallTempReg0{Registers::invalid_reg};

Просмотреть файл

@ -1228,13 +1228,12 @@ class VerifyOp {
masm.branchPtr(Assembler::NotEqual, dump, reg, failure_);
}
void operator()(FloatRegister reg, Address dump) {
FloatRegister scratch;
if (reg.isDouble()) {
scratch = ScratchDoubleReg;
ScratchDoubleScope scratch(masm);
masm.loadDouble(dump, scratch);
masm.branchDouble(Assembler::DoubleNotEqual, scratch, reg, failure_);
} else if (reg.isSingle()) {
scratch = ScratchFloat32Reg;
ScratchFloat32Scope scratch(masm);
masm.loadFloat32(dump, scratch);
masm.branchFloat(Assembler::DoubleNotEqual, scratch, reg, failure_);
}

Просмотреть файл

@ -741,8 +741,9 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI32(FloatRegister input,
// other case is positive overflow which is converted to
// UINT32_MAX.
Label nonNegative;
loadConstantDouble(0.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(0.0, fpscratch);
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&nonNegative);
move32(Imm32(0), output);
jump(rejoin);
@ -758,8 +759,9 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI32(FloatRegister input,
jump(rejoin);
bind(&notNaN);
loadConstantDouble(0.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleLessThan, input, ScratchDoubleReg, rejoin);
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(0.0, fpscratch);
branchDouble(Assembler::DoubleLessThan, input, fpscratch, rejoin);
sub32(Imm32(1), output);
}
jump(rejoin);
@ -780,12 +782,13 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI32(FloatRegister input,
// We've used vcvttsd2si. The only valid double values that can
// truncate to INT32_MIN are in ]INT32_MIN - 1; INT32_MIN].
loadConstantDouble(double(INT32_MIN) - 1.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleLessThanOrEqual, input, ScratchDoubleReg,
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(double(INT32_MIN) - 1.0, fpscratch);
branchDouble(Assembler::DoubleLessThanOrEqual, input, fpscratch,
&traps.intOverflow);
loadConstantDouble(0.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThan, input, ScratchDoubleReg,
loadConstantDouble(0.0, fpscratch);
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch,
&traps.intOverflow);
jump(rejoin);
}
@ -804,8 +807,9 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
// other case is positive overflow which is converted to
// UINT32_MAX.
Label nonNegative;
loadConstantFloat32(0.0f, ScratchDoubleReg);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, ScratchDoubleReg,
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(0.0f, fpscratch);
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
&nonNegative);
move32(Imm32(0), output);
jump(rejoin);
@ -821,8 +825,9 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
jump(rejoin);
bind(&notNaN);
loadConstantFloat32(0.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleLessThan, input, ScratchFloat32Reg, rejoin);
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(0.0f, fpscratch);
branchFloat(Assembler::DoubleLessThan, input, fpscratch, rejoin);
sub32(Imm32(1), output);
}
jump(rejoin);
@ -844,9 +849,9 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
// We've used vcvttss2si. Check that the input wasn't
// float(INT32_MIN), which is the only legimitate input that
// would truncate to INT32_MIN.
loadConstantFloat32(float(INT32_MIN), ScratchFloat32Reg);
branchFloat(Assembler::DoubleNotEqual, input, ScratchFloat32Reg,
&traps.intOverflow);
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(float(INT32_MIN), fpscratch);
branchFloat(Assembler::DoubleNotEqual, input, fpscratch, &traps.intOverflow);
jump(rejoin);
}
@ -864,8 +869,9 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
// other case is positive overflow which is converted to
// UINT64_MAX.
Label positive;
loadConstantDouble(0.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThan, input, ScratchDoubleReg,
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(0.0, fpscratch);
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch,
&positive);
move64(Imm64(0), output);
jump(rejoin);
@ -881,8 +887,9 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
jump(rejoin);
bind(&notNaN);
loadConstantDouble(0.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleLessThan, input, ScratchDoubleReg, rejoin);
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(0.0, fpscratch);
branchDouble(Assembler::DoubleLessThan, input, fpscratch, rejoin);
sub64(Imm64(1), output);
}
jump(rejoin);
@ -896,11 +903,12 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
// Handle special values.
if (isUnsigned) {
loadConstantDouble(0.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleGreaterThan, input, ScratchDoubleReg,
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(0.0, fpscratch);
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch,
&traps.intOverflow);
loadConstantDouble(-1.0, ScratchDoubleReg);
branchDouble(Assembler::DoubleLessThanOrEqual, input, ScratchDoubleReg,
loadConstantDouble(-1.0, fpscratch);
branchDouble(Assembler::DoubleLessThanOrEqual, input, fpscratch,
&traps.intOverflow);
jump(rejoin);
return;
@ -909,8 +917,9 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
// We've used vcvtsd2sq. The only legit value whose i64
// truncation is INT64_MIN is double(INT64_MIN): exponent is so
// high that the highest resolution around is much more than 1.
loadConstantDouble(double(int64_t(INT64_MIN)), ScratchDoubleReg);
branchDouble(Assembler::DoubleNotEqual, input, ScratchDoubleReg,
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(double(int64_t(INT64_MIN)), fpscratch);
branchDouble(Assembler::DoubleNotEqual, input, fpscratch,
&traps.intOverflow);
jump(rejoin);
}
@ -929,9 +938,9 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
// other case is positive overflow which is converted to
// UINT64_MAX.
Label positive;
loadConstantFloat32(0.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThan, input, ScratchFloat32Reg,
&positive);
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(0.0f, fpscratch);
branchFloat(Assembler::DoubleGreaterThan, input, fpscratch, &positive);
move64(Imm64(0), output);
jump(rejoin);
@ -946,8 +955,9 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
jump(rejoin);
bind(&notNaN);
loadConstantFloat32(0.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleLessThan, input, ScratchFloat32Reg, rejoin);
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(0.0f, fpscratch);
branchFloat(Assembler::DoubleLessThan, input, fpscratch, rejoin);
sub64(Imm64(1), output);
}
jump(rejoin);
@ -961,20 +971,21 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
// Handle special values.
if (isUnsigned) {
loadConstantFloat32(0.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleGreaterThan, input, ScratchFloat32Reg,
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(0.0f, fpscratch);
branchFloat(Assembler::DoubleGreaterThan, input, fpscratch,
&traps.intOverflow);
loadConstantFloat32(-1.0f, ScratchFloat32Reg);
branchFloat(Assembler::DoubleLessThanOrEqual, input, ScratchFloat32Reg,
loadConstantFloat32(-1.0f, fpscratch);
branchFloat(Assembler::DoubleLessThanOrEqual, input, fpscratch,
&traps.intOverflow);
jump(rejoin);
return;
}
// We've used vcvtss2sq. See comment in outOfLineWasmTruncateDoubleToInt64.
loadConstantFloat32(float(int64_t(INT64_MIN)), ScratchFloat32Reg);
branchFloat(Assembler::DoubleNotEqual, input, ScratchFloat32Reg,
&traps.intOverflow);
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(float(int64_t(INT64_MIN)), fpscratch);
branchFloat(Assembler::DoubleNotEqual, input, fpscratch, &traps.intOverflow);
jump(rejoin);
}

Просмотреть файл

@ -581,9 +581,12 @@ void CodeGeneratorX86::visitOutOfLineTruncate(OutOfLineTruncate* ool) {
// integer, by adding/subtracting 2^32 and then trying to convert to int32.
// This has to be an exact conversion, as otherwise the truncation works
// incorrectly on the modified value.
masm.zeroDouble(ScratchDoubleReg);
masm.vucomisd(ScratchDoubleReg, input);
masm.j(Assembler::Parity, &fail);
{
ScratchDoubleScope fpscratch(masm);
masm.zeroDouble(fpscratch);
masm.vucomisd(fpscratch, input);
masm.j(Assembler::Parity, &fail);
}
{
Label positive;
@ -600,9 +603,10 @@ void CodeGeneratorX86::visitOutOfLineTruncate(OutOfLineTruncate* ool) {
masm.addDouble(input, temp);
masm.vcvttsd2si(temp, output);
masm.vcvtsi2sd(output, ScratchDoubleReg, ScratchDoubleReg);
ScratchDoubleScope fpscratch(masm);
masm.vcvtsi2sd(output, fpscratch, fpscratch);
masm.vucomisd(ScratchDoubleReg, temp);
masm.vucomisd(fpscratch, temp);
masm.j(Assembler::Parity, &fail);
masm.j(Assembler::Equal, ool->rejoin());
}
@ -667,9 +671,12 @@ void CodeGeneratorX86::visitOutOfLineTruncateFloat32(
// integer, by adding/subtracting 2^32 and then trying to convert to int32.
// This has to be an exact conversion, as otherwise the truncation works
// incorrectly on the modified value.
masm.zeroFloat32(ScratchFloat32Reg);
masm.vucomiss(ScratchFloat32Reg, input);
masm.j(Assembler::Parity, &fail);
{
ScratchFloat32Scope fpscratch(masm);
masm.zeroFloat32(fpscratch);
masm.vucomiss(fpscratch, input);
masm.j(Assembler::Parity, &fail);
}
{
Label positive;
@ -686,9 +693,10 @@ void CodeGeneratorX86::visitOutOfLineTruncateFloat32(
masm.addFloat32(input, temp);
masm.vcvttss2si(temp, output);
masm.vcvtsi2ss(output, ScratchFloat32Reg, ScratchFloat32Reg);
ScratchFloat32Scope fpscratch(masm);
masm.vcvtsi2ss(output, fpscratch, fpscratch);
masm.vucomiss(ScratchFloat32Reg, temp);
masm.vucomiss(fpscratch, temp);
masm.j(Assembler::Parity, &fail);
masm.j(Assembler::Equal, ool->rejoin());
}

Просмотреть файл

@ -41,15 +41,14 @@ void MacroAssembler::moveDoubleToGPR64(FloatRegister src, Register64 dest) {
}
void MacroAssembler::moveGPR64ToDouble(Register64 src, FloatRegister dest) {
ScratchDoubleScope scratch(*this);
if (Assembler::HasSSE41()) {
vmovd(src.low, dest);
vpinsrd(1, src.high, dest, dest);
} else {
ScratchDoubleScope fpscratch(*this);
vmovd(src.low, dest);
vmovd(src.high, ScratchDoubleReg);
vunpcklps(ScratchDoubleReg, dest, dest);
vmovd(src.high, fpscratch);
vunpcklps(fpscratch, dest, dest);
}
}

Просмотреть файл

@ -921,9 +921,10 @@ void MacroAssembler::wasmTruncateDoubleToUInt32(FloatRegister input,
vcvttsd2si(input, output);
branch32(Assembler::Condition::NotSigned, output, Imm32(0), &done);
loadConstantDouble(double(int32_t(0x80000000)), ScratchDoubleReg);
addDouble(input, ScratchDoubleReg);
vcvttsd2si(ScratchDoubleReg, output);
ScratchDoubleScope fpscratch(*this);
loadConstantDouble(double(int32_t(0x80000000)), fpscratch);
addDouble(input, fpscratch);
vcvttsd2si(fpscratch, output);
branch32(Assembler::Condition::Signed, output, Imm32(0), oolEntry);
or32(Imm32(0x80000000), output);
@ -939,9 +940,10 @@ void MacroAssembler::wasmTruncateFloat32ToUInt32(FloatRegister input,
vcvttss2si(input, output);
branch32(Assembler::Condition::NotSigned, output, Imm32(0), &done);
loadConstantFloat32(float(int32_t(0x80000000)), ScratchFloat32Reg);
addFloat32(input, ScratchFloat32Reg);
vcvttss2si(ScratchFloat32Reg, output);
ScratchFloat32Scope fpscratch(*this);
loadConstantFloat32(float(int32_t(0x80000000)), fpscratch);
addFloat32(input, fpscratch);
vcvttss2si(fpscratch, output);
branch32(Assembler::Condition::Signed, output, Imm32(0), oolEntry);
or32(Imm32(0x80000000), output);

Просмотреть файл

@ -787,30 +787,30 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared {
loadDouble(Operand(src), dest);
}
void unboxDouble(const ValueOperand& src, FloatRegister dest) {
MOZ_ASSERT(dest != ScratchDoubleReg);
if (Assembler::HasSSE41()) {
vmovd(src.payloadReg(), dest);
vpinsrd(1, src.typeReg(), dest, dest);
} else {
ScratchDoubleScope fpscratch(asMasm());
vmovd(src.payloadReg(), dest);
vmovd(src.typeReg(), ScratchDoubleReg);
vunpcklps(ScratchDoubleReg, dest, dest);
vmovd(src.typeReg(), fpscratch);
vunpcklps(fpscratch, dest, dest);
}
}
void unboxDouble(const Operand& payload, const Operand& type,
Register scratch, FloatRegister dest) {
MOZ_ASSERT(dest != ScratchDoubleReg);
if (Assembler::HasSSE41()) {
movl(payload, scratch);
vmovd(scratch, dest);
movl(type, scratch);
vpinsrd(1, scratch, dest, dest);
} else {
ScratchDoubleScope fpscratch(asMasm());
movl(payload, scratch);
vmovd(scratch, dest);
movl(type, scratch);
vmovd(scratch, ScratchDoubleReg);
vunpcklps(ScratchDoubleReg, dest, dest);
vmovd(scratch, fpscratch);
vunpcklps(fpscratch, dest, dest);
}
}
inline void unboxValue(const ValueOperand& src, AnyRegister dest,

Просмотреть файл

@ -134,18 +134,22 @@ static void SetupABIArguments(MacroAssembler& masm, const FuncExport& fe,
masm.storePtr(scratch, Address(masm.getStackPointer(),
iter->offsetFromArgBase()));
break;
case MIRType::Double:
masm.loadDouble(src, ScratchDoubleReg);
case MIRType::Double: {
ScratchDoubleScope fpscratch(masm);
masm.loadDouble(src, fpscratch);
masm.storeDouble(
ScratchDoubleReg,
fpscratch,
Address(masm.getStackPointer(), iter->offsetFromArgBase()));
break;
case MIRType::Float32:
masm.loadFloat32(src, ScratchFloat32Reg);
}
case MIRType::Float32: {
ScratchFloat32Scope fpscratch(masm);
masm.loadFloat32(src, fpscratch);
masm.storeFloat32(
ScratchFloat32Reg,
fpscratch,
Address(masm.getStackPointer(), iter->offsetFromArgBase()));
break;
}
default:
MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE(
"unexpected stack arg type");
@ -735,15 +739,19 @@ static bool GenerateJitEntry(MacroAssembler& masm, size_t funcExportIndex,
case ExprType::I32:
masm.boxNonDouble(JSVAL_TYPE_INT32, ReturnReg, JSReturnOperand);
break;
case ExprType::F32:
case ExprType::F32: {
masm.canonicalizeFloat(ReturnFloat32Reg);
masm.convertFloat32ToDouble(ReturnFloat32Reg, ReturnDoubleReg);
masm.boxDouble(ReturnDoubleReg, JSReturnOperand, ScratchDoubleReg);
ScratchDoubleScope fpscratch(masm);
masm.boxDouble(ReturnDoubleReg, JSReturnOperand, fpscratch);
break;
case ExprType::F64:
}
case ExprType::F64: {
masm.canonicalizeDouble(ReturnDoubleReg);
masm.boxDouble(ReturnDoubleReg, JSReturnOperand, ScratchDoubleReg);
ScratchDoubleScope fpscratch(masm);
masm.boxDouble(ReturnDoubleReg, JSReturnOperand, fpscratch);
break;
}
case ExprType::Ref:
MOZ_CRASH("return ref in jitentry NYI");
break;
@ -899,14 +907,18 @@ void wasm::GenerateDirectCallFromJit(MacroAssembler& masm, const FuncExport& fe,
Address src = stackArg.addr();
src.offset += masm.framePushed() - framePushedAtStart;
switch (iter.mirType()) {
case MIRType::Double:
masm.loadDouble(src, ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, dst);
case MIRType::Double: {
ScratchDoubleScope fpscratch(masm);
masm.loadDouble(src, fpscratch);
masm.storeDouble(fpscratch, dst);
break;
case MIRType::Float32:
masm.loadFloat32(src, ScratchFloat32Reg);
masm.storeFloat32(ScratchFloat32Reg, dst);
}
case MIRType::Float32: {
ScratchFloat32Scope fpscratch(masm);
masm.loadFloat32(src, fpscratch);
masm.storeFloat32(fpscratch, dst);
break;
}
case MIRType::Int32:
masm.loadPtr(src, scratch);
masm.storePtr(scratch, dst);
@ -993,12 +1005,14 @@ static void StackCopy(MacroAssembler& masm, MIRType type, Register scratch,
masm.loadPtr(src, scratch);
masm.storePtr(scratch, dst);
} else if (type == MIRType::Float32) {
masm.loadFloat32(src, ScratchFloat32Reg);
masm.storeFloat32(ScratchFloat32Reg, dst);
ScratchFloat32Scope fpscratch(masm);
masm.loadFloat32(src, fpscratch);
masm.storeFloat32(fpscratch, dst);
} else {
MOZ_ASSERT(type == MIRType::Double);
masm.loadDouble(src, ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, dst);
ScratchDoubleScope fpscratch(masm);
masm.loadDouble(src, fpscratch);
masm.storeDouble(fpscratch, dst);
}
}
@ -1049,23 +1063,27 @@ static void FillArgumentArray(MacroAssembler& masm, const ValTypeVector& args,
if (type == MIRType::Double) {
if (toValue) {
// Preserve the NaN pattern in the input.
masm.moveDouble(srcReg, ScratchDoubleReg);
srcReg = ScratchDoubleReg;
masm.canonicalizeDouble(srcReg);
ScratchDoubleScope fpscratch(masm);
masm.moveDouble(srcReg, fpscratch);
masm.canonicalizeDouble(fpscratch);
masm.storeDouble(fpscratch, dst);
} else {
masm.storeDouble(srcReg, dst);
}
masm.storeDouble(srcReg, dst);
} else {
MOZ_ASSERT(type == MIRType::Float32);
if (toValue) {
// JS::Values can't store Float32, so convert to a Double.
masm.convertFloat32ToDouble(srcReg, ScratchDoubleReg);
masm.canonicalizeDouble(ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, dst);
ScratchDoubleScope fpscratch(masm);
masm.convertFloat32ToDouble(srcReg, fpscratch);
masm.canonicalizeDouble(fpscratch);
masm.storeDouble(fpscratch, dst);
} else {
// Preserve the NaN pattern in the input.
masm.moveFloat32(srcReg, ScratchFloat32Reg);
masm.canonicalizeFloat(ScratchFloat32Reg);
masm.storeFloat32(ScratchFloat32Reg, dst);
ScratchFloat32Scope fpscratch(masm);
masm.moveFloat32(srcReg, fpscratch);
masm.canonicalizeFloat(fpscratch);
masm.storeFloat32(fpscratch, dst);
}
}
break;
@ -1084,14 +1102,16 @@ static void FillArgumentArray(MacroAssembler& masm, const ValTypeVector& args,
MOZ_CRASH("generating a jit exit for anyref NYI");
} else {
MOZ_ASSERT(IsFloatingPointType(type));
ScratchDoubleScope dscratch(masm);
FloatRegister fscratch = dscratch.asSingle();
if (type == MIRType::Float32) {
masm.loadFloat32(src, ScratchFloat32Reg);
masm.convertFloat32ToDouble(ScratchFloat32Reg, ScratchDoubleReg);
masm.loadFloat32(src, fscratch);
masm.convertFloat32ToDouble(fscratch, dscratch);
} else {
masm.loadDouble(src, ScratchDoubleReg);
masm.loadDouble(src, dscratch);
}
masm.canonicalizeDouble(ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, dst);
masm.canonicalizeDouble(dscratch);
masm.storeDouble(dscratch, dst);
}
} else {
StackCopy(masm, type, scratch, src, dst);

Просмотреть файл

@ -46,8 +46,12 @@ class ADBProcess(object):
return content
def __str__(self):
# Remove -s <serialno> from the error message to allow bug suggestions
# to be independent of the individual failing device.
arg_string = ' '.join(self.args)
arg_string = re.sub(' -s \w+', '', arg_string)
return ('args: %s, exitcode: %s, stdout: %s' % (
' '.join(self.args), self.exitcode, self.stdout))
arg_string, self.exitcode, self.stdout))
# ADBError, ADBRootError, and ADBTimeoutError are treated
# differently in order that unhandled ADBRootErrors and

Просмотреть файл

@ -8,7 +8,7 @@ from __future__ import absolute_import
from setuptools import setup
PACKAGE_NAME = 'mozdevice'
PACKAGE_VERSION = '2.0'
PACKAGE_VERSION = '2.0.1'
deps = ['mozlog >= 3.0']

Просмотреть файл

@ -323,8 +323,11 @@ class AndroidMixin(object):
try:
self.device.install_app(apk)
except (mozdevice.ADBError, mozdevice.ADBTimeoutError):
self.fatal('INFRA-ERROR: Failed to install %s on %s' %
(self.installer_path, self.device_name),
self.info('Failed to install %s on %s' %
(self.installer_path, self.device_name),
exc_info=1)
self.fatal('INFRA-ERROR: Failed to install %s' %
self.installer_path,
EXIT_STATUS_DICT[TBPL_RETRY])
def is_boot_completed(self):

Просмотреть файл

@ -32,7 +32,7 @@ class Output(object):
self.summarized_screenshots = []
self.subtest_alert_on = subtest_alert_on
def summarize(self):
def summarize(self, test_names):
suites = []
test_results = {
'framework': {
@ -43,7 +43,8 @@ class Output(object):
# check if we actually have any results
if len(self.results) == 0:
LOG.error("error: no raptor test results found!")
LOG.error("error: no raptor test results found for %s" %
', '.join(test_names))
return
for test in self.results:
@ -134,7 +135,8 @@ class Output(object):
suite['subtests'] = subtests
else:
LOG.error("output.summarize received unsupported test results type")
LOG.error("output.summarize received unsupported test results type for %s" %
test.name)
return
# for benchmarks there is generally more than one subtest in each cycle
@ -602,10 +604,11 @@ class Output(object):
self.summarized_screenshots.append("""</table></body> </html>""")
def output(self):
def output(self, test_names):
"""output to file and perfherder data json """
if self.summarized_results == {}:
LOG.error("error: no summarized raptor results found!")
LOG.error("error: no summarized raptor results found for %s" %
', '.join(test_names))
return False
if os.environ['MOZ_UPLOAD_DIR']:
@ -650,7 +653,7 @@ class Output(object):
return True
def output_supporting_data(self):
def output_supporting_data(self, test_names):
'''
Supporting data was gathered outside of the main raptor test; it has already
been summarized, now output it appropriately.
@ -661,7 +664,8 @@ class Output(object):
from the actual Raptor test that was ran when the supporting data was gathered.
'''
if len(self.summarized_supporting_data) == 0:
LOG.error("error: no summarized supporting data found!")
LOG.error("error: no summarized supporting data found for %s" %
', '.join(test_names))
return False
for next_data_set in self.summarized_supporting_data:

Просмотреть файл

@ -464,7 +464,7 @@ class Raptor(object):
self.config,
test)
def process_results(self):
def process_results(self, test_names):
# when running locally output results in build/raptor.json; when running
# in production output to a local.json to be turned into tc job artifact
if self.config.get('run_local', False):
@ -477,14 +477,18 @@ class Raptor(object):
raptor_json_path = os.path.join(os.getcwd(), 'local.json')
self.config['raptor_json_path'] = raptor_json_path
return self.results_handler.summarize_and_output(self.config)
return self.results_handler.summarize_and_output(self.config, test_names)
def get_page_timeout_list(self):
return self.results_handler.page_timeout_list
def check_for_crashes(self):
if self.config['app'] in ["geckoview", "fennec"]:
# Turn off verbose to prevent logcat from being inserted into the main log.
verbose = self.device._verbose
self.device._verbose = False
logcat = self.device.get_logcat()
self.device._verbose = verbose
if logcat:
if mozcrash.check_for_java_exception(logcat, "raptor"):
return
@ -589,6 +593,7 @@ def main(args=sys.argv[1:]):
# if a test name specified on command line, and it exists, just run that one
# otherwise run all available raptor tests that are found for this browser
raptor_test_list = get_raptor_test_list(args, mozinfo.os)
raptor_test_names = [raptor_test['name'] for raptor_test in raptor_test_list]
# ensure we have at least one valid test to run
if len(raptor_test_list) == 0:
@ -622,12 +627,13 @@ def main(args=sys.argv[1:]):
raptor.run_test(next_test, timeout=int(next_test['page_timeout']))
success = raptor.process_results()
success = raptor.process_results(raptor_test_names)
raptor.clean_up()
if not success:
# didn't get test results; test timed out or crashed, etc. we want job to fail
LOG.critical("TEST-UNEXPECTED-FAIL: no raptor test results were found")
LOG.critical("TEST-UNEXPECTED-FAIL: no raptor test results were found for %s" %
', '.join(raptor_test_names))
os.sys.exit(1)
# if we have results but one test page timed out (i.e. one tp6 test page didn't load

Просмотреть файл

@ -66,17 +66,17 @@ class RaptorResultsHandler():
self.supporting_data = []
self.supporting_data.append(supporting_data)
def summarize_and_output(self, test_config):
def summarize_and_output(self, test_config, test_names):
# summarize the result data, write to file and output PERFHERDER_DATA
LOG.info("summarizing raptor test results")
output = Output(self.results, self.supporting_data, test_config['subtest_alert_on'])
output.summarize()
output.summarize(test_names)
output.summarize_screenshots(self.images)
# only dump out supporting data (i.e. power) if actual Raptor test completed
if self.supporting_data is not None and len(self.results) != 0:
output.summarize_supporting_data()
output.output_supporting_data()
return output.output()
output.output_supporting_data(test_names)
return output.output(test_names)
class RaptorTestResult():

Просмотреть файл

@ -399,14 +399,9 @@ interface nsIApplicationUpdateService : nsISupports
interface nsIUpdateProcessor : nsISupports
{
/**
* Processes the update which has been downloaded.
* This happens without restarting the application.
* On Windows, this can also be used for switching to an applied
* update request.
* @param update The update being applied, or null if this is a switch
* to updated application request.
* Stages an update while the application is running.
*/
void processUpdate(in nsIUpdate update);
void processUpdate();
/**
* Attempts to fix the permissions of the update directory. This can be done

Просмотреть файл

@ -4011,8 +4011,7 @@ Downloader.prototype = {
// Stage the update
try {
Cc["@mozilla.org/updates/update-processor;1"].
createInstance(Ci.nsIUpdateProcessor).
processUpdate(this._update);
createInstance(Ci.nsIUpdateProcessor).processUpdate();
} catch (e) {
// Fail gracefully in case the application does not support the update
// processor service.

Просмотреть файл

@ -2080,8 +2080,7 @@ function stageUpdate(aCheckSvcLog) {
try {
// Stage the update.
Cc["@mozilla.org/updates/update-processor;1"].
createInstance(Ci.nsIUpdateProcessor).
processUpdate(gUpdateManager.activeUpdate);
createInstance(Ci.nsIUpdateProcessor).processUpdate();
} catch (e) {
Assert.ok(false,
"error thrown while calling processUpdate, exception: " + e);

Просмотреть файл

@ -788,7 +788,7 @@ nsUpdateProcessor::nsUpdateProcessor() : mUpdaterPID(0) {}
nsUpdateProcessor::~nsUpdateProcessor() {}
NS_IMETHODIMP
nsUpdateProcessor::ProcessUpdate(nsIUpdate *aUpdate) {
nsUpdateProcessor::ProcessUpdate() {
nsresult rv;
nsCOMPtr<nsIProperties> ds =

Просмотреть файл

@ -65,7 +65,7 @@ class nsUpdateProcessor final : public nsIUpdateProcessor {
~nsUpdateProcessor();
struct StagedUpdateInfo {
StagedUpdateInfo() : mArgc(0), mArgv(nullptr), mIsOSUpdate(false) {}
StagedUpdateInfo() : mArgc(0), mArgv(nullptr) {}
~StagedUpdateInfo() {
for (int i = 0; i < mArgc; ++i) {
delete[] mArgv[i];
@ -76,11 +76,9 @@ class nsUpdateProcessor final : public nsIUpdateProcessor {
nsCOMPtr<nsIFile> mGREDir;
nsCOMPtr<nsIFile> mAppDir;
nsCOMPtr<nsIFile> mUpdateRoot;
nsCOMPtr<nsIFile> mOSApplyToDir;
int mArgc;
char **mArgv;
nsCString mAppVersion;
bool mIsOSUpdate;
};
private: