Bug 514570: Simplify code generated for tests against 'null', in cases where we might as well test the whole value. r=dvander

This commit is contained in:
Jim Blandy 2010-09-30 10:57:58 -07:00
Родитель 27624b678f
Коммит 367ff5c266
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -228,8 +228,7 @@ class Assembler : public BaseAssembler
Jump testNull(Assembler::Condition cond, Address address) { Jump testNull(Assembler::Condition cond, Address address) {
loadValue(address, Registers::ValueReg); loadValue(address, Registers::ValueReg);
convertValueToType(Registers::ValueReg); return branchPtr(cond, Registers::ValueReg, Imm64(JSVAL_BITS(JSVAL_NULL)));
return branchPtr(cond, Registers::ValueReg, ImmShiftedTag(JSVAL_SHIFTED_TAG_NULL));
} }
Jump testInt32(Assembler::Condition cond, RegisterID reg) { Jump testInt32(Assembler::Condition cond, RegisterID reg) {