summaryrefslogtreecommitdiff
path: root/deps/v8/src/deoptimizer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/deoptimizer.cc')
-rw-r--r--deps/v8/src/deoptimizer.cc31
1 files changed, 15 insertions, 16 deletions
diff --git a/deps/v8/src/deoptimizer.cc b/deps/v8/src/deoptimizer.cc
index 362bd12cb6..644bd29796 100644
--- a/deps/v8/src/deoptimizer.cc
+++ b/deps/v8/src/deoptimizer.cc
@@ -276,6 +276,7 @@ void Deoptimizer::DeoptimizeAll(Isolate* isolate) {
CodeTracer::Scope scope(isolate->GetCodeTracer());
PrintF(scope.file(), "[deoptimize all code in all contexts]\n");
}
+ isolate->AbortConcurrentOptimization(BlockingBehavior::kBlock);
DisallowHeapAllocation no_allocation;
// For all contexts, mark all code, then deoptimize.
Object* context = isolate->heap()->native_contexts_list();
@@ -545,10 +546,8 @@ int LookupCatchHandler(TranslatedFrame* translated_frame, int* data_out) {
switch (translated_frame->kind()) {
case TranslatedFrame::kInterpretedFunction: {
int bytecode_offset = translated_frame->node_id().ToInt();
- BytecodeArray* bytecode =
- translated_frame->raw_shared_info()->bytecode_array();
- HandlerTable* table = HandlerTable::cast(bytecode->handler_table());
- return table->LookupRange(bytecode_offset, data_out, nullptr);
+ HandlerTable table(translated_frame->raw_shared_info()->bytecode_array());
+ return table.LookupRange(bytecode_offset, data_out, nullptr);
}
default:
break;
@@ -956,7 +955,8 @@ void Deoptimizer::DoComputeInterpretedFrame(TranslatedFrame* translated_frame,
(!is_topmost || (bailout_type_ == LAZY)) && !goto_catch_handler
? builtins->builtin(Builtins::kInterpreterEnterBytecodeAdvance)
: builtins->builtin(Builtins::kInterpreterEnterBytecodeDispatch);
- output_frame->SetPc(reinterpret_cast<intptr_t>(dispatch_builtin->entry()));
+ output_frame->SetPc(
+ reinterpret_cast<intptr_t>(dispatch_builtin->InstructionStart()));
// Update constant pool.
if (FLAG_enable_embedded_constant_pool) {
@@ -980,7 +980,7 @@ void Deoptimizer::DoComputeInterpretedFrame(TranslatedFrame* translated_frame,
// Set the continuation for the topmost frame.
Code* continuation = builtins->builtin(Builtins::kNotifyDeoptimized);
output_frame->SetContinuation(
- reinterpret_cast<intptr_t>(continuation->entry()));
+ reinterpret_cast<intptr_t>(continuation->InstructionStart()));
}
}
@@ -1114,7 +1114,7 @@ void Deoptimizer::DoComputeArgumentsAdaptorFrame(
Code* adaptor_trampoline =
builtins->builtin(Builtins::kArgumentsAdaptorTrampoline);
intptr_t pc_value = reinterpret_cast<intptr_t>(
- adaptor_trampoline->instruction_start() +
+ adaptor_trampoline->InstructionStart() +
isolate_->heap()->arguments_adaptor_deopt_pc_offset()->value());
output_frame->SetPc(pc_value);
if (FLAG_enable_embedded_constant_pool) {
@@ -1303,7 +1303,7 @@ void Deoptimizer::DoComputeConstructStubFrame(TranslatedFrame* translated_frame,
// Compute this frame's PC.
DCHECK(bailout_id.IsValidForConstructStub());
- Address start = construct_stub->instruction_start();
+ Address start = construct_stub->InstructionStart();
int pc_offset =
bailout_id == BailoutId::ConstructStubCreate()
? isolate_->heap()->construct_stub_create_deopt_pc_offset()->value()
@@ -1338,7 +1338,7 @@ void Deoptimizer::DoComputeConstructStubFrame(TranslatedFrame* translated_frame,
DCHECK_EQ(LAZY, bailout_type_);
Code* continuation = builtins->builtin(Builtins::kNotifyDeoptimized);
output_frame->SetContinuation(
- reinterpret_cast<intptr_t>(continuation->entry()));
+ reinterpret_cast<intptr_t>(continuation->InstructionStart()));
}
}
@@ -1688,12 +1688,12 @@ void Deoptimizer::DoComputeBuiltinContinuation(
: isolate()->builtins()->builtin(
Builtins::kContinueToCodeStubBuiltin));
output_frame->SetPc(
- reinterpret_cast<intptr_t>(continue_to_builtin->instruction_start()));
+ reinterpret_cast<intptr_t>(continue_to_builtin->InstructionStart()));
Code* continuation =
isolate()->builtins()->builtin(Builtins::kNotifyDeoptimized);
output_frame->SetContinuation(
- reinterpret_cast<intptr_t>(continuation->entry()));
+ reinterpret_cast<intptr_t>(continuation->InstructionStart()));
}
void Deoptimizer::MaterializeHeapObjects() {
@@ -1832,14 +1832,13 @@ void Deoptimizer::EnsureCodeForDeoptimizationEntry(Isolate* isolate,
GenerateDeoptimizationEntries(&masm, kMaxNumberOfEntries, type);
CodeDesc desc;
masm.GetCode(isolate, &desc);
- DCHECK(!RelocInfo::RequiresRelocation(isolate, desc));
+ DCHECK(!RelocInfo::RequiresRelocation(desc));
// Allocate the code as immovable since the entry addresses will be used
// directly and there is no support for relocating them.
Handle<Code> code = isolate->factory()->NewCode(
desc, Code::STUB, Handle<Object>(), Builtins::kNoBuiltinId,
- MaybeHandle<HandlerTable>(), MaybeHandle<ByteArray>(),
- MaybeHandle<DeoptimizationData>(), kImmovable);
+ MaybeHandle<ByteArray>(), MaybeHandle<DeoptimizationData>(), kImmovable);
CHECK(Heap::IsImmovable(*code));
CHECK_NULL(data->deopt_entry_code_[type]);
@@ -2287,7 +2286,7 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(TranslatedState* state,
Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) {
- CHECK(code->instruction_start() <= pc && pc <= code->instruction_end());
+ CHECK(code->InstructionStart() <= pc && pc <= code->InstructionEnd());
SourcePosition last_position = SourcePosition::Unknown();
DeoptimizeReason last_reason = DeoptimizeReason::kUnknown;
int last_deopt_id = kNoDeoptimizationId;
@@ -3906,7 +3905,7 @@ bool TranslatedState::DoUpdateFeedback() {
if (!feedback_vector_handle_.is_null()) {
CHECK(!feedback_slot_.IsInvalid());
isolate()->CountUsage(v8::Isolate::kDeoptimizerDisableSpeculation);
- CallICNexus nexus(feedback_vector_handle_, feedback_slot_);
+ FeedbackNexus nexus(feedback_vector_handle_, feedback_slot_);
nexus.SetSpeculationMode(SpeculationMode::kDisallowSpeculation);
return true;
}