| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 void StringToNumberStub::Generate(MacroAssembler* masm) { | 2817 void StringToNumberStub::Generate(MacroAssembler* masm) { |
| 2818 // The StringToNumber stub takes on argument in a0. | 2818 // The StringToNumber stub takes on argument in a0. |
| 2819 __ AssertString(a0); | 2819 __ AssertString(a0); |
| 2820 | 2820 |
| 2821 // Check if string has a cached array index. | 2821 // Check if string has a cached array index. |
| 2822 Label runtime; | 2822 Label runtime; |
| 2823 __ lwu(a2, FieldMemOperand(a0, String::kHashFieldOffset)); | 2823 __ lwu(a2, FieldMemOperand(a0, String::kHashFieldOffset)); |
| 2824 __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask)); | 2824 __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask)); |
| 2825 __ Branch(&runtime, ne, at, Operand(zero_reg)); | 2825 __ Branch(&runtime, ne, at, Operand(zero_reg)); |
| 2826 __ IndexFromHash(a2, v0); | 2826 __ IndexFromHash(a2, v0); |
| 2827 __ Ret(USE_DELAY_SLOT); | 2827 __ Ret(); |
| 2828 __ mov(v0, a0); // In delay slot. | |
| 2829 | 2828 |
| 2830 __ bind(&runtime); | 2829 __ bind(&runtime); |
| 2831 __ Push(a0); // Push argument. | 2830 __ Push(a0); // Push argument. |
| 2832 __ TailCallRuntime(Runtime::kStringToNumber); | 2831 __ TailCallRuntime(Runtime::kStringToNumber); |
| 2833 } | 2832 } |
| 2834 | 2833 |
| 2835 void ToLengthStub::Generate(MacroAssembler* masm) { | 2834 void ToLengthStub::Generate(MacroAssembler* masm) { |
| 2836 // The ToLength stub takes on argument in a0. | 2835 // The ToLength stub takes on argument in a0. |
| 2837 Label not_smi, positive_smi; | 2836 Label not_smi, positive_smi; |
| 2838 __ JumpIfNotSmi(a0, ¬_smi); | 2837 __ JumpIfNotSmi(a0, ¬_smi); |
| (...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5769 return_value_operand, NULL); | 5768 return_value_operand, NULL); |
| 5770 } | 5769 } |
| 5771 | 5770 |
| 5772 | 5771 |
| 5773 #undef __ | 5772 #undef __ |
| 5774 | 5773 |
| 5775 } // namespace internal | 5774 } // namespace internal |
| 5776 } // namespace v8 | 5775 } // namespace v8 |
| 5777 | 5776 |
| 5778 #endif // V8_TARGET_ARCH_MIPS64 | 5777 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |