Reviewers: Rodolph Perfetta (ARM),

Description:
A64: Support the --deopt_every_n_times flag.

Please review this at https://codereview.chromium.org/146833016/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64

Affected files (+8, -1 lines):
  M src/a64/lithium-codegen-a64.cc


Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 2fb24347528e65cdca6cd58b663f72a349f53c41..53019b8de874c1e1756ee8eedc69f25ddb7ecbe0 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -884,7 +884,14 @@ void LCodeGen::Deoptimize(LEnvironment* environment,
     return;
   }

-  TODO_UNIMPLEMENTED("Add support for deopt_every_n_times flag.");
+ ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on A64.
+  if (FLAG_deopt_every_n_times == 1 &&
+      !info()->IsStub() &&
+      info()->opt_count() == id) {
+    __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
+    return;
+  }
+
   if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
     __ Debug("trap_on_deopt", __LINE__, BREAK);
   }


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