| 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 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); | 2530 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); |
| 2531 __ Ret(USE_DELAY_SLOT); | 2531 __ Ret(USE_DELAY_SLOT); |
| 2532 __ ld(v0, FieldMemOperand(a0, Oddball::kToStringOffset)); | 2532 __ ld(v0, FieldMemOperand(a0, Oddball::kToStringOffset)); |
| 2533 __ bind(¬_oddball); | 2533 __ bind(¬_oddball); |
| 2534 | 2534 |
| 2535 __ push(a0); // Push argument. | 2535 __ push(a0); // Push argument. |
| 2536 __ TailCallRuntime(Runtime::kToString); | 2536 __ TailCallRuntime(Runtime::kToString); |
| 2537 } | 2537 } |
| 2538 | 2538 |
| 2539 | 2539 |
| 2540 void ToNameStub::Generate(MacroAssembler* masm) { | |
| 2541 // The ToName stub takes on argument in a0. | |
| 2542 Label is_number; | |
| 2543 __ JumpIfSmi(a0, &is_number); | |
| 2544 | |
| 2545 Label not_name; | |
| 2546 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | |
| 2547 __ GetObjectType(a0, a1, a1); | |
| 2548 // a0: receiver | |
| 2549 // a1: receiver instance type | |
| 2550 __ Branch(¬_name, gt, a1, Operand(LAST_NAME_TYPE)); | |
| 2551 __ Ret(USE_DELAY_SLOT); | |
| 2552 __ mov(v0, a0); | |
| 2553 __ bind(¬_name); | |
| 2554 | |
| 2555 Label not_heap_number; | |
| 2556 __ Branch(¬_heap_number, ne, a1, Operand(HEAP_NUMBER_TYPE)); | |
| 2557 __ bind(&is_number); | |
| 2558 NumberToStringStub stub(isolate()); | |
| 2559 __ TailCallStub(&stub); | |
| 2560 __ bind(¬_heap_number); | |
| 2561 | |
| 2562 Label not_oddball; | |
| 2563 __ Branch(¬_oddball, ne, a1, Operand(ODDBALL_TYPE)); | |
| 2564 __ Ret(USE_DELAY_SLOT); | |
| 2565 __ ld(v0, FieldMemOperand(a0, Oddball::kToStringOffset)); | |
| 2566 __ bind(¬_oddball); | |
| 2567 | |
| 2568 __ push(a0); // Push argument. | |
| 2569 __ TailCallRuntime(Runtime::kToName); | |
| 2570 } | |
| 2571 | |
| 2572 | |
| 2573 void StringHelper::GenerateFlatOneByteStringEquals( | 2540 void StringHelper::GenerateFlatOneByteStringEquals( |
| 2574 MacroAssembler* masm, Register left, Register right, Register scratch1, | 2541 MacroAssembler* masm, Register left, Register right, Register scratch1, |
| 2575 Register scratch2, Register scratch3) { | 2542 Register scratch2, Register scratch3) { |
| 2576 Register length = scratch1; | 2543 Register length = scratch1; |
| 2577 | 2544 |
| 2578 // Compare lengths. | 2545 // Compare lengths. |
| 2579 Label strings_not_equal, check_zero_length; | 2546 Label strings_not_equal, check_zero_length; |
| 2580 __ ld(length, FieldMemOperand(left, String::kLengthOffset)); | 2547 __ ld(length, FieldMemOperand(left, String::kLengthOffset)); |
| 2581 __ ld(scratch2, FieldMemOperand(right, String::kLengthOffset)); | 2548 __ ld(scratch2, FieldMemOperand(right, String::kLengthOffset)); |
| 2582 __ Branch(&check_zero_length, eq, length, Operand(scratch2)); | 2549 __ Branch(&check_zero_length, eq, length, Operand(scratch2)); |
| (...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5436 kStackUnwindSpace, kInvalidStackOffset, | 5403 kStackUnwindSpace, kInvalidStackOffset, |
| 5437 return_value_operand, NULL); | 5404 return_value_operand, NULL); |
| 5438 } | 5405 } |
| 5439 | 5406 |
| 5440 #undef __ | 5407 #undef __ |
| 5441 | 5408 |
| 5442 } // namespace internal | 5409 } // namespace internal |
| 5443 } // namespace v8 | 5410 } // namespace v8 |
| 5444 | 5411 |
| 5445 #endif // V8_TARGET_ARCH_MIPS64 | 5412 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |