Revision: 19227
Author: [email protected]
Date: Mon Feb 10 14:25:11 2014 UTC
Log: A64: Move some deoptimization logic into a separate function
In two follow-up changes, I will add support for the
deoptimize-every-n-times flag, and run the now seperated code from all
DeoptimizeIf* variants
BUG=none
[email protected], [email protected]
LOG=n
Review URL: https://codereview.chromium.org/151523007
http://code.google.com/p/v8/source/detail?r=19227
Modified:
/branches/experimental/a64/src/a64/lithium-codegen-a64.cc
/branches/experimental/a64/src/a64/lithium-codegen-a64.h
=======================================
--- /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Mon Feb 10
13:49:07 2014 UTC
+++ /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Mon Feb 10
14:25:11 2014 UTC
@@ -943,18 +943,19 @@
}
-void LCodeGen::Deoptimize(LEnvironment* environment,
- Deoptimizer::BailoutType bailout_type) {
+bool LCodeGen::DeoptimizeHeader(LEnvironment* environment) {
RegisterEnvironmentForDeoptimization(environment,
Safepoint::kNoLazyDeopt);
ASSERT(environment->HasBeenRegistered());
ASSERT(info()->IsOptimizing() || info()->IsStub());
int id = environment->deoptimization_index();
+ Deoptimizer::BailoutType bailout_type = info()->IsStub() ?
Deoptimizer::LAZY
+ :
Deoptimizer::EAGER;
Address entry =
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
if (entry == NULL) {
Abort(kBailoutWasNotPrepared);
- return;
+ return false;
}
ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on
A64.
@@ -964,13 +965,26 @@
info()->opt_count() == id) {
ASSERT(frame_is_built_);
__ Call(entry, RelocInfo::RUNTIME_ENTRY);
- return;
+ return false;
}
+
+ return true;
+}
+
+
+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();
+ Address entry =
+ Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
if (info()->ShouldTrapOnDeopt()) {
__ Debug("trap_on_deopt", __LINE__, BREAK);
}
-
ASSERT(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to build frame, or restore caller
doubles.
=======================================
--- /branches/experimental/a64/src/a64/lithium-codegen-a64.h Fri Feb 7
21:04:58 2014 UTC
+++ /branches/experimental/a64/src/a64/lithium-codegen-a64.h Mon Feb 10
14:25:11 2014 UTC
@@ -218,6 +218,7 @@
Register temp,
LOperand* index,
String::Encoding encoding);
+ bool DeoptimizeHeader(LEnvironment* environment);
void Deoptimize(LEnvironment* environment);
void Deoptimize(LEnvironment* environment,
Deoptimizer::BailoutType bailout_type);
--
--
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.