| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 __ bind(&no_arguments); | 387 __ bind(&no_arguments); |
| 388 { | 388 { |
| 389 __ LoadRoot(v0, Heap::kempty_stringRootIndex); | 389 __ LoadRoot(v0, Heap::kempty_stringRootIndex); |
| 390 __ DropAndRet(1); | 390 __ DropAndRet(1); |
| 391 } | 391 } |
| 392 | 392 |
| 393 // 3a. Convert a0 to a string. | 393 // 3a. Convert a0 to a string. |
| 394 __ bind(&to_string); | 394 __ bind(&to_string); |
| 395 { | 395 { |
| 396 FrameScope scope(masm, StackFrame::MANUAL); | 396 FrameScope scope(masm, StackFrame::MANUAL); |
| 397 ToStringStub stub(masm->isolate()); | |
| 398 __ SmiTag(t0); | 397 __ SmiTag(t0); |
| 399 __ EnterBuiltinFrame(cp, a1, t0); | 398 __ EnterBuiltinFrame(cp, a1, t0); |
| 400 __ CallStub(&stub); | 399 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
| 401 __ LeaveBuiltinFrame(cp, a1, t0); | 400 __ LeaveBuiltinFrame(cp, a1, t0); |
| 402 __ SmiUntag(t0); | 401 __ SmiUntag(t0); |
| 403 } | 402 } |
| 404 __ jmp(&drop_frame_and_ret); | 403 __ jmp(&drop_frame_and_ret); |
| 405 | 404 |
| 406 // 3b. Convert symbol in a0 to a string. | 405 // 3b. Convert symbol in a0 to a string. |
| 407 __ bind(&symbol_descriptive_string); | 406 __ bind(&symbol_descriptive_string); |
| 408 { | 407 { |
| 409 __ Dlsa(sp, sp, t0, kPointerSizeLog2); | 408 __ Dlsa(sp, sp, t0, kPointerSizeLog2); |
| 410 __ Drop(1); | 409 __ Drop(1); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 // 3. Make sure a0 is a string. | 450 // 3. Make sure a0 is a string. |
| 452 { | 451 { |
| 453 Label convert, done_convert; | 452 Label convert, done_convert; |
| 454 __ JumpIfSmi(a0, &convert); | 453 __ JumpIfSmi(a0, &convert); |
| 455 __ GetObjectType(a0, a2, a2); | 454 __ GetObjectType(a0, a2, a2); |
| 456 __ And(t1, a2, Operand(kIsNotStringMask)); | 455 __ And(t1, a2, Operand(kIsNotStringMask)); |
| 457 __ Branch(&done_convert, eq, t1, Operand(zero_reg)); | 456 __ Branch(&done_convert, eq, t1, Operand(zero_reg)); |
| 458 __ bind(&convert); | 457 __ bind(&convert); |
| 459 { | 458 { |
| 460 FrameScope scope(masm, StackFrame::MANUAL); | 459 FrameScope scope(masm, StackFrame::MANUAL); |
| 461 ToStringStub stub(masm->isolate()); | |
| 462 __ SmiTag(t0); | 460 __ SmiTag(t0); |
| 463 __ EnterBuiltinFrame(cp, a1, t0); | 461 __ EnterBuiltinFrame(cp, a1, t0); |
| 464 __ Push(a3); | 462 __ Push(a3); |
| 465 __ CallStub(&stub); | 463 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
| 466 __ Move(a0, v0); | 464 __ Move(a0, v0); |
| 467 __ Pop(a3); | 465 __ Pop(a3); |
| 468 __ LeaveBuiltinFrame(cp, a1, t0); | 466 __ LeaveBuiltinFrame(cp, a1, t0); |
| 469 __ SmiUntag(t0); | 467 __ SmiUntag(t0); |
| 470 } | 468 } |
| 471 __ bind(&done_convert); | 469 __ bind(&done_convert); |
| 472 } | 470 } |
| 473 | 471 |
| 474 // 4. Check if new target and constructor differ. | 472 // 4. Check if new target and constructor differ. |
| 475 Label drop_frame_and_ret, new_object; | 473 Label drop_frame_and_ret, new_object; |
| (...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 __ break_(0xCC); | 2992 __ break_(0xCC); |
| 2995 } | 2993 } |
| 2996 } | 2994 } |
| 2997 | 2995 |
| 2998 #undef __ | 2996 #undef __ |
| 2999 | 2997 |
| 3000 } // namespace internal | 2998 } // namespace internal |
| 3001 } // namespace v8 | 2999 } // namespace v8 |
| 3002 | 3000 |
| 3003 #endif // V8_TARGET_ARCH_MIPS64 | 3001 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |