Reviewers: Lasse Reichstein,

Description:
X64: Fix error in running handlers, disable TakeValue optimization for
count operators.

Please review this at http://codereview.chromium.org/150007

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/x64/codegen-x64.cc


Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc      (revision 2284)
+++ src/x64/codegen-x64.cc      (working copy)
@@ -2290,18 +2290,18 @@
        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
        // the target, with an implicit promise that it will be written to  
again
        // before it is read.
        // TODO(X64): Implement TakeValue optimization.
-      if (false && literal != NULL || (right_var != NULL && right_var !=  
var)) {
+      if (false /* literal != NULL || (right_var != NULL && right_var !=  
var)*/) {
          // target.TakeValue(NOT_INSIDE_TYPEOF);
        } else {
          target.GetValue(NOT_INSIDE_TYPEOF);
@@ -5800,7 +5800,7 @@


  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);
@@ -5809,13 +5809,11 @@

    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.
@@ -5826,7 +5824,6 @@
    __ j(equal, &skip);
    __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
    __ bind(&skip);
-
    __ ret(0);
  }




--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to