Reviewers: Kevin Millikin,

Description:
Fix errors in x64 crankshaft port, add failing tests to test expectations.

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

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

Affected files:
  M     src/x64/full-codegen-x64.cc
  M     test/cctest/cctest.status


Index: src/x64/full-codegen-x64.cc
===================================================================
--- src/x64/full-codegen-x64.cc (revision 6193)
+++ src/x64/full-codegen-x64.cc (working copy)
@@ -459,7 +459,10 @@


 void FullCodeGenerator::TestContext::Plug(bool flag) const {
-  codegen()->PrepareForBailoutBeforeSplit(TOS_REG, true, NULL, NULL);
+  codegen()->PrepareForBailoutBeforeSplit(TOS_REG,
+                                          true,
+                                          true_label_,
+                                          false_label_);
   if (flag) {
     if (true_label_ != fall_through_) __ jmp(true_label_);
   } else {
@@ -1380,17 +1383,30 @@
         VisitForStackValue(property->obj());
       }
       break;
-    case KEYED_PROPERTY:
+    case KEYED_PROPERTY: {
       if (expr->is_compound()) {
-        VisitForStackValue(property->obj());
-        VisitForAccumulatorValue(property->key());
+        if (property->is_arguments_access()) {
+          VariableProxy* obj_proxy = property->obj()->AsVariableProxy();
+          __ push(EmitSlotSearch(obj_proxy->var()->AsSlot(), rcx));
+          __ Move(rax, property->key()->AsLiteral()->handle());
+        } else {
+          VisitForStackValue(property->obj());
+          VisitForAccumulatorValue(property->key());
+        }
         __ movq(rdx, Operand(rsp, 0));
         __ push(rax);
       } else {
-        VisitForStackValue(property->obj());
-        VisitForStackValue(property->key());
+        if (property->is_arguments_access()) {
+          VariableProxy* obj_proxy = property->obj()->AsVariableProxy();
+          __ push(EmitSlotSearch(obj_proxy->var()->AsSlot(), rcx));
+          __ Push(property->key()->AsLiteral()->handle());
+        } else {
+          VisitForStackValue(property->obj());
+          VisitForStackValue(property->key());
+        }
       }
       break;
+    }
   }

   if (expr->is_compound()) {
@@ -3119,8 +3135,14 @@
       __ push(rax);  // Copy of receiver, needed for later store.
       EmitNamedPropertyLoad(prop);
     } else {
-      VisitForStackValue(prop->obj());
-      VisitForAccumulatorValue(prop->key());
+      if (prop->is_arguments_access()) {
+        VariableProxy* obj_proxy = prop->obj()->AsVariableProxy();
+        __ push(EmitSlotSearch(obj_proxy->var()->AsSlot(), rcx));
+        __ Move(rax, prop->key()->AsLiteral()->handle());
+      } else {
+        VisitForStackValue(prop->obj());
+        VisitForAccumulatorValue(prop->key());
+      }
       __ movq(rdx, Operand(rsp, 0));  // Leave receiver on stack
       __ push(rax);  // Copy of key, needed for later store.
       EmitKeyedPropertyLoad(prop);
Index: test/cctest/cctest.status
===================================================================
--- test/cctest/cctest.status   (revision 6193)
+++ test/cctest/cctest.status   (working copy)
@@ -57,6 +57,23 @@


##############################################################################
+[ $arch == x64 && $crankshaft ]
+
+# Tests that fail with crankshaft.
+test-deoptimization/DeoptimizeBinaryOperationADDString: FAIL
+test-deoptimization/DeoptimizeBinaryOperationADD: FAIL
+test-deoptimization/DeoptimizeBinaryOperationSUB: FAIL
+test-deoptimization/DeoptimizeBinaryOperationMUL: FAIL
+test-deoptimization/DeoptimizeBinaryOperationMOD: FAIL
+test-deoptimization/DeoptimizeBinaryOperationDIV: FAIL
+test-deoptimization/DeoptimizeLoadICStoreIC: FAIL
+test-deoptimization/DeoptimizeLoadICStoreICNested: FAIL
+
+# Tests that time out with crankshaft.
+test-api/Threading: SKIP
+
+
+##############################################################################
 [ $arch == arm ]

 # Optimization is currently not working on crankshaft x64 and ARM.


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

Reply via email to