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

Unified Diff: src/x64/deoptimizer-x64.cc

Issue 14738009: Ensure that soft-deopts don't count against opt_count (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implement x64 and ARM, review feedback Created 7 years, 7 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
Index: src/x64/deoptimizer-x64.cc
diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc
index 927496c458a09d7be1e9ffa5afc18d649ccfbce8..0e2b49ed029d1cd074db8ead2562eab37218de7a 100644
--- a/src/x64/deoptimizer-x64.cc
+++ b/src/x64/deoptimizer-x64.cc
@@ -530,9 +530,15 @@ void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator,
// Set the continuation for the topmost frame.
if (is_topmost && bailout_type_ != DEBUGGER) {
- Code* continuation = (bailout_type_ == EAGER)
- ? isolate_->builtins()->builtin(Builtins::kNotifyDeoptimized)
- : isolate_->builtins()->builtin(Builtins::kNotifyLazyDeoptimized);
+ Builtins* builtins = isolate_->builtins();
+ Code* continuation = builtins->builtin(Builtins::kNotifyDeoptimized);
+ if (bailout_type_ == LAZY) {
+ continuation = builtins->builtin(Builtins::kNotifyLazyDeoptimized);
+ } else if (bailout_type_ == SOFT) {
+ continuation = builtins->builtin(Builtins::kNotifySoftDeoptimized);
+ } else {
+ ASSERT(bailout_type_ == EAGER);
+ }
output_frame->SetContinuation(
reinterpret_cast<intptr_t>(continuation->entry()));
}
@@ -618,7 +624,7 @@ void Deoptimizer::EntryGenerator::Generate() {
// Get the address of the location in the code object if possible
// and compute the fp-to-sp delta in register arg5.
- if (type() == EAGER) {
+ if (type() == EAGER || type() == SOFT) {
__ Set(arg_reg_4, 0);
__ lea(arg5, Operand(rsp, kSavedRegistersAreaSize + 1 * kPointerSize));
} else {
@@ -669,7 +675,7 @@ void Deoptimizer::EntryGenerator::Generate() {
}
// Remove the bailout id from the stack.
- if (type() == EAGER) {
+ if (type() == EAGER || type() == SOFT) {
__ addq(rsp, Immediate(kPointerSize));
} else {
__ addq(rsp, Immediate(2 * kPointerSize));

Powered by Google App Engine
This is Rietveld 408576698