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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3351 if (equality) { | 3351 if (equality) { |
3352 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, tmp2, | 3352 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, tmp2, |
3353 tmp3); | 3353 tmp3); |
3354 } else { | 3354 } else { |
3355 StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, | 3355 StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, |
3356 tmp2, tmp3, tmp4); | 3356 tmp2, tmp3, tmp4); |
3357 } | 3357 } |
3358 | 3358 |
3359 // Handle more complex cases in runtime. | 3359 // Handle more complex cases in runtime. |
3360 __ bind(&runtime); | 3360 __ bind(&runtime); |
3361 __ Push(left, right); | |
3362 if (equality) { | 3361 if (equality) { |
3363 __ TailCallRuntime(Runtime::kStringEquals); | 3362 { |
| 3363 FrameScope scope(masm, StackFrame::INTERNAL); |
| 3364 __ Push(left, right); |
| 3365 __ CallRuntime(Runtime::kStringEqual); |
| 3366 } |
| 3367 __ LoadRoot(a0, Heap::kTrueValueRootIndex); |
| 3368 __ Ret(USE_DELAY_SLOT); |
| 3369 __ Subu(v0, v0, a0); // In delay slot. |
3364 } else { | 3370 } else { |
| 3371 __ Push(left, right); |
3365 __ TailCallRuntime(Runtime::kStringCompare); | 3372 __ TailCallRuntime(Runtime::kStringCompare); |
3366 } | 3373 } |
3367 | 3374 |
3368 __ bind(&miss); | 3375 __ bind(&miss); |
3369 GenerateMiss(masm); | 3376 GenerateMiss(masm); |
3370 } | 3377 } |
3371 | 3378 |
3372 | 3379 |
3373 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { | 3380 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { |
3374 DCHECK_EQ(CompareICState::RECEIVER, state()); | 3381 DCHECK_EQ(CompareICState::RECEIVER, state()); |
(...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5795 return_value_operand, NULL); | 5802 return_value_operand, NULL); |
5796 } | 5803 } |
5797 | 5804 |
5798 | 5805 |
5799 #undef __ | 5806 #undef __ |
5800 | 5807 |
5801 } // namespace internal | 5808 } // namespace internal |
5802 } // namespace v8 | 5809 } // namespace v8 |
5803 | 5810 |
5804 #endif // V8_TARGET_ARCH_MIPS | 5811 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |