Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index b37855b8e0929af23380bce6da69c736fd054954..155f64a97ea41ffed4a55ce373d245823e07ef12 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -5815,15 +5815,11 @@ void SubStringStub::Generate(MacroAssembler* masm) { |
// r3: from index (untagged smi) |
// r6 (a.k.a. to): to (smi) |
// r7 (a.k.a. from): from offset (smi) |
- Label allocate_slice, sliced_string, seq_string; |
- STATIC_ASSERT(kSeqStringTag == 0); |
- __ tst(r1, Operand(kStringRepresentationMask)); |
- __ b(eq, &seq_string); |
+ Label allocate_slice, sliced_string, seq_or_external_string; |
STATIC_ASSERT(kIsIndirectStringMask == (kSlicedStringTag & kConsStringTag)); |
STATIC_ASSERT(kIsIndirectStringMask != 0); |
__ tst(r1, Operand(kIsIndirectStringMask)); |
- // External string. Jump to runtime. |
- __ b(eq, &runtime); |
+ __ b(eq, &seq_or_external_string); |
__ tst(r1, Operand(kSlicedNotConsMask)); |
__ b(ne, &sliced_string); |
@@ -5842,8 +5838,8 @@ void SubStringStub::Generate(MacroAssembler* masm) { |
__ ldr(r5, FieldMemOperand(r0, SlicedString::kParentOffset)); |
__ jmp(&allocate_slice); |
- __ 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(r5, r0); |
__ bind(&allocate_slice); |