Revision: 13643
Author:   [email protected]
Date:     Tue Feb 12 01:34:40 2013
Log:      MIPS: Fix bugs in DeoptimizeIf when lazy deopt is requested.

Port r13633 (9e314349)

BUG=
TEST=

Review URL: https://codereview.chromium.org/12220105
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=13643

Modified:
 /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Thu Feb 7 05:15:41 2013 +++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Feb 12 01:34:40 2013
@@ -772,7 +772,7 @@
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
   ASSERT(environment->HasBeenRegistered());
   int id = environment->deoptimization_index();
-
+  ASSERT(info()->IsOptimizing() || info()->IsStub());
   Deoptimizer::BailoutType bailout_type = info()->IsStub()
       ? Deoptimizer::LAZY
       : Deoptimizer::EAGER;
@@ -783,7 +783,6 @@
   }

ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on MIPS.
-
   if (FLAG_deopt_every_n_times == 1 && info_->opt_count() == id) {
     __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
     return;
@@ -798,10 +797,14 @@
     __ bind(&skip);
   }

+  ASSERT(info()->IsStub() || frame_is_built_);
   bool needs_lazy_deopt = info()->IsStub();
-  ASSERT(info()->IsStub() || frame_is_built_);
-  if (cc == al && !needs_lazy_deopt) {
-    __ Jump(entry, RelocInfo::RUNTIME_ENTRY, cc, src1, src2);
+  if (cc == al && frame_is_built_) {
+    if (needs_lazy_deopt) {
+      __ Call(entry, RelocInfo::RUNTIME_ENTRY, cc, src1, src2);
+    } else {
+      __ Jump(entry, RelocInfo::RUNTIME_ENTRY, cc, src1, src2);
+    }
   } else {
     // We often have several deopts to the same entry, reuse the last
     // jump entry if this is the case.

--
--
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