Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index d11a3c800e08525f26befa5651e67f3b44097936..d695d0ed901e2570e5dc3773d483a4dffc17d454 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2547,23 +2547,6 @@ void MacroAssembler::JumpIfNotBothSequentialOneByteStrings( |
j(not_equal, on_fail, near_jump); |
} |
- |
-void MacroAssembler::JumpIfInstanceTypeIsNotSequentialOneByte( |
- Register instance_type, Register scratch, Label* failure, |
- Label::Distance near_jump) { |
- if (!scratch.is(instance_type)) { |
- movl(scratch, instance_type); |
- } |
- |
- const int kFlatOneByteStringMask = |
- kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; |
- |
- andl(scratch, Immediate(kFlatOneByteStringMask)); |
- cmpl(scratch, Immediate(kStringTag | kSeqStringTag | kOneByteStringTag)); |
- j(not_equal, failure, near_jump); |
-} |
- |
- |
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte( |
Register first_object_instance_type, Register second_object_instance_type, |
Register scratch1, Register scratch2, Label* on_fail, |
@@ -4898,125 +4881,6 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
} |
- |
-void MacroAssembler::AllocateTwoByteString(Register result, |
- Register length, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
- Label* gc_required) { |
- // Calculate the number of bytes needed for the characters in the string while |
- // observing object alignment. |
- const int kHeaderAlignment = SeqTwoByteString::kHeaderSize & |
- kObjectAlignmentMask; |
- DCHECK(kShortSize == 2); |
- // scratch1 = length * 2 + kObjectAlignmentMask. |
- leap(scratch1, Operand(length, length, times_1, kObjectAlignmentMask + |
- kHeaderAlignment)); |
- andp(scratch1, Immediate(~kObjectAlignmentMask)); |
- if (kHeaderAlignment > 0) { |
- subp(scratch1, Immediate(kHeaderAlignment)); |
- } |
- |
- // Allocate two byte string in new space. |
- Allocate(SeqTwoByteString::kHeaderSize, times_1, scratch1, result, scratch2, |
- scratch3, gc_required, NO_ALLOCATION_FLAGS); |
- |
- // Set the map, length and hash field. |
- LoadRoot(kScratchRegister, Heap::kStringMapRootIndex); |
- movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
- Integer32ToSmi(scratch1, length); |
- movp(FieldOperand(result, String::kLengthOffset), scratch1); |
- movp(FieldOperand(result, String::kHashFieldOffset), |
- Immediate(String::kEmptyHashField)); |
-} |
- |
- |
-void MacroAssembler::AllocateOneByteString(Register result, Register length, |
- Register scratch1, Register scratch2, |
- Register scratch3, |
- Label* gc_required) { |
- // Calculate the number of bytes needed for the characters in the string while |
- // observing object alignment. |
- const int kHeaderAlignment = SeqOneByteString::kHeaderSize & |
- kObjectAlignmentMask; |
- movl(scratch1, length); |
- DCHECK(kCharSize == 1); |
- addp(scratch1, Immediate(kObjectAlignmentMask + kHeaderAlignment)); |
- andp(scratch1, Immediate(~kObjectAlignmentMask)); |
- if (kHeaderAlignment > 0) { |
- subp(scratch1, Immediate(kHeaderAlignment)); |
- } |
- |
- // Allocate one-byte string in new space. |
- Allocate(SeqOneByteString::kHeaderSize, times_1, scratch1, result, scratch2, |
- scratch3, gc_required, NO_ALLOCATION_FLAGS); |
- |
- // Set the map, length and hash field. |
- LoadRoot(kScratchRegister, Heap::kOneByteStringMapRootIndex); |
- movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
- Integer32ToSmi(scratch1, length); |
- movp(FieldOperand(result, String::kLengthOffset), scratch1); |
- movp(FieldOperand(result, String::kHashFieldOffset), |
- Immediate(String::kEmptyHashField)); |
-} |
- |
- |
-void MacroAssembler::AllocateTwoByteConsString(Register result, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required) { |
- // Allocate heap number in new space. |
- Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, |
- NO_ALLOCATION_FLAGS); |
- |
- // Set the map. The other fields are left uninitialized. |
- LoadRoot(kScratchRegister, Heap::kConsStringMapRootIndex); |
- movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
-} |
- |
- |
-void MacroAssembler::AllocateOneByteConsString(Register result, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required) { |
- Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, |
- NO_ALLOCATION_FLAGS); |
- |
- // Set the map. The other fields are left uninitialized. |
- LoadRoot(kScratchRegister, Heap::kConsOneByteStringMapRootIndex); |
- movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
-} |
- |
- |
-void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required) { |
- // Allocate heap number in new space. |
- Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required, |
- NO_ALLOCATION_FLAGS); |
- |
- // Set the map. The other fields are left uninitialized. |
- LoadRoot(kScratchRegister, Heap::kSlicedStringMapRootIndex); |
- movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
-} |
- |
- |
-void MacroAssembler::AllocateOneByteSlicedString(Register result, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required) { |
- // Allocate heap number in new space. |
- Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required, |
- NO_ALLOCATION_FLAGS); |
- |
- // Set the map. The other fields are left uninitialized. |
- LoadRoot(kScratchRegister, Heap::kSlicedOneByteStringMapRootIndex); |
- movp(FieldOperand(result, HeapObject::kMapOffset), kScratchRegister); |
-} |
- |
- |
void MacroAssembler::AllocateJSValue(Register result, Register constructor, |
Register value, Register scratch, |
Label* gc_required) { |