From 49474f0408d4c429b1e11afe5b009efe9d6ec927 Mon Sep 17 00:00:00 2001 From: "whesse@chromium.org" Date: Mon, 29 Jun 2009 08:11:35 +0000 Subject: [PATCH] X64: Fix error in running handlers, disable TakeValue optimization for count operators. Review URL: http://codereview.chromium.org/150007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/x64/codegen-x64.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index 8fcf050..fc196ce 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -2290,11 +2290,11 @@ void CodeGenerator::VisitAssignment(Assignment* node) { Load(node->value()); } else { - Literal* literal = node->value()->AsLiteral(); + // Literal* literal = node->value()->AsLiteral(); bool overwrite_value = (node->value()->AsBinaryOperation() != NULL && node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); - Variable* right_var = node->value()->AsVariableProxy()->AsVariable(); + // Variable* right_var = node->value()->AsVariableProxy()->AsVariable(); // There are two cases where the target is not read in the right hand // side, that are easy to test for: the right hand side is a literal, // or the right hand side is a different variable. TakeValue invalidates @@ -5840,7 +5840,7 @@ void ArgumentsAccessStub::GenerateReadLength(MacroAssembler* masm) { void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { - // Check that stack should contain frame pointer, code pointer, state and + // Check that stack should contain next handler, frame pointer, state and // return address in that order. ASSERT_EQ(StackHandlerConstants::kFPOffset + kPointerSize, StackHandlerConstants::kStateOffset); @@ -5849,13 +5849,11 @@ void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { ExternalReference handler_address(Top::k_handler_address); __ movq(kScratchRegister, handler_address); - __ movq(rdx, Operand(kScratchRegister, 0)); + __ movq(rsp, Operand(kScratchRegister, 0)); // get next in chain - __ movq(rcx, Operand(rdx, 0)); + __ pop(rcx); __ movq(Operand(kScratchRegister, 0), rcx); - __ movq(rsp, rdx); __ pop(rbp); // pop frame pointer - __ pop(rdx); // remove code pointer __ pop(rdx); // remove state // Before returning we restore the context from the frame pointer if not NULL. @@ -5866,7 +5864,6 @@ void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { __ j(equal, &skip); __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); __ bind(&skip); - __ ret(0); } -- 2.7.4