Index: src/ppc/code-stubs-ppc.cc |
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc |
index 814fab157770e1bbc3e7e3180956d5f2c3a459a5..48e2f16d46af98529feef9c25a583abcbdf3a4c6 100644 |
--- a/src/ppc/code-stubs-ppc.cc |
+++ b/src/ppc/code-stubs-ppc.cc |
@@ -1371,7 +1371,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
// (6) External string. Make it, offset-wise, look like a sequential string. |
// Go to (4). |
// (7) Short external string or not a string? If yes, bail out to runtime. |
- // (8) Sliced string. Replace subject with parent. Go to (1). |
+ // (8) Sliced or thin string. Replace subject with parent. Go to (1). |
Label seq_string /* 4 */, external_string /* 6 */, check_underlying /* 1 */, |
not_seq_nor_cons /* 5 */, not_long_external /* 7 */; |
@@ -1668,12 +1668,19 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
__ andi(r0, r4, Operand(kIsNotStringMask | kShortExternalStringMask)); |
__ bne(&runtime, cr0); |
- // (8) Sliced string. Replace subject with parent. Go to (4). |
+ // (8) Sliced or thin string. Replace subject with parent. Go to (4). |
+ Label thin_string; |
+ __ cmpi(r4, Operand(kThinStringTag)); |
+ __ beq(&thin_string); |
// Load offset into r11 and replace subject string with parent. |
__ LoadP(r11, FieldMemOperand(subject, SlicedString::kOffsetOffset)); |
__ SmiUntag(r11); |
__ LoadP(subject, FieldMemOperand(subject, SlicedString::kParentOffset)); |
__ b(&check_underlying); // Go to (4). |
+ |
+ __ bind(&thin_string); |
+ __ LoadP(subject, FieldMemOperand(subject, ThinString::kActualOffset)); |
+ __ b(&check_underlying); // Go to (4). |
#endif // V8_INTERPRETED_REGEXP |
} |