зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1003801 - Sort functions based on Bug 1003801 order. r=Vash
This commit is contained in:
Родитель
05a9dd7a95
Коммит
35c6f22465
|
@ -163,41 +163,6 @@ function radd_float(i) {
|
|||
return i;
|
||||
}
|
||||
|
||||
var uceFault_floor_number = eval(uneval(uceFault).replace('uceFault', 'uceFault_floor_number'));
|
||||
function rfloor_number(i) {
|
||||
var x = Math.floor(i + 0.1111);
|
||||
if (uceFault_floor_number(i) || uceFault_floor_number(i))
|
||||
assertEq(x, i);
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_floor_object = eval(uneval(uceFault).replace('uceFault', 'uceFault_floor_object'));
|
||||
function rfloor_object(i) {
|
||||
var t = i + 0.1111;
|
||||
var o = { valueOf: function () { return t; } };
|
||||
var x = Math.floor(o);
|
||||
t = 1000.1111;
|
||||
if (uceFault_floor_object(i) || uceFault_floor_object(i))
|
||||
assertEq(x, i);
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_round_number = eval(uneval(uceFault).replace('uceFault', 'uceFault_round'));
|
||||
function rround_number(i) {
|
||||
var x = Math.round(i + 1.4);
|
||||
if (uceFault_round_number(i) || uceFault_round_number(i))
|
||||
assertEq(x, 100); /* = i + 1*/
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_round_double = eval(uneval(uceFault).replace('uceFault', 'uceFault_round_double'));
|
||||
function rround_double(i) {
|
||||
var x = Math.round(i + (-1 >>> 0));
|
||||
if (uceFault_round_double(i) || uceFault_round_double(i))
|
||||
assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_add_object = eval(uneval(uceFault).replace('uceFault', 'uceFault_add_object'));
|
||||
function radd_object(i) {
|
||||
var t = i;
|
||||
|
@ -331,6 +296,41 @@ function rconcat_number(i) {
|
|||
return i;
|
||||
}
|
||||
|
||||
var uceFault_floor_number = eval(uneval(uceFault).replace('uceFault', 'uceFault_floor_number'));
|
||||
function rfloor_number(i) {
|
||||
var x = Math.floor(i + 0.1111);
|
||||
if (uceFault_floor_number(i) || uceFault_floor_number(i))
|
||||
assertEq(x, i);
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_floor_object = eval(uneval(uceFault).replace('uceFault', 'uceFault_floor_object'));
|
||||
function rfloor_object(i) {
|
||||
var t = i + 0.1111;
|
||||
var o = { valueOf: function () { return t; } };
|
||||
var x = Math.floor(o);
|
||||
t = 1000.1111;
|
||||
if (uceFault_floor_object(i) || uceFault_floor_object(i))
|
||||
assertEq(x, i);
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_round_number = eval(uneval(uceFault).replace('uceFault', 'uceFault_round'));
|
||||
function rround_number(i) {
|
||||
var x = Math.round(i + 1.4);
|
||||
if (uceFault_round_number(i) || uceFault_round_number(i))
|
||||
assertEq(x, 100); /* = i + 1*/
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_round_double = eval(uneval(uceFault).replace('uceFault', 'uceFault_round_double'));
|
||||
function rround_double(i) {
|
||||
var x = Math.round(i + (-1 >>> 0));
|
||||
if (uceFault_round_double(i) || uceFault_round_double(i))
|
||||
assertEq(x, 99 + (-1 >>> 0)); /* = i + 2 ^ 32 - 1 */
|
||||
return i;
|
||||
}
|
||||
|
||||
var uceFault_from_char_code = eval(uneval(uceFault).replace('uceFault', 'uceFault_from_char_code'));
|
||||
function rfrom_char_code(i) {
|
||||
var x = String.fromCharCode(i);
|
||||
|
|
|
@ -391,57 +391,6 @@ RSub::recover(JSContext *cx, SnapshotIterator &iter) const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MConcat::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
MOZ_ASSERT(canRecoverOnBailout());
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_Concat));
|
||||
return true;
|
||||
}
|
||||
|
||||
RConcat::RConcat(CompactBufferReader &reader)
|
||||
{}
|
||||
|
||||
bool
|
||||
RConcat::recover(JSContext *cx, SnapshotIterator &iter) const
|
||||
{
|
||||
RootedValue lhs(cx, iter.read());
|
||||
RootedValue rhs(cx, iter.read());
|
||||
RootedValue result(cx);
|
||||
|
||||
MOZ_ASSERT(!lhs.isObject() && !rhs.isObject());
|
||||
if (!js::AddValues(cx, &lhs, &rhs, &result))
|
||||
return false;
|
||||
|
||||
iter.storeInstructionResult(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MFromCharCode::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
MOZ_ASSERT(canRecoverOnBailout());
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_FromCharCode));
|
||||
return true;
|
||||
}
|
||||
|
||||
RFromCharCode::RFromCharCode(CompactBufferReader &reader)
|
||||
{}
|
||||
|
||||
bool
|
||||
RFromCharCode::recover(JSContext *cx, SnapshotIterator &iter) const
|
||||
{
|
||||
RootedValue operand(cx, iter.read());
|
||||
RootedValue result(cx);
|
||||
|
||||
MOZ_ASSERT(!operand.isObject());
|
||||
if (!js::str_fromCharCode_one_arg(cx, operand, &result))
|
||||
return false;
|
||||
|
||||
iter.storeInstructionResult(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MMul::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
|
@ -534,6 +483,32 @@ RMod::recover(JSContext *cx, SnapshotIterator &iter) const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MConcat::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
MOZ_ASSERT(canRecoverOnBailout());
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_Concat));
|
||||
return true;
|
||||
}
|
||||
|
||||
RConcat::RConcat(CompactBufferReader &reader)
|
||||
{}
|
||||
|
||||
bool
|
||||
RConcat::recover(JSContext *cx, SnapshotIterator &iter) const
|
||||
{
|
||||
RootedValue lhs(cx, iter.read());
|
||||
RootedValue rhs(cx, iter.read());
|
||||
RootedValue result(cx);
|
||||
|
||||
MOZ_ASSERT(!lhs.isObject() && !rhs.isObject());
|
||||
if (!js::AddValues(cx, &lhs, &rhs, &result))
|
||||
return false;
|
||||
|
||||
iter.storeInstructionResult(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MFloor::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
|
@ -582,6 +557,31 @@ RRound::recover(JSContext *cx, SnapshotIterator &iter) const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MFromCharCode::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
MOZ_ASSERT(canRecoverOnBailout());
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_FromCharCode));
|
||||
return true;
|
||||
}
|
||||
|
||||
RFromCharCode::RFromCharCode(CompactBufferReader &reader)
|
||||
{}
|
||||
|
||||
bool
|
||||
RFromCharCode::recover(JSContext *cx, SnapshotIterator &iter) const
|
||||
{
|
||||
RootedValue operand(cx, iter.read());
|
||||
RootedValue result(cx);
|
||||
|
||||
MOZ_ASSERT(!operand.isObject());
|
||||
if (!js::str_fromCharCode_one_arg(cx, operand, &result))
|
||||
return false;
|
||||
|
||||
iter.storeInstructionResult(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MPow::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
|
|
|
@ -219,18 +219,6 @@ class RSub MOZ_FINAL : public RInstruction
|
|||
bool recover(JSContext *cx, SnapshotIterator &iter) const;
|
||||
};
|
||||
|
||||
class RMod MOZ_FINAL : public RInstruction
|
||||
{
|
||||
public:
|
||||
RINSTRUCTION_HEADER_(Mod)
|
||||
|
||||
virtual uint32_t numOperands() const {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool recover(JSContext *cx, SnapshotIterator &iter) const;
|
||||
};
|
||||
|
||||
class RMul MOZ_FINAL : public RInstruction
|
||||
{
|
||||
private:
|
||||
|
@ -261,6 +249,18 @@ class RDiv MOZ_FINAL : public RInstruction
|
|||
bool recover(JSContext *cx, SnapshotIterator &iter) const;
|
||||
};
|
||||
|
||||
class RMod MOZ_FINAL : public RInstruction
|
||||
{
|
||||
public:
|
||||
RINSTRUCTION_HEADER_(Mod)
|
||||
|
||||
virtual uint32_t numOperands() const {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool recover(JSContext *cx, SnapshotIterator &iter) const;
|
||||
};
|
||||
|
||||
class RConcat MOZ_FINAL : public RInstruction
|
||||
{
|
||||
public:
|
||||
|
|
Загрузка…
Ссылка в новой задаче