From: ager@chromium.org Date: Wed, 24 Jun 2009 08:56:55 +0000 (+0000) Subject: Revert attempt to optimize away the allocation of a temporary. X-Git-Tag: upstream/4.7.83~23828 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a12862c9a2bf8f381c23f3d383c74fe0a49da43;p=platform%2Fupstream%2Fv8.git Revert attempt to optimize away the allocation of a temporary. TBR=whesse@chromium.org Review URL: http://codereview.chromium.org/147076 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index a0bd13a..bf454e2 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -1404,10 +1404,12 @@ void CodeGenerator::VisitCallRuntime(CallRuntime* node) { // Prepare stack for calling JS runtime function. frame_->Push(node->name()); // Push the builtins object found in the current global object. - __ movq(kScratchRegister, GlobalObject()); - __ movq(kScratchRegister, - FieldOperand(kScratchRegister, GlobalObject::kBuiltinsOffset)); - frame_->Push(kScratchRegister); + Result temp = allocator()->Allocate(); + ASSERT(temp.is_valid()); + __ movq(temp.reg(), GlobalObject()); + __ movq(temp.reg(), + FieldOperand(temp.reg(), GlobalObject::kBuiltinsOffset)); + frame_->Push(&temp); } // Push the arguments ("left-to-right").