From 1a12862c9a2bf8f381c23f3d383c74fe0a49da43 Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Wed, 24 Jun 2009 08:56:55 +0000 Subject: [PATCH] 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 --- src/x64/codegen-x64.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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"). -- 2.7.4