Revert of [builtins] Introduce a builtin for Abort(). (patchset #5 id:80001 of https://codereview.chromium.org/2156923002/ )
Reason for revert: Blocks roll: https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/builds/1622 Original issue's description: > [builtins] Introduce a builtin for Abort(). > > Calling Runtime::kAbort through a builtin instead of the c-entry stub > will allow to generate the call in a background thread, because a > builtin provides its own handle, whereas a code stub does not. > > @v8-mips-ports: Could you take a special look at the padding that is > done in MacroAssembler::Abort()? > > R=bmeurer@chromium.org, titzer@chromium.org, mstarzinger@chromium.org, v8-mips-ports@googlegroups.com, v8-arm-ports@googlegroups.com > > Committed: https://crrev.com/9be015a254cfff871c56cd129523a729637e9158 > Cr-Commit-Position: refs/heads/master@{#37854} TBR=bmeurer@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,v8-arm-ports@googlegroups.com,v8-mips-ports@googlegroups.com,akos.palfi@imgtec.com,ahaas@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2163603003 Cr-Commit-Position: refs/heads/master@{#37883}
This commit is contained in:
parent
8c50b51ab3
commit
3e8f49ab59
@ -2965,19 +2965,17 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if Abort() has already been initialized.
|
||||
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
|
||||
|
||||
Move(r1, Smi::FromInt(static_cast<int>(reason)));
|
||||
mov(r0, Operand(Smi::FromInt(reason)));
|
||||
push(r0);
|
||||
|
||||
// Disable stub call restrictions to always allow calls to abort.
|
||||
if (!has_frame_) {
|
||||
// We don't actually want to generate a pile of code for this, so just
|
||||
// claim there is a stack frame, without generating one.
|
||||
FrameScope scope(this, StackFrame::NONE);
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
} else {
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
}
|
||||
// will not return here
|
||||
if (is_const_pool_blocked()) {
|
||||
|
@ -4653,18 +4653,16 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
||||
// Avoid infinite recursion; Push contains some assertions that use Abort.
|
||||
NoUseRealAbortsScope no_real_aborts(this);
|
||||
|
||||
// Check if Abort() has already been initialized.
|
||||
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
|
||||
|
||||
Move(x1, Smi::FromInt(static_cast<int>(reason)));
|
||||
Mov(x0, Smi::FromInt(reason));
|
||||
Push(x0);
|
||||
|
||||
if (!has_frame_) {
|
||||
// We don't actually want to generate a pile of code for this, so just
|
||||
// claim there is a stack frame, without generating one.
|
||||
FrameScope scope(this, StackFrame::NONE);
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
} else {
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
}
|
||||
} else {
|
||||
// Load the string to pass to Printf.
|
||||
|
@ -2725,17 +2725,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
|
||||
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_Abort(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r1 : message_id as Smi
|
||||
// -- lr : return address
|
||||
// -----------------------------------
|
||||
__ Push(r1);
|
||||
__ Move(cp, Smi::FromInt(0));
|
||||
__ TailCallRuntime(Runtime::kAbort);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
||||
// The StringToNumber stub takes one argument in r0.
|
||||
|
@ -2810,18 +2810,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
|
||||
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_Abort(MacroAssembler* masm) {
|
||||
ASM_LOCATION("Builtins::Generate_Abort");
|
||||
// ----------- S t a t e -------------
|
||||
// -- x1 : message_id as Smi
|
||||
// -- lr : return address
|
||||
// -----------------------------------
|
||||
__ Push(x1);
|
||||
__ Move(cp, Smi::FromInt(0));
|
||||
__ TailCallRuntime(Runtime::kAbort);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
||||
// The StringToNumber stub takes one argument in x0.
|
||||
|
@ -48,7 +48,6 @@ namespace internal {
|
||||
// DBG: Builtin in platform-dependent assembly, used by the debugger.
|
||||
// Args: name
|
||||
#define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
|
||||
ASM(Abort) \
|
||||
/* Handlers */ \
|
||||
ASM(KeyedLoadIC_Miss) \
|
||||
ASM(KeyedStoreIC_Miss) \
|
||||
|
@ -2698,19 +2698,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
|
||||
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_Abort(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- edx : message_id as Smi
|
||||
// -- esp[0] : return address
|
||||
// -----------------------------------
|
||||
__ PopReturnAddressTo(ecx);
|
||||
__ Push(edx);
|
||||
__ PushReturnAddressFrom(ecx);
|
||||
__ Move(esi, Smi::FromInt(0));
|
||||
__ TailCallRuntime(Runtime::kAbort);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
||||
// The StringToNumber stub takes one argument in eax.
|
||||
|
@ -2793,17 +2793,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
|
||||
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_Abort(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- a0 : message_id as Smi
|
||||
// -- ra : return address
|
||||
// -----------------------------------
|
||||
__ Push(a0);
|
||||
__ Move(cp, Smi::FromInt(0));
|
||||
__ TailCallRuntime(Runtime::kAbort);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
||||
// The StringToNumber stub takes on argument in a0.
|
||||
|
@ -2787,17 +2787,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
|
||||
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_Abort(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- a0 : message_id as Smi
|
||||
// -- ra : return address
|
||||
// -----------------------------------
|
||||
__ Push(a0);
|
||||
__ Move(cp, Smi::FromInt(0));
|
||||
__ TailCallRuntime(Runtime::kAbort);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
||||
// The StringToNumber stub takes on argument in a0.
|
||||
|
@ -2115,19 +2115,6 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
|
||||
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
|
||||
}
|
||||
|
||||
// static
|
||||
void Builtins::Generate_Abort(MacroAssembler* masm) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- rdx : message_id as Smi
|
||||
// -- rsp[0] : return address
|
||||
// -----------------------------------
|
||||
__ PopReturnAddressTo(rcx);
|
||||
__ Push(rdx);
|
||||
__ PushReturnAddressFrom(rcx);
|
||||
__ Move(rsi, Smi::FromInt(0));
|
||||
__ TailCallRuntime(Runtime::kAbort);
|
||||
}
|
||||
|
||||
void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
|
||||
// The StringToNumber stub takes one argument in rax.
|
||||
__ AssertString(rax);
|
||||
|
@ -2876,6 +2876,8 @@ void Heap::CreateInitialObjects() {
|
||||
|
||||
// Initialize compilation cache.
|
||||
isolate_->compilation_cache()->Clear();
|
||||
|
||||
CreateFixedStubs();
|
||||
}
|
||||
|
||||
bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
|
||||
|
@ -2952,19 +2952,15 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if Abort() has already been initialized.
|
||||
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
|
||||
|
||||
Move(edx, Smi::FromInt(static_cast<int>(reason)));
|
||||
|
||||
push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason))));
|
||||
// Disable stub call restrictions to always allow calls to abort.
|
||||
if (!has_frame_) {
|
||||
// We don't actually want to generate a pile of code for this, so just
|
||||
// claim there is a stack frame, without generating one.
|
||||
FrameScope scope(this, StackFrame::NONE);
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
} else {
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
}
|
||||
// will not return here
|
||||
int3();
|
||||
|
@ -2297,9 +2297,6 @@ bool Isolate::Init(Deserializer* des) {
|
||||
|
||||
bootstrapper_->Initialize(create_heap_objects);
|
||||
builtins_.SetUp(this, create_heap_objects);
|
||||
if (create_heap_objects) {
|
||||
heap_.CreateFixedStubs();
|
||||
}
|
||||
|
||||
if (FLAG_log_internal_timer_events) {
|
||||
set_event_logger(Logger::DefaultEventLoggerSentinel);
|
||||
|
@ -5806,19 +5806,16 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if Abort() has already been initialized.
|
||||
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
|
||||
|
||||
Move(a0, Smi::FromInt(static_cast<int>(reason)));
|
||||
|
||||
li(a0, Operand(Smi::FromInt(reason)));
|
||||
push(a0);
|
||||
// Disable stub call restrictions to always allow calls to abort.
|
||||
if (!has_frame_) {
|
||||
// We don't actually want to generate a pile of code for this, so just
|
||||
// claim there is a stack frame, without generating one.
|
||||
FrameScope scope(this, StackFrame::NONE);
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
} else {
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
}
|
||||
// Will not return here.
|
||||
if (is_trampoline_pool_blocked()) {
|
||||
|
@ -6088,19 +6088,16 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if Abort() has already been initialized.
|
||||
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
|
||||
|
||||
Move(a0, Smi::FromInt(static_cast<int>(reason)));
|
||||
|
||||
li(a0, Operand(Smi::FromInt(reason)));
|
||||
push(a0);
|
||||
// Disable stub call restrictions to always allow calls to abort.
|
||||
if (!has_frame_) {
|
||||
// We don't actually want to generate a pile of code for this, so just
|
||||
// claim there is a stack frame, without generating one.
|
||||
FrameScope scope(this, StackFrame::NONE);
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
} else {
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
}
|
||||
// Will not return here.
|
||||
if (is_trampoline_pool_blocked()) {
|
||||
|
@ -638,18 +638,17 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check if Abort() has already been initialized.
|
||||
DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
|
||||
|
||||
Move(rdx, Smi::FromInt(static_cast<int>(reason)));
|
||||
Move(kScratchRegister, Smi::FromInt(static_cast<int>(reason)),
|
||||
Assembler::RelocInfoNone());
|
||||
Push(kScratchRegister);
|
||||
|
||||
if (!has_frame_) {
|
||||
// We don't actually want to generate a pile of code for this, so just
|
||||
// claim there is a stack frame, without generating one.
|
||||
FrameScope scope(this, StackFrame::NONE);
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
} else {
|
||||
Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
|
||||
CallRuntime(Runtime::kAbort);
|
||||
}
|
||||
// Control will not return here.
|
||||
int3();
|
||||
|
Loading…
Reference in New Issue
Block a user