Reviewers: Jakob,

Message:
PTAL

Description:
Fix constant function transition. Insert return instruction before returning.

Please review this at https://chromiumcodereview.appspot.com/17267002/

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

Affected files:
  src/arm/stub-cache-arm.cc
  src/ia32/stub-cache-ia32.cc
  src/x64/stub-cache-x64.cc


Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index 97333e3a3426e5ef794c31d26a87f21d41638c25..decfa74d1569ae674fa01ee8e7a5e8d6b2d1c32d 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -577,7 +577,11 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
                       OMIT_REMEMBERED_SET,
                       OMIT_SMI_CHECK);

-  if (details.type() == CONSTANT_FUNCTION) return;
+  if (details.type() == CONSTANT_FUNCTION) {
+    ASSERT(value_reg.is(r0));
+    __ Ret();
+    return;
+  }

   int index = transition->instance_descriptors()->GetFieldIndex(
       transition->LastAdded());
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index f390f88bb965a31f16411591ca418c445b8fd1eb..c0ee28ad490c0972769f0cabc2c0a2615658594a 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -931,7 +931,11 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
                       OMIT_REMEMBERED_SET,
                       OMIT_SMI_CHECK);

-  if (details.type() == CONSTANT_FUNCTION) return;
+  if (details.type() == CONSTANT_FUNCTION) {
+    ASSERT(value_reg.is(eax));
+    __ ret(0);
+    return;
+  }

   int index = transition->instance_descriptors()->GetFieldIndex(
       transition->LastAdded());
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 3b9b1f487fdfa385b500084cd1915bc73fd4a4c1..79a158c3b385e4814235c2bf9b7b54418d3d94be 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -889,7 +889,11 @@ void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
                       OMIT_REMEMBERED_SET,
                       OMIT_SMI_CHECK);

-  if (details.type() == CONSTANT_FUNCTION) return;
+  if (details.type() == CONSTANT_FUNCTION) {
+    ASSERT(value_reg.is(rax));
+    __ ret(0);
+    return;
+  }

   int index = transition->instance_descriptors()->GetFieldIndex(
       transition->LastAdded());


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to