Commit 073d0690 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC/s390: [cleanup][TurboProp] Unify DynamicMapChecks names.

Port 7730fd94

Original Commit Message:

    Unifies various operators for dynamic map checks with the naming
    scheme of DynamicCheckMaps (to be similar to CheckMaps.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=v8:10582
LOG=N

Change-Id: I0c7665eb5ec3cd0b0b8217af3ec8e9e18a3d3055
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2569593Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71574}
parent 3a6f75ac
......@@ -3560,23 +3560,23 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
}
void Builtins::Generate_DynamicMapChecksTrampoline(MacroAssembler* masm) {
void Builtins::Generate_DynamicCheckMapsTrampoline(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
// Only save the registers that the DynamicMapChecks builtin can clobber.
DynamicMapChecksDescriptor descriptor;
// Only save the registers that the DynamicCheckMaps builtin can clobber.
DynamicCheckMapsDescriptor descriptor;
RegList registers = descriptor.allocatable_registers();
// FLAG_debug_code is enabled CSA checks will call C function and so we need
// to save all CallerSaved registers too.
if (FLAG_debug_code) registers |= kJSCallerSaved;
__ SaveRegisters(registers);
__ Call(BUILTIN_CODE(masm->isolate(), DynamicMapChecks),
__ Call(BUILTIN_CODE(masm->isolate(), DynamicCheckMaps),
RelocInfo::CODE_TARGET);
Label deopt, bailout;
__ cmpi(r3, Operand(static_cast<int>(DynamicMapChecksStatus::kSuccess)));
__ cmpi(r3, Operand(static_cast<int>(DynamicCheckMapsStatus::kSuccess)));
__ bne(&deopt);
__ RestoreRegisters(registers);
......@@ -3584,12 +3584,12 @@ void Builtins::Generate_DynamicMapChecksTrampoline(MacroAssembler* masm) {
__ Ret();
__ bind(&deopt);
__ cmpi(r3, Operand(static_cast<int>(DynamicMapChecksStatus::kBailout)));
__ cmpi(r3, Operand(static_cast<int>(DynamicCheckMapsStatus::kBailout)));
__ beq(&bailout);
if (FLAG_debug_code) {
__ cmpi(r3, Operand(static_cast<int>(DynamicMapChecksStatus::kDeopt)));
__ Assert(eq, AbortReason::kUnexpectedDynamicMapChecksStatus);
__ cmpi(r3, Operand(static_cast<int>(DynamicCheckMapsStatus::kDeopt)));
__ Assert(eq, AbortReason::kUnexpectedDynamicCheckMapsStatus);
}
__ RestoreRegisters(registers);
__ LeaveFrame(StackFrame::INTERNAL);
......
......@@ -3579,23 +3579,23 @@ void Builtins::Generate_DeoptimizationEntry_Lazy(MacroAssembler* masm) {
Generate_DeoptimizationEntry(masm, DeoptimizeKind::kLazy);
}
void Builtins::Generate_DynamicMapChecksTrampoline(MacroAssembler* masm) {
void Builtins::Generate_DynamicCheckMapsTrampoline(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::MANUAL);
__ EnterFrame(StackFrame::INTERNAL);
// Only save the registers that the DynamicMapChecks builtin can clobber.
DynamicMapChecksDescriptor descriptor;
// Only save the registers that the DynamicCheckMaps builtin can clobber.
DynamicCheckMapsDescriptor descriptor;
RegList registers = descriptor.allocatable_registers();
// FLAG_debug_code is enabled CSA checks will call C function and so we need
// to save all CallerSaved registers too.
if (FLAG_debug_code) registers |= kJSCallerSaved;
__ SaveRegisters(registers);
__ Call(BUILTIN_CODE(masm->isolate(), DynamicMapChecks),
__ Call(BUILTIN_CODE(masm->isolate(), DynamicCheckMaps),
RelocInfo::CODE_TARGET);
Label deopt, bailout;
__ CmpP(r2, Operand(static_cast<int>(DynamicMapChecksStatus::kSuccess)));
__ CmpP(r2, Operand(static_cast<int>(DynamicCheckMapsStatus::kSuccess)));
__ bne(&deopt);
__ RestoreRegisters(registers);
......@@ -3603,12 +3603,12 @@ void Builtins::Generate_DynamicMapChecksTrampoline(MacroAssembler* masm) {
__ Ret();
__ bind(&deopt);
__ CmpP(r2, Operand(static_cast<int>(DynamicMapChecksStatus::kBailout)));
__ CmpP(r2, Operand(static_cast<int>(DynamicCheckMapsStatus::kBailout)));
__ beq(&bailout);
if (FLAG_debug_code) {
__ CmpP(r2, Operand(static_cast<int>(DynamicMapChecksStatus::kDeopt)));
__ Assert(eq, AbortReason::kUnexpectedDynamicMapChecksStatus);
__ CmpP(r2, Operand(static_cast<int>(DynamicCheckMapsStatus::kDeopt)));
__ Assert(eq, AbortReason::kUnexpectedDynamicCheckMapsStatus);
}
__ RestoreRegisters(registers);
__ LeaveFrame(StackFrame::INTERNAL);
......
......@@ -34,7 +34,7 @@ void RecordWriteDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
}
void DynamicMapChecksDescriptor::InitializePlatformSpecific(
void DynamicCheckMapsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register default_stub_registers[] = {r3, r4, r5, r6, cp};
......
......@@ -34,7 +34,7 @@ void RecordWriteDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(kParameterCount, default_stub_registers);
}
void DynamicMapChecksDescriptor::InitializePlatformSpecific(
void DynamicCheckMapsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register default_stub_registers[] = {r2, r3, r4, r5, cp};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment