Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index f884cda5976e1e129f36da75ac101dc7ede95d5e..e7940f4442340d85b0817a0941801be0ab859cd8 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3497,12 +3497,10 @@ void MacroAssembler::AllocateTwoByteString(Register result, |
} |
-void MacroAssembler::AllocateAsciiString(Register result, |
- Register length, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
- Label* gc_required) { |
+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. |
DCHECK((SeqOneByteString::kHeaderSize & kObjectAlignmentMask) == 0); |
@@ -3510,7 +3508,7 @@ void MacroAssembler::AllocateAsciiString(Register result, |
addiu(scratch1, length, kObjectAlignmentMask + SeqOneByteString::kHeaderSize); |
And(scratch1, scratch1, Operand(~kObjectAlignmentMask)); |
- // Allocate ASCII string in new space. |
+ // Allocate one-byte string in new space. |
Allocate(scratch1, |
result, |
scratch2, |
@@ -3519,11 +3517,8 @@ void MacroAssembler::AllocateAsciiString(Register result, |
TAG_OBJECT); |
// Set the map, length and hash field. |
- InitializeNewString(result, |
- length, |
- Heap::kAsciiStringMapRootIndex, |
- scratch1, |
- scratch2); |
+ InitializeNewString(result, length, Heap::kOneByteStringMapRootIndex, |
+ scratch1, scratch2); |
} |
@@ -3542,11 +3537,10 @@ void MacroAssembler::AllocateTwoByteConsString(Register result, |
} |
-void MacroAssembler::AllocateAsciiConsString(Register result, |
- Register length, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required) { |
+void MacroAssembler::AllocateOneByteConsString(Register result, Register length, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* gc_required) { |
Allocate(ConsString::kSize, |
result, |
scratch1, |
@@ -3554,11 +3548,8 @@ void MacroAssembler::AllocateAsciiConsString(Register result, |
gc_required, |
TAG_OBJECT); |
- InitializeNewString(result, |
- length, |
- Heap::kConsAsciiStringMapRootIndex, |
- scratch1, |
- scratch2); |
+ InitializeNewString(result, length, Heap::kConsOneByteStringMapRootIndex, |
+ scratch1, scratch2); |
} |
@@ -3578,19 +3569,16 @@ void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
} |
-void MacroAssembler::AllocateAsciiSlicedString(Register result, |
- Register length, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required) { |
+void MacroAssembler::AllocateOneByteSlicedString(Register result, |
+ Register length, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* gc_required) { |
Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required, |
TAG_OBJECT); |
- InitializeNewString(result, |
- length, |
- Heap::kSlicedAsciiStringMapRootIndex, |
- scratch1, |
- scratch2); |
+ InitializeNewString(result, length, Heap::kSlicedOneByteStringMapRootIndex, |
+ scratch1, scratch2); |
} |
@@ -5340,71 +5328,59 @@ void MacroAssembler::LookupNumberStringCache(Register object, |
} |
-void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings( |
- Register first, |
- Register second, |
- Register scratch1, |
- Register scratch2, |
+void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings( |
+ Register first, Register second, Register scratch1, Register scratch2, |
Label* failure) { |
- // Test that both first and second are sequential ASCII strings. |
+ // 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)); |
- JumpIfBothInstanceTypesAreNotSequentialAscii(scratch1, |
- scratch2, |
- scratch1, |
- scratch2, |
- failure); |
+ JumpIfBothInstanceTypesAreNotSequentialOneByte(scratch1, scratch2, scratch1, |
+ scratch2, failure); |
} |
-void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first, |
- Register second, |
- Register scratch1, |
- Register scratch2, |
- Label* failure) { |
+void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register first, |
+ Register second, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* failure) { |
// Check that neither is a smi. |
STATIC_ASSERT(kSmiTag == 0); |
And(scratch1, first, Operand(second)); |
JumpIfSmi(scratch1, failure); |
- JumpIfNonSmisNotBothSequentialAsciiStrings(first, |
- second, |
- scratch1, |
- scratch2, |
- failure); |
+ JumpIfNonSmisNotBothSequentialOneByteStrings(first, second, scratch1, |
+ scratch2, failure); |
} |
-void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
- Register first, |
- Register second, |
- Register scratch1, |
- Register scratch2, |
+void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialOneByte( |
+ Register first, Register second, Register scratch1, Register scratch2, |
Label* failure) { |
- const int kFlatAsciiStringMask = |
+ const int kFlatOneByteStringMask = |
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
- const int kFlatAsciiStringTag = |
+ const int kFlatOneByteStringTag = |
kStringTag | kOneByteStringTag | kSeqStringTag; |
- DCHECK(kFlatAsciiStringTag <= 0xffff); // Ensure this fits 16-bit immed. |
- andi(scratch1, first, kFlatAsciiStringMask); |
- Branch(failure, ne, scratch1, Operand(kFlatAsciiStringTag)); |
- andi(scratch2, second, kFlatAsciiStringMask); |
- Branch(failure, ne, scratch2, Operand(kFlatAsciiStringTag)); |
+ 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)); |
} |
-void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, |
- Register scratch, |
- Label* failure) { |
- const int kFlatAsciiStringMask = |
+void MacroAssembler::JumpIfInstanceTypeIsNotSequentialOneByte(Register type, |
+ Register scratch, |
+ Label* failure) { |
+ const int kFlatOneByteStringMask = |
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
- const int kFlatAsciiStringTag = |
+ const int kFlatOneByteStringTag = |
kStringTag | kOneByteStringTag | kSeqStringTag; |
- And(scratch, type, Operand(kFlatAsciiStringMask)); |
- Branch(failure, ne, scratch, Operand(kFlatAsciiStringTag)); |
+ And(scratch, type, Operand(kFlatOneByteStringMask)); |
+ Branch(failure, ne, scratch, Operand(kFlatOneByteStringTag)); |
} |
@@ -5807,8 +5783,8 @@ void MacroAssembler::EnsureNotWhite( |
bind(&skip); |
} |
- // Sequential string, either ASCII or UC16. |
- // For ASCII (char-size of 1) we shift the smi tag away to get the length. |
+ // Sequential string, either Latin1 or UC16. |
+ // For Latin1 (char-size of 1) we shift the smi tag away to get the length. |
// For UC16 (char-size of 2) we just leave the smi tag in place, thereby |
// getting the length multiplied by 2. |
DCHECK(kOneByteStringTag == 4 && kStringEncodingMask == 4); |