From 367ff5c2665933673a53bee3fa85a99e66998828 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 30 Sep 2010 10:57:58 -0700 Subject: [PATCH] Bug 514570: Simplify code generated for tests against 'null', in cases where we might as well test the whole value. r=dvander --- js/src/methodjit/PunboxAssembler.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/src/methodjit/PunboxAssembler.h b/js/src/methodjit/PunboxAssembler.h index a23e47ec4d07..bde46d72a306 100644 --- a/js/src/methodjit/PunboxAssembler.h +++ b/js/src/methodjit/PunboxAssembler.h @@ -228,8 +228,7 @@ class Assembler : public BaseAssembler Jump testNull(Assembler::Condition cond, Address address) { loadValue(address, Registers::ValueReg); - convertValueToType(Registers::ValueReg); - return branchPtr(cond, Registers::ValueReg, ImmShiftedTag(JSVAL_SHIFTED_TAG_NULL)); + return branchPtr(cond, Registers::ValueReg, Imm64(JSVAL_BITS(JSVAL_NULL))); } Jump testInt32(Assembler::Condition cond, RegisterID reg) {