| Index: src/mips64/full-codegen-mips64.cc
|
| diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc
|
| index 53415991c57f2a39758563300a804f8e66b4c037..082303967720c1088fbd399f9d139d7395953cb6 100644
|
| --- a/src/mips64/full-codegen-mips64.cc
|
| +++ b/src/mips64/full-codegen-mips64.cc
|
| @@ -3835,7 +3835,7 @@ void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
|
| }
|
|
|
|
|
| -void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| +void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) {
|
| Label bailout, done, one_char_separator, long_separator,
|
| non_trivial_array, not_size_one_array, loop,
|
| empty_separator_loop, one_char_separator_loop,
|
| @@ -3885,7 +3885,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| __ ld(elements, FieldMemOperand(array, JSArray::kElementsOffset));
|
| array = no_reg; // End of array's live range.
|
|
|
| - // Check that all array elements are sequential ASCII strings, and
|
| + // Check that all array elements are sequential one-byte strings, and
|
| // accumulate the sum of their lengths, as a smi-encoded value.
|
| __ mov(string_length, zero_reg);
|
| __ Daddu(element,
|
| @@ -3901,8 +3901,8 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| // element: Current array element.
|
| // elements_end: Array end.
|
| if (generate_debug_code_) {
|
| - __ Assert(gt, kNoEmptyArraysHereInEmitFastAsciiArrayJoin,
|
| - array_length, Operand(zero_reg));
|
| + __ Assert(gt, kNoEmptyArraysHereInEmitFastOneByteArrayJoin, array_length,
|
| + Operand(zero_reg));
|
| }
|
| __ bind(&loop);
|
| __ ld(string, MemOperand(element));
|
| @@ -3910,7 +3910,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| __ JumpIfSmi(string, &bailout);
|
| __ ld(scratch1, FieldMemOperand(string, HeapObject::kMapOffset));
|
| __ lbu(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
|
| - __ JumpIfInstanceTypeIsNotSequentialAscii(scratch1, scratch2, &bailout);
|
| + __ JumpIfInstanceTypeIsNotSequentialOneByte(scratch1, scratch2, &bailout);
|
| __ ld(scratch1, FieldMemOperand(string, SeqOneByteString::kLengthOffset));
|
| __ AdduAndCheckForOverflow(string_length, string_length, scratch1, scratch3);
|
| __ BranchOnOverflow(&bailout, scratch3);
|
| @@ -3929,11 +3929,11 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| // string_length: Sum of string lengths (smi).
|
| // elements: FixedArray of strings.
|
|
|
| - // Check that the separator is a flat ASCII string.
|
| + // Check that the separator is a flat one-byte string.
|
| __ JumpIfSmi(separator, &bailout);
|
| __ ld(scratch1, FieldMemOperand(separator, HeapObject::kMapOffset));
|
| __ lbu(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
|
| - __ JumpIfInstanceTypeIsNotSequentialAscii(scratch1, scratch2, &bailout);
|
| + __ JumpIfInstanceTypeIsNotSequentialOneByte(scratch1, scratch2, &bailout);
|
|
|
| // Add (separator length times array_length) - separator length to the
|
| // string_length to get the length of the result string. array_length is not
|
| @@ -3961,12 +3961,8 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| // separator: Separator string
|
| // string_length: Length of result string (not smi)
|
| // array_length: Length of the array.
|
| - __ AllocateAsciiString(result,
|
| - string_length,
|
| - scratch1,
|
| - scratch2,
|
| - elements_end,
|
| - &bailout);
|
| + __ AllocateOneByteString(result, string_length, scratch1, scratch2,
|
| + elements_end, &bailout);
|
| // Prepare for looping. Set up elements_end to end of the array. Set
|
| // result_pos to the position of the result where to write the first
|
| // character.
|
| @@ -4005,7 +4001,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
|
|
| // One-character separator case.
|
| __ bind(&one_char_separator);
|
| - // Replace separator with its ASCII character value.
|
| + // Replace separator with its one-byte character value.
|
| __ lbu(separator, FieldMemOperand(separator, SeqOneByteString::kHeaderSize));
|
| // Jump into the loop after the code that copies the separator, so the first
|
| // element is not preceded by a separator.
|
| @@ -4016,7 +4012,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| // result_pos: the position to which we are currently copying characters.
|
| // element: Current array element.
|
| // elements_end: Array end.
|
| - // separator: Single separator ASCII char (in lower byte).
|
| + // separator: Single separator one-byte char (in lower byte).
|
|
|
| // Copy the separator character to the result.
|
| __ sb(separator, MemOperand(result_pos));
|
|
|