Index: src/mips64/codegen-mips64.cc |
diff --git a/src/mips64/codegen-mips64.cc b/src/mips64/codegen-mips64.cc |
index 134fe4dd8887cb00091df087a10435b196fc4ce2..78652846df91b81e6ae726a69249a189d31ee4b0 100644 |
--- a/src/mips64/codegen-mips64.cc |
+++ b/src/mips64/codegen-mips64.cc |
@@ -622,9 +622,10 @@ void StringCharLoadGenerator::Generate(MacroAssembler* masm, |
__ Branch(&check_sequential, eq, at, Operand(zero_reg)); |
// Dispatch on the indirect string shape: slice or cons. |
- Label cons_string; |
- __ And(at, result, Operand(kSlicedNotConsMask)); |
- __ Branch(&cons_string, eq, at, Operand(zero_reg)); |
+ Label cons_string, thin_string; |
+ __ And(at, result, Operand(kStringRepresentationMask)); |
+ __ Branch(&cons_string, eq, at, Operand(kConsStringTag)); |
+ __ Branch(&thin_string, eq, at, Operand(kThinStringTag)); |
// Handle slices. |
Label indirect_string_loaded; |
@@ -634,6 +635,11 @@ void StringCharLoadGenerator::Generate(MacroAssembler* masm, |
__ Daddu(index, index, at); |
__ jmp(&indirect_string_loaded); |
+ // Handle thin strings. |
+ __ bind(&thin_string); |
+ __ ld(string, FieldMemOperand(string, ThinString::kActualOffset)); |
+ __ jmp(&indirect_string_loaded); |
+ |
// Handle cons strings. |
// Check whether the right hand side is the empty string (i.e. if |
// this is really a flat string in a cons string). If that is not |