| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index 27c747594530b734235bac6bf8521e8f440f85fb..88810e93c6aa64570fb1b123d49d6eb5cfcadcce 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -484,7 +484,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| // (8) Is the external string one byte? If yes, go to (5).
|
| // (9) Two byte sequential. Load regexp code for two byte. Go to (E).
|
| // (10) Short external string or not a string? If yes, bail out to runtime.
|
| - // (11) Sliced string. Replace subject with parent. Go to (1).
|
| + // (11) Sliced or thin string. Replace subject with parent. Go to (1).
|
|
|
| Label seq_one_byte_string /* 5 */, seq_two_byte_string /* 9 */,
|
| external_string /* 7 */, check_underlying /* 1 */,
|
| @@ -514,6 +514,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| // have already been covered.
|
| STATIC_ASSERT(kConsStringTag < kExternalStringTag);
|
| STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
|
| + STATIC_ASSERT(kThinStringTag > kExternalStringTag);
|
| STATIC_ASSERT(kIsNotStringMask > kExternalStringTag);
|
| STATIC_ASSERT(kShortExternalStringTag > kExternalStringTag);
|
| __ cmpp(rbx, Immediate(kExternalStringTag));
|
| @@ -802,11 +803,18 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| __ testb(rbx, Immediate(kIsNotStringMask | kShortExternalStringMask));
|
| __ j(not_zero, &runtime);
|
|
|
| - // (11) Sliced string. Replace subject with parent. Go to (1).
|
| + // (11) Sliced or thin string. Replace subject with parent. Go to (1).
|
| + Label thin_string;
|
| + __ cmpl(rbx, Immediate(kThinStringTag));
|
| + __ j(equal, &thin_string, Label::kNear);
|
| // Load offset into r14 and replace subject string with parent.
|
| __ SmiToInteger32(r14, FieldOperand(rdi, SlicedString::kOffsetOffset));
|
| __ movp(rdi, FieldOperand(rdi, SlicedString::kParentOffset));
|
| __ jmp(&check_underlying);
|
| +
|
| + __ bind(&thin_string);
|
| + __ movp(rdi, FieldOperand(rdi, ThinString::kActualOffset));
|
| + __ jmp(&check_underlying);
|
| #endif // V8_INTERPRETED_REGEXP
|
| }
|
|
|
|
|