Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 4eb08a1eebb0d7b0145166244f28414b497f604c..42841f2a23e57652f9a3f52fb902253fdd990e5e 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -5705,13 +5705,10 @@ static void CreateArrayDispatch(MacroAssembler* masm, |
int last_index = GetSequenceIndexFromFastElementsKind( |
TERMINAL_FAST_ELEMENTS_KIND); |
for (int i = 0; i <= last_index; ++i) { |
- Label next; |
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); |
__ cmp(r3, Operand(kind)); |
- __ b(ne, &next); |
T stub(kind); |
- __ TailCallStub(&stub); |
- __ bind(&next); |
+ __ TailCallStub(&stub, eq); |
} |
// If we reached this point there is a problem. |
@@ -5787,13 +5784,10 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm, |
int last_index = GetSequenceIndexFromFastElementsKind( |
TERMINAL_FAST_ELEMENTS_KIND); |
for (int i = 0; i <= last_index; ++i) { |
- Label next; |
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); |
__ cmp(r3, Operand(kind)); |
- __ b(ne, &next); |
ArraySingleArgumentConstructorStub stub(kind); |
- __ TailCallStub(&stub); |
- __ bind(&next); |
+ __ TailCallStub(&stub, eq); |
} |
// If we reached this point there is a problem. |
@@ -5934,37 +5928,27 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) { |
void InternalArrayConstructorStub::GenerateCase( |
MacroAssembler* masm, ElementsKind kind) { |
- Label not_zero_case, not_one_case; |
- Label normal_sequence; |
+ __ cmp(r0, Operand(1)); |
- __ tst(r0, r0); |
- __ b(ne, ¬_zero_case); |
InternalArrayNoArgumentConstructorStub stub0(kind); |
- __ TailCallStub(&stub0); |
+ __ TailCallStub(&stub0, lo); |
- __ bind(¬_zero_case); |
- __ cmp(r0, Operand(1)); |
- __ b(gt, ¬_one_case); |
+ InternalArrayNArgumentsConstructorStub stubN(kind); |
+ __ TailCallStub(&stubN, hi); |
if (IsFastPackedElementsKind(kind)) { |
// We might need to create a holey array |
// look at the first argument |
__ ldr(r3, MemOperand(sp, 0)); |
__ cmp(r3, Operand::Zero()); |
- __ b(eq, &normal_sequence); |
InternalArraySingleArgumentConstructorStub |
stub1_holey(GetHoleyElementsKind(kind)); |
- __ TailCallStub(&stub1_holey); |
+ __ TailCallStub(&stub1_holey, ne); |
} |
- __ bind(&normal_sequence); |
InternalArraySingleArgumentConstructorStub stub1(kind); |
__ TailCallStub(&stub1); |
- |
- __ bind(¬_one_case); |
- InternalArrayNArgumentsConstructorStub stubN(kind); |
- __ TailCallStub(&stubN); |
} |