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 3300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3311 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); | 3311 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); |
3312 __ Ret(USE_DELAY_SLOT); | 3312 __ Ret(USE_DELAY_SLOT); |
3313 __ ld(v0, FieldMemOperand(a0, Oddball::kToStringOffset)); | 3313 __ ld(v0, FieldMemOperand(a0, Oddball::kToStringOffset)); |
3314 __ bind(¬_oddball); | 3314 __ bind(¬_oddball); |
3315 | 3315 |
3316 __ push(a0); // Push argument. | 3316 __ push(a0); // Push argument. |
3317 __ TailCallRuntime(Runtime::kToString); | 3317 __ TailCallRuntime(Runtime::kToString); |
3318 } | 3318 } |
3319 | 3319 |
3320 | 3320 |
| 3321 void ToNameStub::Generate(MacroAssembler* masm) { |
| 3322 // The ToName stub takes on argument in a0. |
| 3323 Label is_number; |
| 3324 __ JumpIfSmi(a0, &is_number); |
| 3325 |
| 3326 Label not_name; |
| 3327 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
| 3328 __ GetObjectType(a0, a1, a1); |
| 3329 // a0: receiver |
| 3330 // a1: receiver instance type |
| 3331 __ Branch(¬_name, gt, a1, Operand(LAST_NAME_TYPE)); |
| 3332 __ Ret(USE_DELAY_SLOT); |
| 3333 __ mov(v0, a0); |
| 3334 __ bind(¬_name); |
| 3335 |
| 3336 Label not_heap_number; |
| 3337 __ Branch(¬_heap_number, ne, a1, Operand(HEAP_NUMBER_TYPE)); |
| 3338 __ bind(&is_number); |
| 3339 NumberToStringStub stub(isolate()); |
| 3340 __ TailCallStub(&stub); |
| 3341 __ bind(¬_heap_number); |
| 3342 |
| 3343 Label not_oddball; |
| 3344 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); |
| 3345 __ Ret(USE_DELAY_SLOT); |
| 3346 __ ld(v0, FieldMemOperand(a0, Oddball::kToStringOffset)); |
| 3347 __ bind(¬_oddball); |
| 3348 |
| 3349 __ push(a0); // Push argument. |
| 3350 __ TailCallRuntime(Runtime::kToName); |
| 3351 } |
| 3352 |
| 3353 |
3321 void StringHelper::GenerateFlatOneByteStringEquals( | 3354 void StringHelper::GenerateFlatOneByteStringEquals( |
3322 MacroAssembler* masm, Register left, Register right, Register scratch1, | 3355 MacroAssembler* masm, Register left, Register right, Register scratch1, |
3323 Register scratch2, Register scratch3) { | 3356 Register scratch2, Register scratch3) { |
3324 Register length = scratch1; | 3357 Register length = scratch1; |
3325 | 3358 |
3326 // Compare lengths. | 3359 // Compare lengths. |
3327 Label strings_not_equal, check_zero_length; | 3360 Label strings_not_equal, check_zero_length; |
3328 __ ld(length, FieldMemOperand(left, String::kLengthOffset)); | 3361 __ ld(length, FieldMemOperand(left, String::kLengthOffset)); |
3329 __ ld(scratch2, FieldMemOperand(right, String::kLengthOffset)); | 3362 __ ld(scratch2, FieldMemOperand(right, String::kLengthOffset)); |
3330 __ Branch(&check_zero_length, eq, length, Operand(scratch2)); | 3363 __ Branch(&check_zero_length, eq, length, Operand(scratch2)); |
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5637 MemOperand(fp, 6 * kPointerSize), NULL); | 5670 MemOperand(fp, 6 * kPointerSize), NULL); |
5638 } | 5671 } |
5639 | 5672 |
5640 | 5673 |
5641 #undef __ | 5674 #undef __ |
5642 | 5675 |
5643 } // namespace internal | 5676 } // namespace internal |
5644 } // namespace v8 | 5677 } // namespace v8 |
5645 | 5678 |
5646 #endif // V8_TARGET_ARCH_MIPS64 | 5679 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |