[macro-assembler] Delete unused JumpIfBothInstanceTypesAreNotSequentialOneByte

Bug: 
Change-Id: Ifc46bd574801ac20f4025c84c5764311890b93da
Reviewed-on: https://chromium-review.googlesource.com/707064
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48372}
This commit is contained in:
Toon Verwaest 2017-10-09 12:58:38 +02:00 committed by Commit Bot
parent 0600830752
commit ddc5855478
16 changed files with 0 additions and 346 deletions

View File

@ -2322,20 +2322,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
// Test that both first and second are sequential one-byte strings.
// Assume that they are non-smis.
ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
JumpIfBothInstanceTypesAreNotSequentialOneByte(scratch1, scratch2, scratch1,
scratch2, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register reg,
Label* not_unique_name) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
@ -2531,21 +2517,6 @@ void TurboAssembler::FloatMinOutOfLine(DwVfpRegister result, DwVfpRegister left,
FloatMinOutOfLineHelper(result, left, right);
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
and_(scratch1, first, Operand(kFlatOneByteStringMask));
and_(scratch2, second, Operand(kFlatOneByteStringMask));
cmp(scratch1, Operand(kFlatOneByteStringTag));
// Ignore second test if first test failed.
cmp(scratch2, Operand(kFlatOneByteStringTag), eq);
b(ne, failure);
}
static const int kRegisterPassedArguments = 4;
int TurboAssembler::CalculateStackPassedWords(int num_reg_arguments,

View File

@ -973,20 +973,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// String utilities
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not. Assumes that neither object is a smi.
void JumpIfNonSmisNotBothSequentialOneByteStrings(Register object1,
Register object2,
Register scratch1,
Register scratch2,
Label* failure);
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* failure);
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name);
void LoadInstanceDescriptors(Register map, Register descriptors);

View File

@ -2046,22 +2046,6 @@ void MacroAssembler::TryRepresentDoubleAsInt(Register as_int, VRegister value,
}
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
DCHECK(!AreAliased(first, second, scratch1, scratch2));
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
And(scratch1, first, kFlatOneByteStringMask);
And(scratch2, second, kFlatOneByteStringMask);
Cmp(scratch1, kFlatOneByteStringTag);
Ccmp(scratch2, kFlatOneByteStringTag, NoFlag, eq);
B(ne, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register type,
Label* not_unique_name) {
STATIC_ASSERT((kInternalizedTag == 0) && (kStringTag == 0));

View File

@ -1805,12 +1805,6 @@ class MacroAssembler : public TurboAssembler {
// ---- String Utilities ----
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* failure);
void JumpIfNotUniqueNameInstanceType(Register type, Label* not_unique_name);
// ---- Calling / Jumping helpers ----

View File

@ -1872,39 +1872,6 @@ void MacroAssembler::LoadAccessor(Register dst, Register holder,
mov(dst, FieldOperand(dst, offset));
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1,
Register object2,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that both objects are not smis.
STATIC_ASSERT(kSmiTag == 0);
mov(scratch1, object1);
and_(scratch1, object2);
JumpIfSmi(scratch1, failure);
// Load instance type for both strings.
mov(scratch1, FieldOperand(object1, HeapObject::kMapOffset));
mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset));
movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
// Check that both are flat one-byte strings.
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
// Interleave bits from both instance types and compare them in one check.
const int kShift = 8;
DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << kShift));
and_(scratch1, kFlatOneByteStringMask);
and_(scratch2, kFlatOneByteStringMask);
shl(scratch2, kShift);
or_(scratch1, scratch2);
cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << kShift));
j(not_equal, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand,
Label* not_unique_name,
Label::Distance distance) {

View File

@ -750,12 +750,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// String utilities.
// Checks if both objects are sequential one-byte strings, and jumps to label
// if either is not.
void JumpIfNotBothSequentialOneByteStrings(
Register object1, Register object2, Register scratch1, Register scratch2,
Label* on_not_flat_one_byte_strings);
// Checks if the given register or operand is a unique name
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name,
Label::Distance distance = Label::kFar) {

View File

@ -5275,21 +5275,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
// Test that both first and second are sequential one-byte strings.
// Assume that they are non-smis.
lw(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
lw(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
lbu(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
lbu(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
JumpIfBothInstanceTypesAreNotSequentialOneByte(scratch1, scratch2, scratch1,
scratch2, failure);
}
void TurboAssembler::Float32Max(FPURegister dst, FPURegister src1,
FPURegister src2, Label* out_of_line) {
if (src1 == src2) {
@ -5464,20 +5449,6 @@ void TurboAssembler::Float64MinOutOfLine(DoubleRegister dst,
add_d(dst, src1, src2);
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
DCHECK(kFlatOneByteStringTag <= 0xffff); // Ensure this fits 16-bit immed.
andi(scratch1, first, kFlatOneByteStringMask);
Branch(failure, ne, scratch1, Operand(kFlatOneByteStringTag));
andi(scratch2, second, kFlatOneByteStringMask);
Branch(failure, ne, scratch2, Operand(kFlatOneByteStringTag));
}
static const int kRegisterPassedArguments = 4;
int TurboAssembler::CalculateStackPassedWords(int num_reg_arguments,

View File

@ -1301,22 +1301,8 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// -------------------------------------------------------------------------
// String utilities.
// Checks if both instance types are sequential ASCII strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* failure);
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not. Assumes that neither object is a smi.
void JumpIfNonSmisNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure);
void LoadInstanceDescriptors(Register map, Register descriptors);
void LoadAccessor(Register dst, Register holder, int accessor_index,
AccessorComponent accessor);

View File

@ -5543,21 +5543,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
// Test that both first and second are sequential one-byte strings.
// Assume that they are non-smis.
Ld(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
Ld(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
Lbu(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
Lbu(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
JumpIfBothInstanceTypesAreNotSequentialOneByte(scratch1, scratch2, scratch1,
scratch2, failure);
}
void TurboAssembler::Float32Max(FPURegister dst, FPURegister src1,
FPURegister src2, Label* out_of_line) {
if (src1 == src2) {
@ -5732,20 +5717,6 @@ void TurboAssembler::Float64MinOutOfLine(FPURegister dst, FPURegister src1,
add_d(dst, src1, src2);
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
DCHECK(kFlatOneByteStringTag <= 0xffff); // Ensure this fits 16-bit immed.
andi(scratch1, first, kFlatOneByteStringMask);
Branch(failure, ne, scratch1, Operand(kFlatOneByteStringTag));
andi(scratch2, second, kFlatOneByteStringMask);
Branch(failure, ne, scratch2, Operand(kFlatOneByteStringTag));
}
static const int kRegisterPassedArguments = 8;
int TurboAssembler::CalculateStackPassedWords(int num_reg_arguments,

View File

@ -1417,22 +1417,8 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// -------------------------------------------------------------------------
// String utilities.
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* failure);
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not. Assumes that neither object is a smi.
void JumpIfNonSmisNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure);
void LoadInstanceDescriptors(Register map, Register descriptors);
void LoadAccessor(Register dst, Register holder, int accessor_index,
AccessorComponent accessor);

View File

@ -2167,20 +2167,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
// Test that both first and second are sequential one-byte strings.
// Assume that they are non-smis.
LoadP(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
LoadP(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
lbz(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
lbz(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
JumpIfBothInstanceTypesAreNotSequentialOneByte(scratch1, scratch2, scratch1,
scratch2, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register reg,
Label* not_unique_name) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
@ -2216,21 +2202,6 @@ void MacroAssembler::AllocateJSValue(Register result, Register constructor,
STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
andi(scratch1, first, Operand(kFlatOneByteStringMask));
andi(scratch2, second, Operand(kFlatOneByteStringMask));
cmpi(scratch1, Operand(kFlatOneByteStringTag));
bne(failure);
cmpi(scratch2, Operand(kFlatOneByteStringTag));
bne(failure);
}
static const int kRegisterPassedArguments = 8;
int TurboAssembler::CalculateStackPassedWords(int num_reg_arguments,

View File

@ -1097,20 +1097,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// String utilities
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not. Assumes that neither object is a smi.
void JumpIfNonSmisNotBothSequentialOneByteStrings(Register object1,
Register object2,
Register scratch1,
Register scratch2,
Label* failure);
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* failure);
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name);
// ---------------------------------------------------------------------------

View File

@ -2017,20 +2017,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
// Test that both first and second are sequential one-byte strings.
// Assume that they are non-smis.
LoadP(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
LoadP(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
LoadlB(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
LoadlB(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
JumpIfBothInstanceTypesAreNotSequentialOneByte(scratch1, scratch2, scratch1,
scratch2, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register reg,
Label* not_unique_name) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
@ -2066,23 +2052,6 @@ void MacroAssembler::AllocateJSValue(Register result, Register constructor,
STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
if (scratch1 != first) LoadRR(scratch1, first);
if (scratch2 != second) LoadRR(scratch2, second);
nilf(scratch1, Operand(kFlatOneByteStringMask));
CmpP(scratch1, Operand(kFlatOneByteStringTag));
bne(failure);
nilf(scratch2, Operand(kFlatOneByteStringMask));
CmpP(scratch2, Operand(kFlatOneByteStringTag));
bne(failure);
}
static const int kRegisterPassedArguments = 5;
int TurboAssembler::CalculateStackPassedWords(int num_reg_arguments,

View File

@ -1308,20 +1308,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// String utilities
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not. Assumes that neither object is a smi.
void JumpIfNonSmisNotBothSequentialOneByteStrings(Register object1,
Register object2,
Register scratch1,
Register scratch2,
Label* failure);
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* failure);
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name);
void LoadInstanceDescriptors(Register map, Register descriptors);

View File

@ -1588,64 +1588,6 @@ void TurboAssembler::Push(Smi* source) {
// ----------------------------------------------------------------------------
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(
Register first_object, Register second_object, Register scratch1,
Register scratch2, Label* on_fail, Label::Distance near_jump) {
// Check that both objects are not smis.
Condition either_smi = CheckEitherSmi(first_object, second_object);
j(either_smi, on_fail, near_jump);
// Load instance type for both strings.
movp(scratch1, FieldOperand(first_object, HeapObject::kMapOffset));
movp(scratch2, FieldOperand(second_object, HeapObject::kMapOffset));
movzxbl(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
movzxbl(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
// Check that both are flat one-byte strings.
DCHECK(kNotStringTag != 0);
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
andl(scratch1, Immediate(kFlatOneByteStringMask));
andl(scratch2, Immediate(kFlatOneByteStringMask));
// Interleave the bits to check both scratch1 and scratch2 in one test.
const int kShift = 8;
DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << kShift));
shlp(scratch2, Immediate(kShift));
orp(scratch1, scratch2);
cmpl(scratch1,
Immediate(kFlatOneByteStringTag + (kFlatOneByteStringTag << kShift)));
j(not_equal, on_fail, near_jump);
}
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* on_fail,
Label::Distance near_jump) {
// Load instance type for both strings.
movp(scratch1, first_object_instance_type);
movp(scratch2, second_object_instance_type);
// Check that both are flat one-byte strings.
DCHECK(kNotStringTag != 0);
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
andl(scratch1, Immediate(kFlatOneByteStringMask));
andl(scratch2, Immediate(kFlatOneByteStringMask));
// Interleave the bits to check both scratch1 and scratch2 in one test.
DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3));
leap(scratch1, Operand(scratch1, scratch2, times_8, 0));
cmpl(scratch1,
Immediate(kFlatOneByteStringTag + (kFlatOneByteStringTag << 3)));
j(not_equal, on_fail, near_jump);
}
template<class T>
static void JumpIfNotUniqueNameHelper(MacroAssembler* masm,
T operand_or_register,

View File

@ -854,16 +854,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// String macros.
void JumpIfNotBothSequentialOneByteStrings(
Register first_object, Register second_object, Register scratch1,
Register scratch2, Label* on_not_both_flat_one_byte,
Label::Distance near_jump = Label::kFar);
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
Register first_object_instance_type, Register second_object_instance_type,
Register scratch1, Register scratch2, Label* on_fail,
Label::Distance near_jump = Label::kFar);
// Checks if the given register or operand is a unique name
void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name,
Label::Distance distance = Label::kFar);