Cleanup unused dead labels and make Label dtor only available in DEBUG.
Change-Id: I59b14188682b5d8843a732aaebf1cc3a4403f7f8 Reviewed-on: https://chromium-review.googlesource.com/c/1454760 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Junliang Yan <jyan@ca.ibm.com> Cr-Commit-Position: refs/heads/master@{#59374}
This commit is contained in:
parent
76f6495c5f
commit
b44dbe7126
@ -1173,8 +1173,7 @@ void TurboAssembler::LslPair(Register dst_low, Register dst_high,
|
||||
Register src_low, Register src_high,
|
||||
uint32_t shift) {
|
||||
DCHECK(!AreAliased(dst_high, src_low));
|
||||
Label less_than_32;
|
||||
Label done;
|
||||
|
||||
if (shift == 0) {
|
||||
Move(dst_high, src_high);
|
||||
Move(dst_low, src_low);
|
||||
@ -1222,8 +1221,7 @@ void TurboAssembler::LsrPair(Register dst_low, Register dst_high,
|
||||
Register src_low, Register src_high,
|
||||
uint32_t shift) {
|
||||
DCHECK(!AreAliased(dst_low, src_high));
|
||||
Label less_than_32;
|
||||
Label done;
|
||||
|
||||
if (shift == 32) {
|
||||
mov(dst_low, src_high);
|
||||
mov(dst_high, Operand(0));
|
||||
@ -1270,8 +1268,7 @@ void TurboAssembler::AsrPair(Register dst_low, Register dst_high,
|
||||
Register src_low, Register src_high,
|
||||
uint32_t shift) {
|
||||
DCHECK(!AreAliased(dst_low, src_high));
|
||||
Label less_than_32;
|
||||
Label done;
|
||||
|
||||
if (shift == 32) {
|
||||
mov(dst_low, src_high);
|
||||
asr(dst_high, src_high, Operand(31));
|
||||
|
@ -4889,7 +4889,9 @@ void Assembler::EmitVeneers(bool force_emit, bool need_protection, int margin) {
|
||||
|
||||
EmitVeneersGuard();
|
||||
|
||||
#ifdef DEBUG
|
||||
Label veneer_size_check;
|
||||
#endif
|
||||
|
||||
std::multimap<int, FarBranchInfo>::iterator it, it_to_delete;
|
||||
|
||||
|
@ -237,8 +237,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
// Replace the current (input) frame with the output frames.
|
||||
Label outer_push_loop, inner_push_loop,
|
||||
outer_loop_header, inner_loop_header;
|
||||
Label outer_push_loop, outer_loop_header;
|
||||
__ Ldrsw(x1, MemOperand(x4, Deoptimizer::output_count_offset()));
|
||||
__ Ldr(x0, MemOperand(x4, Deoptimizer::output_offset()));
|
||||
__ Add(x1, x0, Operand(x1, LSL, kPointerSizeLog2));
|
||||
|
@ -52,7 +52,6 @@ void Builtins::Generate_InternalArrayConstructor(MacroAssembler* masm) {
|
||||
// -- lr : return address
|
||||
// -- sp[...]: constructor arguments
|
||||
// -----------------------------------
|
||||
Label generic_array_code, one_or_more_arguments, two_or_more_arguments;
|
||||
|
||||
if (FLAG_debug_code) {
|
||||
// Initial map for the builtin InternalArray functions should be maps.
|
||||
@ -2718,7 +2717,7 @@ void Builtins::Generate_MathPowInternal(MacroAssembler* masm) {
|
||||
const Register integer_exponent = r4;
|
||||
const Register scratch = r5;
|
||||
|
||||
Label call_runtime, done, int_exponent;
|
||||
Label done, int_exponent;
|
||||
|
||||
// Detect integer exponents stored as double.
|
||||
__ TryDoubleToInt32Exact(integer_exponent, double_exponent, double_scratch);
|
||||
|
@ -203,7 +203,7 @@ void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args,
|
||||
// Check the stack for overflow.
|
||||
// We are not trying to catch interruptions (e.g. debug break and
|
||||
// preemption) here, so the "real stack limit" is checked.
|
||||
Label enough_stack_space;
|
||||
|
||||
__ LoadRoot(scratch, RootIndex::kRealStackLimit);
|
||||
// Make scratch the space we have left. The stack might already be overflowed
|
||||
// here which will cause scratch to become negative.
|
||||
@ -650,7 +650,7 @@ void Generate_JSEntryVariant(MacroAssembler* masm, StackFrame::Type type,
|
||||
|
||||
// Push the JS entry frame marker. Also set js_entry_sp if this is the
|
||||
// outermost JS call.
|
||||
Label non_outermost_js, done;
|
||||
Label done;
|
||||
ExternalReference js_entry_sp = ExternalReference::Create(
|
||||
IsolateAddressId::kJSEntrySPAddress, masm->isolate());
|
||||
__ Mov(x10, js_entry_sp);
|
||||
@ -1889,7 +1889,6 @@ void Builtins::Generate_FunctionPrototypeCall(MacroAssembler* masm) {
|
||||
// Copy arguments two slots higher in memory, overwriting the original
|
||||
// receiver and padding.
|
||||
{
|
||||
Label loop;
|
||||
Register copy_from = x10;
|
||||
Register copy_to = x11;
|
||||
Register count = x12;
|
||||
|
@ -1813,7 +1813,6 @@ void Builtins::Generate_InternalArrayConstructor(MacroAssembler* masm) {
|
||||
// -- esp[0] : return address
|
||||
// -- esp[4] : last argument
|
||||
// -----------------------------------
|
||||
Label generic_array_code;
|
||||
|
||||
if (FLAG_debug_code) {
|
||||
// Initial map for the builtin InternalArray function should be a map.
|
||||
@ -2894,7 +2893,7 @@ void Builtins::Generate_MathPowInternal(MacroAssembler* masm) {
|
||||
const XMMRegister double_exponent = xmm1;
|
||||
const XMMRegister double_scratch = xmm4;
|
||||
|
||||
Label call_runtime, done, exponent_not_smi, int_exponent;
|
||||
Label call_runtime, done, int_exponent;
|
||||
|
||||
// Save 1 in double_result - we need this several times later on.
|
||||
__ mov(scratch, Immediate(1));
|
||||
|
@ -45,7 +45,6 @@ void Builtins::Generate_InternalArrayConstructor(MacroAssembler* masm) {
|
||||
// -- lr : return address
|
||||
// -- sp[...]: constructor arguments
|
||||
// -----------------------------------
|
||||
Label generic_array_code, one_or_more_arguments, two_or_more_arguments;
|
||||
|
||||
if (FLAG_debug_code) {
|
||||
// Initial map for the builtin InternalArray functions should be maps.
|
||||
@ -92,7 +91,6 @@ static void GenerateTailCallToReturnedCode(MacroAssembler* masm,
|
||||
namespace {
|
||||
|
||||
void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
|
||||
Label post_instantiation_deopt_entry;
|
||||
// ----------- S t a t e -------------
|
||||
// -- r3 : number of arguments
|
||||
// -- r4 : constructor function
|
||||
@ -2845,7 +2843,7 @@ void Builtins::Generate_MathPowInternal(MacroAssembler* masm) {
|
||||
const Register scratch = r11;
|
||||
const Register scratch2 = r10;
|
||||
|
||||
Label call_runtime, done, int_exponent;
|
||||
Label done, int_exponent;
|
||||
|
||||
// Detect integer exponents stored as double.
|
||||
__ TryDoubleToInt32Exact(scratch, double_exponent, scratch2, double_scratch);
|
||||
|
@ -1857,7 +1857,6 @@ void Builtins::Generate_InternalArrayConstructor(MacroAssembler* masm) {
|
||||
// -- rsp[0] : return address
|
||||
// -- rsp[8] : last argument
|
||||
// -----------------------------------
|
||||
Label generic_array_code;
|
||||
|
||||
if (FLAG_debug_code) {
|
||||
Register decompr_scratch_for_debug =
|
||||
@ -2943,7 +2942,7 @@ void Builtins::Generate_MathPowInternal(MacroAssembler* masm) {
|
||||
const XMMRegister double_exponent = xmm1;
|
||||
const XMMRegister double_scratch = xmm4;
|
||||
|
||||
Label call_runtime, done, exponent_not_smi, int_exponent;
|
||||
Label call_runtime, done, int_exponent;
|
||||
|
||||
// Save 1 in double_result - we need this several times later on.
|
||||
__ movq(scratch, Immediate(1));
|
||||
@ -3137,7 +3136,6 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
|
||||
Label promote_scheduled_exception;
|
||||
Label delete_allocated_handles;
|
||||
Label leave_exit_frame;
|
||||
Label write_back;
|
||||
|
||||
Isolate* isolate = masm->isolate();
|
||||
Factory* factory = isolate->factory();
|
||||
|
@ -1262,7 +1262,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
__ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister());
|
||||
break;
|
||||
case kSSEFloat32Max: {
|
||||
Label compare_nan, compare_swap, done_compare;
|
||||
Label compare_swap, done_compare;
|
||||
if (instr->InputAt(1)->IsFPRegister()) {
|
||||
__ ucomiss(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
|
||||
} else {
|
||||
@ -1288,7 +1288,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
}
|
||||
|
||||
case kSSEFloat64Max: {
|
||||
Label compare_nan, compare_swap, done_compare;
|
||||
Label compare_swap, done_compare;
|
||||
if (instr->InputAt(1)->IsFPRegister()) {
|
||||
__ ucomisd(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
|
||||
} else {
|
||||
|
@ -1396,7 +1396,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
break;
|
||||
}
|
||||
case kSSEFloat32Max: {
|
||||
Label compare_nan, compare_swap, done_compare;
|
||||
Label compare_swap, done_compare;
|
||||
if (instr->InputAt(1)->IsFPRegister()) {
|
||||
__ Ucomiss(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
|
||||
} else {
|
||||
@ -1451,7 +1451,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
break;
|
||||
}
|
||||
case kSSEFloat64Max: {
|
||||
Label compare_nan, compare_swap, done_compare;
|
||||
Label compare_swap, done_compare;
|
||||
if (instr->InputAt(1)->IsFPRegister()) {
|
||||
__ Ucomisd(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
|
||||
} else {
|
||||
|
@ -46,10 +46,12 @@ class Label {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
V8_INLINE ~Label() {
|
||||
DCHECK(!is_linked());
|
||||
DCHECK(!is_near_linked());
|
||||
}
|
||||
#endif
|
||||
|
||||
V8_INLINE void Unuse() { pos_ = 0; }
|
||||
V8_INLINE void UnuseNear() { near_link_pos_ = 0; }
|
||||
|
@ -349,7 +349,6 @@ void RegExpMacroAssemblerARM::CheckNotBackReference(int start_reg,
|
||||
bool read_backward,
|
||||
Label* on_no_match) {
|
||||
Label fallthrough;
|
||||
Label success;
|
||||
|
||||
// Find length of back-referenced capture.
|
||||
__ ldr(r0, register_location(start_reg));
|
||||
@ -855,7 +854,6 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
|
||||
if (stack_overflow_label_.is_linked()) {
|
||||
SafeCallTarget(&stack_overflow_label_);
|
||||
// Reached if the backtrack-stack limit has been hit.
|
||||
Label grow_failed;
|
||||
|
||||
// Call GrowStack(backtrack_stackpointer(), &stack_base)
|
||||
static const int num_arguments = 3;
|
||||
|
@ -904,7 +904,6 @@ Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
|
||||
SafeCallTarget(&stack_overflow_label_);
|
||||
// Reached if the backtrack-stack limit has been hit.
|
||||
|
||||
Label grow_failed;
|
||||
// Save registers before calling C function
|
||||
__ push(esi);
|
||||
__ push(edi);
|
||||
|
@ -866,7 +866,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
|
||||
RegList regexp_registers = current_input_offset().bit() |
|
||||
current_character().bit();
|
||||
__ MultiPush(regexp_registers);
|
||||
Label grow_failed;
|
||||
|
||||
// Call GrowStack(backtrack_stackpointer(), &stack_base)
|
||||
static const int num_arguments = 3;
|
||||
__ PrepareCallCFunction(num_arguments, a0);
|
||||
|
@ -903,7 +903,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
|
||||
RegList regexp_registers = current_input_offset().bit() |
|
||||
current_character().bit();
|
||||
__ MultiPush(regexp_registers);
|
||||
Label grow_failed;
|
||||
|
||||
// Call GrowStack(backtrack_stackpointer(), &stack_base)
|
||||
static const int num_arguments = 3;
|
||||
__ PrepareCallCFunction(num_arguments, a0);
|
||||
|
@ -372,7 +372,6 @@ void RegExpMacroAssemblerPPC::CheckNotBackReference(int start_reg,
|
||||
bool read_backward,
|
||||
Label* on_no_match) {
|
||||
Label fallthrough;
|
||||
Label success;
|
||||
|
||||
// Find length of back-referenced capture.
|
||||
__ LoadP(r3, register_location(start_reg), r0);
|
||||
@ -908,8 +907,6 @@ Handle<HeapObject> RegExpMacroAssemblerPPC::GetCode(Handle<String> source) {
|
||||
// Backtrack stack overflow code.
|
||||
if (stack_overflow_label_.is_linked()) {
|
||||
SafeCallTarget(&stack_overflow_label_);
|
||||
// Reached if the backtrack-stack limit has been hit.
|
||||
Label grow_failed;
|
||||
|
||||
// Call GrowStack(backtrack_stackpointer(), &stack_base)
|
||||
static const int num_arguments = 3;
|
||||
|
@ -902,7 +902,6 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
|
||||
if (stack_overflow_label_.is_linked()) {
|
||||
SafeCallTarget(&stack_overflow_label_);
|
||||
// Reached if the backtrack-stack limit has been hit.
|
||||
Label grow_failed;
|
||||
|
||||
// Call GrowStack(backtrack_stackpointer(), &stack_base)
|
||||
static const int num_arguments = 3;
|
||||
|
@ -954,7 +954,6 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) {
|
||||
SafeCallTarget(&stack_overflow_label_);
|
||||
// Reached if the backtrack-stack limit has been hit.
|
||||
|
||||
Label grow_failed;
|
||||
// Save registers before calling C function
|
||||
#ifndef _WIN64
|
||||
// Callee-save in Microsoft 64-bit ABI, but not in AMD64 ABI.
|
||||
|
@ -167,7 +167,6 @@ TEST(3) {
|
||||
T t;
|
||||
|
||||
Assembler assm(AssemblerOptions{});
|
||||
Label L, C;
|
||||
|
||||
__ mov(ip, Operand(sp));
|
||||
__ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit());
|
||||
@ -236,7 +235,6 @@ TEST(4) {
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles and floats.
|
||||
Assembler assm(AssemblerOptions{});
|
||||
Label L, C;
|
||||
|
||||
if (CpuFeatures::IsSupported(VFPv3)) {
|
||||
CpuFeatureScope scope(&assm, VFPv3);
|
||||
@ -1029,7 +1027,6 @@ TEST(13) {
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles and floats.
|
||||
Assembler assm(AssemblerOptions{});
|
||||
Label L, C;
|
||||
|
||||
if (CpuFeatures::IsSupported(VFPv3)) {
|
||||
CpuFeatureScope scope(&assm, VFPv3);
|
||||
@ -2935,7 +2932,6 @@ TEST(ARMv8_float32_vrintX) {
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the floats.
|
||||
Assembler assm(AssemblerOptions{});
|
||||
Label L, C;
|
||||
|
||||
|
||||
if (CpuFeatures::IsSupported(ARMv8)) {
|
||||
@ -3037,7 +3033,6 @@ TEST(ARMv8_vrintX) {
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles and floats.
|
||||
Assembler assm(AssemblerOptions{});
|
||||
Label L, C;
|
||||
|
||||
|
||||
if (CpuFeatures::IsSupported(ARMv8)) {
|
||||
|
@ -2166,7 +2166,7 @@ TEST(far_branch_veneer_broken_link_chain) {
|
||||
|
||||
START();
|
||||
|
||||
Label skip, fail, done;
|
||||
Label fail, done;
|
||||
Label test_1, test_2, test_3;
|
||||
Label far_target;
|
||||
|
||||
|
@ -175,7 +175,6 @@ TEST(3) {
|
||||
T t;
|
||||
|
||||
Assembler assm(AssemblerOptions{});
|
||||
Label L, C;
|
||||
|
||||
__ function_descriptor();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user