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

Unified Diff: src/deoptimizer.cc

Issue 1969423002: [Interpreter] Remove InterpreterExitTrampoline and replace with returning to the entry trampoline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 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
« no previous file with comments | « src/deoptimizer.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 56f6c7f0d03ba309024eabd62bc051b4b9a3a0e3..3c2136fd7484e9cbaeedcc89e051290167421dff 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -841,9 +841,8 @@ void Deoptimizer::DoComputeOutputFrames() {
" @%d => node=%d, pc=0x%08" V8PRIxPTR ", caller sp=0x%08" V8PRIxPTR
", state=%s, took %0.3f ms]\n",
bailout_id_, node_id.ToInt(), output_[index]->GetPc(),
- caller_frame_top_, FullCodeGenerator::State2String(
- static_cast<FullCodeGenerator::State>(
- output_[index]->GetState()->value())),
+ caller_frame_top_, BailoutStateToString(static_cast<BailoutState>(
+ output_[index]->GetState()->value())),
ms);
}
}
@@ -1055,10 +1054,11 @@ void Deoptimizer::DoComputeJSFrame(TranslatedFrame* translated_frame,
// If we are going to the catch handler, then the exception lives in
// the accumulator.
- FullCodeGenerator::State state =
- goto_catch_handler ? FullCodeGenerator::TOS_REG
- : FullCodeGenerator::StateField::decode(pc_and_state);
- output_frame->SetState(Smi::FromInt(state));
+ BailoutState state =
+ goto_catch_handler
+ ? BailoutState::TOS_REGISTER
+ : FullCodeGenerator::BailoutStateField::decode(pc_and_state);
+ output_frame->SetState(Smi::FromInt(static_cast<int>(state)));
// Set the continuation for the topmost frame.
if (is_topmost) {
@@ -1274,7 +1274,9 @@ void Deoptimizer::DoComputeInterpretedFrame(TranslatedFrame* translated_frame,
Code* dispatch_builtin =
builtins->builtin(Builtins::kInterpreterEnterBytecodeDispatch);
output_frame->SetPc(reinterpret_cast<intptr_t>(dispatch_builtin->entry()));
- output_frame->SetState(0);
+ // Restore accumulator (TOS) register.
+ output_frame->SetState(
+ Smi::FromInt(static_cast<int>(BailoutState::TOS_REGISTER)));
// Update constant pool.
if (FLAG_enable_embedded_constant_pool) {
@@ -1290,14 +1292,11 @@ void Deoptimizer::DoComputeInterpretedFrame(TranslatedFrame* translated_frame,
// Set the continuation for the topmost frame.
if (is_topmost) {
- Code* continuation =
- builtins->builtin(Builtins::kInterpreterNotifyDeoptimized);
+ Code* continuation = builtins->builtin(Builtins::kNotifyDeoptimized);
if (bailout_type_ == LAZY) {
- continuation =
- builtins->builtin(Builtins::kInterpreterNotifyLazyDeoptimized);
+ continuation = builtins->builtin(Builtins::kNotifyLazyDeoptimized);
} else if (bailout_type_ == SOFT) {
- continuation =
- builtins->builtin(Builtins::kInterpreterNotifySoftDeoptimized);
+ continuation = builtins->builtin(Builtins::kNotifySoftDeoptimized);
} else {
CHECK_EQ(bailout_type_, EAGER);
}
@@ -1511,7 +1510,7 @@ void Deoptimizer::DoComputeConstructStubFrame(TranslatedFrame* translated_frame,
// value of result register is preserved during continuation execution.
// We do this here by "pushing" the result of the constructor function to the
// top of the reconstructed stack and then using the
- // FullCodeGenerator::TOS_REG machinery.
+ // BailoutState::TOS_REGISTER machinery.
if (is_topmost) {
height_in_bytes += kPointerSize;
}
@@ -1632,7 +1631,8 @@ void Deoptimizer::DoComputeConstructStubFrame(TranslatedFrame* translated_frame,
DebugPrintOutputSlot(value, frame_index, output_offset,
"constructor result\n");
- output_frame->SetState(Smi::FromInt(FullCodeGenerator::TOS_REG));
+ output_frame->SetState(
+ Smi::FromInt(static_cast<int>(BailoutState::TOS_REGISTER)));
}
CHECK_EQ(0u, output_offset);
@@ -1686,7 +1686,7 @@ void Deoptimizer::DoComputeAccessorStubFrame(TranslatedFrame* translated_frame,
// value of result register is preserved during continuation execution.
// We do this here by "pushing" the result of the accessor function to the
// top of the reconstructed stack and then using the
- // FullCodeGenerator::TOS_REG machinery.
+ // BailoutState::TOS_REGISTER machinery.
// We don't need to restore the result in case of a setter call because we
// have to return the stored value but not the result of the setter function.
bool should_preserve_result = is_topmost && !is_setter_stub_frame;
@@ -1805,9 +1805,11 @@ void Deoptimizer::DoComputeAccessorStubFrame(TranslatedFrame* translated_frame,
DebugPrintOutputSlot(value, frame_index, output_offset,
"accessor result\n");
- output_frame->SetState(Smi::FromInt(FullCodeGenerator::TOS_REG));
+ output_frame->SetState(
+ Smi::FromInt(static_cast<int>(BailoutState::TOS_REGISTER)));
} else {
- output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS));
+ output_frame->SetState(
+ Smi::FromInt(static_cast<int>(BailoutState::NO_REGISTERS)));
}
CHECK_EQ(0u, output_offset);
@@ -2062,7 +2064,8 @@ void Deoptimizer::DoComputeCompiledStubFrame(TranslatedFrame* translated_frame,
output_frame->SetConstantPool(constant_pool_value);
output_frame->SetRegister(constant_pool_reg.code(), constant_pool_value);
}
- output_frame->SetState(Smi::FromInt(FullCodeGenerator::NO_REGISTERS));
+ output_frame->SetState(
+ Smi::FromInt(static_cast<int>(BailoutState::NO_REGISTERS)));
Code* notify_failure =
isolate_->builtins()->builtin(Builtins::kNotifyStubFailureSaveDoubles);
output_frame->SetContinuation(
« no previous file with comments | « src/deoptimizer.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698