Remove AbortJS opcode and builtin
This removes the last remaining use of the AbortJS opcode. We now use AbortCSAAssert instead, which is not influenced by the --disable-abortjs flag. The AbortJS runtime function should only be called from JS now. R=mstarzinger@chromium.org Bug: v8:9396 Change-Id: I791da99594f9e1e99991ac8b03e943297d7d41e3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695476 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#62633}
This commit is contained in:
parent
f71ccd7a2b
commit
4a348ab5dd
@ -268,7 +268,6 @@ namespace internal {
|
|||||||
\
|
\
|
||||||
/* Abort */ \
|
/* Abort */ \
|
||||||
TFC(Abort, Abort) \
|
TFC(Abort, Abort) \
|
||||||
TFC(AbortJS, Abort) \
|
|
||||||
TFC(AbortCSAAssert, Abort) \
|
TFC(AbortCSAAssert, Abort) \
|
||||||
\
|
\
|
||||||
/* Built-in functions for Javascript */ \
|
/* Built-in functions for Javascript */ \
|
||||||
|
@ -860,11 +860,6 @@ TF_BUILTIN(Abort, CodeStubAssembler) {
|
|||||||
TailCallRuntime(Runtime::kAbort, NoContextConstant(), message_id);
|
TailCallRuntime(Runtime::kAbort, NoContextConstant(), message_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
TF_BUILTIN(AbortJS, CodeStubAssembler) {
|
|
||||||
TNode<String> message = CAST(Parameter(Descriptor::kMessageOrMessageId));
|
|
||||||
TailCallRuntime(Runtime::kAbortJS, NoContextConstant(), message);
|
|
||||||
}
|
|
||||||
|
|
||||||
TF_BUILTIN(AbortCSAAssert, CodeStubAssembler) {
|
TF_BUILTIN(AbortCSAAssert, CodeStubAssembler) {
|
||||||
TNode<String> message = CAST(Parameter(Descriptor::kMessageOrMessageId));
|
TNode<String> message = CAST(Parameter(Descriptor::kMessageOrMessageId));
|
||||||
TailCallRuntime(Runtime::kAbortCSAAssert, NoContextConstant(), message);
|
TailCallRuntime(Runtime::kAbortCSAAssert, NoContextConstant(), message);
|
||||||
|
@ -881,18 +881,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
AssembleArchTableSwitch(instr);
|
AssembleArchTableSwitch(instr);
|
||||||
DCHECK_EQ(LeaveCC, i.OutputSBit());
|
DCHECK_EQ(LeaveCC, i.OutputSBit());
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == r1);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ stop();
|
|
||||||
unwinding_info_writer_.MarkBlockWillExit();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == r1);
|
DCHECK(i.InputRegister(0) == r1);
|
||||||
{
|
{
|
||||||
|
@ -441,11 +441,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
ArmOperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), r1));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
ArmOperandGenerator g(this);
|
ArmOperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), r1));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), r1));
|
||||||
|
@ -794,18 +794,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
case kArchLookupSwitch:
|
case kArchLookupSwitch:
|
||||||
AssembleArchLookupSwitch(instr);
|
AssembleArchLookupSwitch(instr);
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0).is(x1));
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ Debug("kArchAbortJS", 0, BREAK);
|
|
||||||
unwinding_info_writer_.MarkBlockWillExit();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0).is(x1));
|
DCHECK(i.InputRegister(0).is(x1));
|
||||||
{
|
{
|
||||||
|
@ -535,11 +535,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
Arm64OperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), x1));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
Arm64OperandGenerator g(this);
|
Arm64OperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), x1));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), x1));
|
||||||
|
@ -885,17 +885,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
case kArchComment:
|
case kArchComment:
|
||||||
__ RecordComment(reinterpret_cast<const char*>(i.InputInt32(0)));
|
__ RecordComment(reinterpret_cast<const char*>(i.InputInt32(0)));
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == edx);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ int3();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == edx);
|
DCHECK(i.InputRegister(0) == edx);
|
||||||
{
|
{
|
||||||
|
@ -272,11 +272,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
IA32OperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), edx));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
IA32OperandGenerator g(this);
|
IA32OperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), edx));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), edx));
|
||||||
|
@ -82,7 +82,6 @@ inline RecordWriteMode WriteBarrierKindToRecordWriteMode(
|
|||||||
V(ArchLookupSwitch) \
|
V(ArchLookupSwitch) \
|
||||||
V(ArchTableSwitch) \
|
V(ArchTableSwitch) \
|
||||||
V(ArchNop) \
|
V(ArchNop) \
|
||||||
V(ArchAbortJS) \
|
|
||||||
V(ArchAbortCSAAssert) \
|
V(ArchAbortCSAAssert) \
|
||||||
V(ArchDebugBreak) \
|
V(ArchDebugBreak) \
|
||||||
V(ArchComment) \
|
V(ArchComment) \
|
||||||
|
@ -298,7 +298,6 @@ int InstructionScheduler::GetInstructionFlags(const Instruction* instr) const {
|
|||||||
case kArchTailCallCodeObject:
|
case kArchTailCallCodeObject:
|
||||||
case kArchTailCallAddress:
|
case kArchTailCallAddress:
|
||||||
case kArchTailCallWasm:
|
case kArchTailCallWasm:
|
||||||
case kArchAbortJS:
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
case kArchDebugBreak:
|
case kArchDebugBreak:
|
||||||
return kHasSideEffect;
|
return kHasSideEffect;
|
||||||
|
@ -1326,9 +1326,6 @@ void InstructionSelector::VisitNode(Node* node) {
|
|||||||
case IrOpcode::kStateValues:
|
case IrOpcode::kStateValues:
|
||||||
case IrOpcode::kObjectState:
|
case IrOpcode::kObjectState:
|
||||||
return;
|
return;
|
||||||
case IrOpcode::kAbortJS:
|
|
||||||
VisitAbortJS(node);
|
|
||||||
return;
|
|
||||||
case IrOpcode::kAbortCSAAssert:
|
case IrOpcode::kAbortCSAAssert:
|
||||||
VisitAbortCSAAssert(node);
|
VisitAbortCSAAssert(node);
|
||||||
return;
|
return;
|
||||||
|
@ -827,17 +827,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
case kArchTableSwitch:
|
case kArchTableSwitch:
|
||||||
AssembleArchTableSwitch(instr);
|
AssembleArchTableSwitch(instr);
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == a0);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ stop();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == a0);
|
DCHECK(i.InputRegister(0) == a0);
|
||||||
{
|
{
|
||||||
|
@ -1352,7 +1352,6 @@ int InstructionScheduler::GetInstructionLatency(const Instruction* instr) {
|
|||||||
return AssembleArchLookupSwitchLatency((instr->InputCount() - 2) / 2);
|
return AssembleArchLookupSwitchLatency((instr->InputCount() - 2) / 2);
|
||||||
case kArchTableSwitch:
|
case kArchTableSwitch:
|
||||||
return AssembleArchTableSwitchLatency();
|
return AssembleArchTableSwitchLatency();
|
||||||
case kArchAbortJS:
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
return CallLatency() + 1;
|
return CallLatency() + 1;
|
||||||
case kArchComment:
|
case kArchComment:
|
||||||
|
@ -274,11 +274,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(alignment)), 0, nullptr);
|
sequence()->AddImmediate(Constant(alignment)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
MipsOperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), a0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
MipsOperandGenerator g(this);
|
MipsOperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), a0));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), a0));
|
||||||
|
@ -805,17 +805,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
case kArchTableSwitch:
|
case kArchTableSwitch:
|
||||||
AssembleArchTableSwitch(instr);
|
AssembleArchTableSwitch(instr);
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == a0);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ stop();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == a0);
|
DCHECK(i.InputRegister(0) == a0);
|
||||||
{
|
{
|
||||||
|
@ -1263,7 +1263,6 @@ int InstructionScheduler::GetInstructionLatency(const Instruction* instr) {
|
|||||||
return AssembleArchLookupSwitchLatency(instr);
|
return AssembleArchLookupSwitchLatency(instr);
|
||||||
case kArchTableSwitch:
|
case kArchTableSwitch:
|
||||||
return AssembleArchTableSwitchLatency();
|
return AssembleArchTableSwitchLatency();
|
||||||
case kArchAbortJS:
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
return CallLatency() + 1;
|
return CallLatency() + 1;
|
||||||
case kArchDebugBreak:
|
case kArchDebugBreak:
|
||||||
|
@ -334,11 +334,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(alignment)), 0, nullptr);
|
sequence()->AddImmediate(Constant(alignment)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
Mips64OperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), a0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
Mips64OperandGenerator g(this);
|
Mips64OperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), a0));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), a0));
|
||||||
|
@ -1083,17 +1083,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
AssembleArchTableSwitch(instr);
|
AssembleArchTableSwitch(instr);
|
||||||
DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == r4);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ stop();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == r4);
|
DCHECK(i.InputRegister(0) == r4);
|
||||||
{
|
{
|
||||||
|
@ -173,11 +173,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
PPCOperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), r4));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
PPCOperandGenerator g(this);
|
PPCOperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), r4));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), r4));
|
||||||
|
@ -1558,17 +1558,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
case kArchTableSwitch:
|
case kArchTableSwitch:
|
||||||
AssembleArchTableSwitch(instr);
|
AssembleArchTableSwitch(instr);
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == r3);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ stop();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == r3);
|
DCHECK(i.InputRegister(0) == r3);
|
||||||
{
|
{
|
||||||
|
@ -690,11 +690,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
S390OperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), r3));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
S390OperandGenerator g(this);
|
S390OperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), r3));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), r3));
|
||||||
|
@ -966,18 +966,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
|||||||
case kArchComment:
|
case kArchComment:
|
||||||
__ RecordComment(reinterpret_cast<const char*>(i.InputInt64(0)));
|
__ RecordComment(reinterpret_cast<const char*>(i.InputInt64(0)));
|
||||||
break;
|
break;
|
||||||
case kArchAbortJS:
|
|
||||||
DCHECK(i.InputRegister(0) == rdx);
|
|
||||||
{
|
|
||||||
// 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(tasm(), StackFrame::NONE);
|
|
||||||
__ Call(isolate()->builtins()->builtin_handle(Builtins::kAbortJS),
|
|
||||||
RelocInfo::CODE_TARGET);
|
|
||||||
}
|
|
||||||
__ int3();
|
|
||||||
unwinding_info_writer_.MarkBlockWillExit();
|
|
||||||
break;
|
|
||||||
case kArchAbortCSAAssert:
|
case kArchAbortCSAAssert:
|
||||||
DCHECK(i.InputRegister(0) == rdx);
|
DCHECK(i.InputRegister(0) == rdx);
|
||||||
{
|
{
|
||||||
|
@ -309,11 +309,6 @@ void InstructionSelector::VisitStackSlot(Node* node) {
|
|||||||
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
sequence()->AddImmediate(Constant(slot)), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortJS(Node* node) {
|
|
||||||
X64OperandGenerator g(this);
|
|
||||||
Emit(kArchAbortJS, g.NoOutput(), g.UseFixed(node->InputAt(0), rdx));
|
|
||||||
}
|
|
||||||
|
|
||||||
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
void InstructionSelector::VisitAbortCSAAssert(Node* node) {
|
||||||
X64OperandGenerator g(this);
|
X64OperandGenerator g(this);
|
||||||
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), rdx));
|
Emit(kArchAbortCSAAssert, g.NoOutput(), g.UseFixed(node->InputAt(0), rdx));
|
||||||
|
@ -226,11 +226,12 @@ void CodeAssembler::GenerateCheckMaybeObjectIsObject(Node* node,
|
|||||||
IntPtrConstant(kHeapObjectTagMask)),
|
IntPtrConstant(kHeapObjectTagMask)),
|
||||||
IntPtrConstant(kWeakHeapObjectTag)),
|
IntPtrConstant(kWeakHeapObjectTag)),
|
||||||
&ok);
|
&ok);
|
||||||
Node* message_node = StringConstant(location);
|
EmbeddedVector<char, 1024> message;
|
||||||
// TODO(clemensh): Avoid {AbortJS} here, as it will be disabled by fuzzers
|
SNPrintF(message, "no Object: %s", location);
|
||||||
// (via --disable-abortjs). Remove the {AbortJS} opcode and builtin
|
Node* message_node = StringConstant(message.begin());
|
||||||
// afterwards.
|
// This somewhat misuses the AbortCSAAssert runtime function. This will print
|
||||||
AbortJS(message_node);
|
// "abort: CSA_ASSERT failed: <message>", which is good enough.
|
||||||
|
AbortCSAAssert(message_node);
|
||||||
Unreachable();
|
Unreachable();
|
||||||
Bind(&ok);
|
Bind(&ok);
|
||||||
}
|
}
|
||||||
@ -412,10 +413,6 @@ void CodeAssembler::ReturnRaw(Node* value) {
|
|||||||
return raw_assembler()->Return(value);
|
return raw_assembler()->Return(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeAssembler::AbortJS(Node* message) {
|
|
||||||
raw_assembler()->AbortJS(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CodeAssembler::AbortCSAAssert(Node* message) {
|
void CodeAssembler::AbortCSAAssert(Node* message) {
|
||||||
raw_assembler()->AbortCSAAssert(message);
|
raw_assembler()->AbortCSAAssert(message);
|
||||||
}
|
}
|
||||||
|
@ -893,7 +893,6 @@ class V8_EXPORT_PRIVATE CodeAssembler {
|
|||||||
|
|
||||||
void ReturnRaw(Node* value);
|
void ReturnRaw(Node* value);
|
||||||
|
|
||||||
void AbortJS(Node* message);
|
|
||||||
void AbortCSAAssert(Node* message);
|
void AbortCSAAssert(Node* message);
|
||||||
void DebugBreak();
|
void DebugBreak();
|
||||||
void Unreachable();
|
void Unreachable();
|
||||||
|
@ -46,7 +46,6 @@ Reduction CsaLoadElimination::Reduce(Node* node) {
|
|||||||
case IrOpcode::kStoreToObject:
|
case IrOpcode::kStoreToObject:
|
||||||
return ReduceStoreToObject(node, ObjectAccessOf(node->op()));
|
return ReduceStoreToObject(node, ObjectAccessOf(node->op()));
|
||||||
case IrOpcode::kDebugBreak:
|
case IrOpcode::kDebugBreak:
|
||||||
case IrOpcode::kAbortJS:
|
|
||||||
case IrOpcode::kAbortCSAAssert:
|
case IrOpcode::kAbortCSAAssert:
|
||||||
// Avoid changing optimizations in the presence of debug instructions.
|
// Avoid changing optimizations in the presence of debug instructions.
|
||||||
return PropagateInputState(node);
|
return PropagateInputState(node);
|
||||||
|
@ -558,7 +558,6 @@ class MachineRepresentationChecker {
|
|||||||
case IrOpcode::kParameter:
|
case IrOpcode::kParameter:
|
||||||
case IrOpcode::kProjection:
|
case IrOpcode::kProjection:
|
||||||
break;
|
break;
|
||||||
case IrOpcode::kAbortJS:
|
|
||||||
case IrOpcode::kAbortCSAAssert:
|
case IrOpcode::kAbortCSAAssert:
|
||||||
CheckValueInputIsTagged(node, 0);
|
CheckValueInputIsTagged(node, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -821,13 +821,6 @@ struct MachineOperatorGlobalCache {
|
|||||||
};
|
};
|
||||||
Word64PoisonOnSpeculation kWord64PoisonOnSpeculation;
|
Word64PoisonOnSpeculation kWord64PoisonOnSpeculation;
|
||||||
|
|
||||||
struct AbortJSOperator : public Operator {
|
|
||||||
AbortJSOperator()
|
|
||||||
: Operator(IrOpcode::kAbortJS, Operator::kNoThrow, "AbortJS", 1, 1, 1,
|
|
||||||
0, 1, 0) {}
|
|
||||||
};
|
|
||||||
AbortJSOperator kAbortJS;
|
|
||||||
|
|
||||||
struct AbortCSAAssertOperator : public Operator {
|
struct AbortCSAAssertOperator : public Operator {
|
||||||
AbortCSAAssertOperator()
|
AbortCSAAssertOperator()
|
||||||
: Operator(IrOpcode::kAbortCSAAssert, Operator::kNoThrow,
|
: Operator(IrOpcode::kAbortCSAAssert, Operator::kNoThrow,
|
||||||
@ -1026,8 +1019,6 @@ const Operator* MachineOperatorBuilder::BitcastMaybeObjectToWord() {
|
|||||||
return &cache_.kBitcastMaybeObjectToWord;
|
return &cache_.kBitcastMaybeObjectToWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Operator* MachineOperatorBuilder::AbortJS() { return &cache_.kAbortJS; }
|
|
||||||
|
|
||||||
const Operator* MachineOperatorBuilder::AbortCSAAssert() {
|
const Operator* MachineOperatorBuilder::AbortCSAAssert() {
|
||||||
return &cache_.kAbortCSAAssert;
|
return &cache_.kAbortCSAAssert;
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,6 @@ class V8_EXPORT_PRIVATE MachineOperatorBuilder final
|
|||||||
AlignmentRequirements::FullUnalignedAccessSupport());
|
AlignmentRequirements::FullUnalignedAccessSupport());
|
||||||
|
|
||||||
const Operator* Comment(const char* msg);
|
const Operator* Comment(const char* msg);
|
||||||
const Operator* AbortJS();
|
|
||||||
const Operator* AbortCSAAssert();
|
const Operator* AbortCSAAssert();
|
||||||
const Operator* DebugBreak();
|
const Operator* DebugBreak();
|
||||||
const Operator* UnsafePointerAdd();
|
const Operator* UnsafePointerAdd();
|
||||||
|
@ -99,7 +99,6 @@ bool CanAllocate(const Node* node) {
|
|||||||
case IrOpcode::kBitcastTaggedToWord:
|
case IrOpcode::kBitcastTaggedToWord:
|
||||||
case IrOpcode::kBitcastWordToTagged:
|
case IrOpcode::kBitcastWordToTagged:
|
||||||
case IrOpcode::kComment:
|
case IrOpcode::kComment:
|
||||||
case IrOpcode::kAbortJS:
|
|
||||||
case IrOpcode::kAbortCSAAssert:
|
case IrOpcode::kAbortCSAAssert:
|
||||||
case IrOpcode::kDebugBreak:
|
case IrOpcode::kDebugBreak:
|
||||||
case IrOpcode::kDeoptimizeIf:
|
case IrOpcode::kDeoptimizeIf:
|
||||||
|
@ -629,7 +629,6 @@
|
|||||||
MACHINE_FLOAT64_BINOP_LIST(V) \
|
MACHINE_FLOAT64_BINOP_LIST(V) \
|
||||||
MACHINE_FLOAT64_UNOP_LIST(V) \
|
MACHINE_FLOAT64_UNOP_LIST(V) \
|
||||||
MACHINE_WORD64_ATOMIC_OP_LIST(V) \
|
MACHINE_WORD64_ATOMIC_OP_LIST(V) \
|
||||||
V(AbortJS) \
|
|
||||||
V(AbortCSAAssert) \
|
V(AbortCSAAssert) \
|
||||||
V(DebugBreak) \
|
V(DebugBreak) \
|
||||||
V(Comment) \
|
V(Comment) \
|
||||||
|
@ -556,10 +556,6 @@ void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2, Node* v3,
|
|||||||
current_block_ = nullptr;
|
current_block_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RawMachineAssembler::AbortJS(Node* message) {
|
|
||||||
AddNode(machine()->AbortJS(), message);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RawMachineAssembler::AbortCSAAssert(Node* message) {
|
void RawMachineAssembler::AbortCSAAssert(Node* message) {
|
||||||
AddNode(machine()->AbortCSAAssert(), message);
|
AddNode(machine()->AbortCSAAssert(), message);
|
||||||
}
|
}
|
||||||
|
@ -1019,7 +1019,6 @@ class V8_EXPORT_PRIVATE RawMachineAssembler {
|
|||||||
void PopAndReturn(Node* pop, Node* v1, Node* v2, Node* v3, Node* v4);
|
void PopAndReturn(Node* pop, Node* v1, Node* v2, Node* v3, Node* v4);
|
||||||
void Bind(RawMachineLabel* label);
|
void Bind(RawMachineLabel* label);
|
||||||
void Deoptimize(Node* state);
|
void Deoptimize(Node* state);
|
||||||
void AbortJS(Node* message);
|
|
||||||
void AbortCSAAssert(Node* message);
|
void AbortCSAAssert(Node* message);
|
||||||
void DebugBreak();
|
void DebugBreak();
|
||||||
void Unreachable();
|
void Unreachable();
|
||||||
|
@ -934,7 +934,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IrOpcode::kComment:
|
case IrOpcode::kComment:
|
||||||
case IrOpcode::kAbortJS:
|
|
||||||
case IrOpcode::kAbortCSAAssert:
|
case IrOpcode::kAbortCSAAssert:
|
||||||
case IrOpcode::kDebugBreak:
|
case IrOpcode::kDebugBreak:
|
||||||
case IrOpcode::kRetain:
|
case IrOpcode::kRetain:
|
||||||
|
@ -907,7 +907,6 @@ static bool TransitivelyCalledBuiltinHasNoSideEffect(Builtins::Name caller,
|
|||||||
switch (callee) {
|
switch (callee) {
|
||||||
// Transitively called Builtins:
|
// Transitively called Builtins:
|
||||||
case Builtins::kAbort:
|
case Builtins::kAbort:
|
||||||
case Builtins::kAbortJS:
|
|
||||||
case Builtins::kAbortCSAAssert:
|
case Builtins::kAbortCSAAssert:
|
||||||
case Builtins::kAdaptorWithBuiltinExitFrame:
|
case Builtins::kAdaptorWithBuiltinExitFrame:
|
||||||
case Builtins::kArrayConstructorImpl:
|
case Builtins::kArrayConstructorImpl:
|
||||||
|
Loading…
Reference in New Issue
Block a user