Chromium Code Reviews| Index: src/ia32/code-stubs-ia32.cc |
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
| index 23bea4f8568ce2cebeccf8212be82343e75e4d29..e5b25518c14c56b4d5b4fa548a406bd962607664 100644 |
| --- a/src/ia32/code-stubs-ia32.cc |
| +++ b/src/ia32/code-stubs-ia32.cc |
| @@ -5973,18 +5973,14 @@ void SubStringStub::Generate(MacroAssembler* masm) { |
| // ebx: instance type |
| // ecx: sub string length |
| // edx: from index (smi) |
| - Label allocate_slice, sliced_string, seq_string; |
| + Label allocate_slice, sliced_string, seq_or_external_string; |
| __ cmp(ecx, SlicedString::kMinLength); |
| // Short slice. Copy instead of slicing. |
| __ j(less, ©_routine); |
| - STATIC_ASSERT(kSeqStringTag == 0); |
| - __ test(ebx, Immediate(kStringRepresentationMask)); |
| - __ j(zero, &seq_string, Label::kNear); |
| STATIC_ASSERT(kIsIndirectStringMask == (kSlicedStringTag & kConsStringTag)); |
|
Rico
2011/11/17 07:27:20
These two asserts and the following test is a bit
|
| STATIC_ASSERT(kIsIndirectStringMask != 0); |
| __ test(ebx, Immediate(kIsIndirectStringMask)); |
| - // External string. Jump to runtime. |
| - __ j(zero, &runtime); |
| + __ j(zero, &seq_or_external_string, Label::kNear); |
| Factory* factory = masm->isolate()->factory(); |
| __ test(ebx, Immediate(kSlicedNotConsMask)); |
| @@ -6002,8 +5998,8 @@ void SubStringStub::Generate(MacroAssembler* masm) { |
| __ mov(edi, FieldOperand(eax, SlicedString::kParentOffset)); |
| __ jmp(&allocate_slice, Label::kNear); |
| - __ bind(&seq_string); |
| - // Sequential string. Just move string to the right register. |
| + __ bind(&seq_or_external_string); |
| + // Sequential or external string. Just move string to the correct register. |
| __ mov(edi, eax); |
| __ bind(&allocate_slice); |