| 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/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3341 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); | 3341 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); |
| 3342 __ Ret(USE_DELAY_SLOT); | 3342 __ Ret(USE_DELAY_SLOT); |
| 3343 __ ld(v0, FieldMemOperand(a0, Oddball::kToNumberOffset)); | 3343 __ ld(v0, FieldMemOperand(a0, Oddball::kToNumberOffset)); |
| 3344 __ bind(¬_oddball); | 3344 __ bind(¬_oddball); |
| 3345 | 3345 |
| 3346 __ push(a0); // Push argument. | 3346 __ push(a0); // Push argument. |
| 3347 __ TailCallRuntime(Runtime::kToNumber, 1, 1); | 3347 __ TailCallRuntime(Runtime::kToNumber, 1, 1); |
| 3348 } | 3348 } |
| 3349 | 3349 |
| 3350 | 3350 |
| 3351 void ToLengthStub::Generate(MacroAssembler* masm) { |
| 3352 // The ToLength stub takes on argument in a0. |
| 3353 Label not_smi, positive_smi; |
| 3354 __ JumpIfNotSmi(a0, ¬_smi); |
| 3355 STATIC_ASSERT(kSmiTag == 0); |
| 3356 __ Branch(&positive_smi, ge, a0, Operand(zero_reg)); |
| 3357 __ mov(a0, zero_reg); |
| 3358 __ bind(&positive_smi); |
| 3359 __ Ret(USE_DELAY_SLOT); |
| 3360 __ mov(v0, a0); |
| 3361 __ bind(¬_smi); |
| 3362 |
| 3363 __ push(a0); // Push argument. |
| 3364 __ TailCallRuntime(Runtime::kToLength, 1, 1); |
| 3365 } |
| 3366 |
| 3367 |
| 3351 void ToStringStub::Generate(MacroAssembler* masm) { | 3368 void ToStringStub::Generate(MacroAssembler* masm) { |
| 3352 // The ToString stub takes on argument in a0. | 3369 // The ToString stub takes on argument in a0. |
| 3353 Label is_number; | 3370 Label is_number; |
| 3354 __ JumpIfSmi(a0, &is_number); | 3371 __ JumpIfSmi(a0, &is_number); |
| 3355 | 3372 |
| 3356 Label not_string; | 3373 Label not_string; |
| 3357 __ GetObjectType(a0, a1, a1); | 3374 __ GetObjectType(a0, a1, a1); |
| 3358 // a0: receiver | 3375 // a0: receiver |
| 3359 // a1: receiver instance type | 3376 // a1: receiver instance type |
| 3360 __ Branch(¬_string, ge, a1, Operand(FIRST_NONSTRING_TYPE)); | 3377 __ Branch(¬_string, ge, a1, Operand(FIRST_NONSTRING_TYPE)); |
| (...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5775 MemOperand(fp, 6 * kPointerSize), NULL); | 5792 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5776 } | 5793 } |
| 5777 | 5794 |
| 5778 | 5795 |
| 5779 #undef __ | 5796 #undef __ |
| 5780 | 5797 |
| 5781 } // namespace internal | 5798 } // namespace internal |
| 5782 } // namespace v8 | 5799 } // namespace v8 |
| 5783 | 5800 |
| 5784 #endif // V8_TARGET_ARCH_MIPS64 | 5801 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |