Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: src/a64/lithium-codegen-a64.cc

Issue 155723004: A64: Add support for --deopt-every-n-times for n != 2 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: updates Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index eaeb9cee9041b2c621d0af99082553167904fe99..1bf10a62d3123b8fb898f1b34cdf9900197897a3 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -958,14 +958,25 @@ bool LCodeGen::DeoptimizeHeader(LEnvironment* environment) {
return false;
}
- ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on A64.
- TODO_UNIMPLEMENTED("Support for FLAG_deopt_every_n_times >= 2.");
- if (FLAG_deopt_every_n_times == 1 &&
- !info()->IsStub() &&
- info()->opt_count() == id) {
+ if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) {
+ Label not_zero;
+ ExternalReference count = ExternalReference::stress_deopt_count(isolate());
+
+ __ Push(x0, x1);
+ __ Mov(x0, Operand(count));
+ __ Ldr(w1, MemOperand(x0));
+ __ Subs(x1, x1, 1);
+ __ B(gt, &not_zero);
+ __ Mov(w1, FLAG_deopt_every_n_times);
+ __ Str(w1, MemOperand(x0));
+ __ Pop(x0, x1);
ASSERT(frame_is_built_);
__ Call(entry, RelocInfo::RUNTIME_ENTRY);
- return false;
+ __ Unreachable();
+
+ __ Bind(&not_zero);
+ __ Str(w1, MemOperand(x0));
+ __ Pop(x0, x1);
}
return true;
@@ -974,8 +985,6 @@ bool LCodeGen::DeoptimizeHeader(LEnvironment* environment) {
void LCodeGen::Deoptimize(LEnvironment* environment,
Deoptimizer::BailoutType bailout_type) {
- if (!DeoptimizeHeader(environment)) return;
-
ASSERT(environment->HasBeenRegistered());
ASSERT(info()->IsOptimizing() || info()->IsStub());
int id = environment->deoptimization_index();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698