OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3172 if (equality) { | 3172 if (equality) { |
3173 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, tmp2, | 3173 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, tmp2, |
3174 tmp3); | 3174 tmp3); |
3175 } else { | 3175 } else { |
3176 StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, | 3176 StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, |
3177 tmp2, tmp3, tmp4); | 3177 tmp2, tmp3, tmp4); |
3178 } | 3178 } |
3179 | 3179 |
3180 // Handle more complex cases in runtime. | 3180 // Handle more complex cases in runtime. |
3181 __ bind(&runtime); | 3181 __ bind(&runtime); |
3182 __ Push(left, right); | |
3183 if (equality) { | 3182 if (equality) { |
3184 __ TailCallRuntime(Runtime::kStringEquals); | 3183 { |
| 3184 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 3185 __ Push(left, right); |
| 3186 __ CallRuntime(Runtime::kStringEqual); |
| 3187 } |
| 3188 __ LoadRoot(r1, Heap::kTrueValueRootIndex); |
| 3189 __ sub(r0, r0, r1); |
| 3190 __ Ret(); |
3185 } else { | 3191 } else { |
| 3192 __ Push(left, right); |
3186 __ TailCallRuntime(Runtime::kStringCompare); | 3193 __ TailCallRuntime(Runtime::kStringCompare); |
3187 } | 3194 } |
3188 | 3195 |
3189 __ bind(&miss); | 3196 __ bind(&miss); |
3190 GenerateMiss(masm); | 3197 GenerateMiss(masm); |
3191 } | 3198 } |
3192 | 3199 |
3193 | 3200 |
3194 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { | 3201 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { |
3195 DCHECK_EQ(CompareICState::RECEIVER, state()); | 3202 DCHECK_EQ(CompareICState::RECEIVER, state()); |
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5620 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5627 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5621 } | 5628 } |
5622 | 5629 |
5623 | 5630 |
5624 #undef __ | 5631 #undef __ |
5625 | 5632 |
5626 } // namespace internal | 5633 } // namespace internal |
5627 } // namespace v8 | 5634 } // namespace v8 |
5628 | 5635 |
5629 #endif // V8_TARGET_ARCH_ARM | 5636 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |