Index: src/x87/code-stubs-x87.cc |
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc |
index c8dd417d7f058082697ae4159ff6085a6b2600b0..8b06a743a25a6c460daa3639ea38a8780d5d7ce9 100644 |
--- a/src/x87/code-stubs-x87.cc |
+++ b/src/x87/code-stubs-x87.cc |
@@ -425,7 +425,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 */, |
@@ -733,11 +733,18 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
__ test(ebx, Immediate(kIsNotStringMask | kShortExternalStringTag)); |
__ 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; |
+ __ cmp(ebx, Immediate(kThinStringTag)); |
+ __ j(equal, &thin_string, Label::kNear); |
// Load offset into edi and replace subject string with parent. |
__ mov(edi, FieldOperand(eax, SlicedString::kOffsetOffset)); |
__ mov(eax, FieldOperand(eax, SlicedString::kParentOffset)); |
__ jmp(&check_underlying); // Go to (1). |
+ |
+ __ bind(&thin_string); |
+ __ mov(eax, FieldOperand(eax, ThinString::kActualOffset)); |
+ __ jmp(&check_underlying); // Go to (1). |
#endif // V8_INTERPRETED_REGEXP |
} |