From 4673c5dc4a856d48dc6e24942e63e42e5e51743d Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Fri, 13 Aug 2010 12:36:59 +0000 Subject: [PATCH] ARM: Fix another bug in r5252 Also hoist the load of the valueOf symbol out of the loop. Review URL: http://codereview.chromium.org/3170014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/codegen-arm.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc index 214b3bc..6deb31f 100644 --- a/src/arm/codegen-arm.cc +++ b/src/arm/codegen-arm.cc @@ -4833,10 +4833,13 @@ class DeferredIsStringWrapperSafeForDefaultValueOf : public DeferredCode { // Loop through all the keys in the descriptor array. If one of these is the // symbol valueOf the result is false. Label entry, loop; + // The use of ip to store the valueOf symbol asumes that it is not otherwise + // used in the loop below. + __ mov(ip, Operand(Factory::value_of_symbol())); __ jmp(&entry); __ bind(&loop); - __ ldr(scratch2_, FieldMemOperand(map_result_, 0)); - __ cmp(scratch2_, Operand(Factory::value_of_symbol())); + __ ldr(scratch2_, MemOperand(map_result_, 0)); + __ cmp(scratch2_, ip); __ b(eq, &false_result); __ add(map_result_, map_result_, Operand(kPointerSize)); __ bind(&entry); -- 2.7.4