| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 __ bind(&no_arguments); | 391 __ bind(&no_arguments); |
| 392 { | 392 { |
| 393 __ LoadRoot(r3, Heap::kempty_stringRootIndex); | 393 __ LoadRoot(r3, Heap::kempty_stringRootIndex); |
| 394 __ Ret(1); | 394 __ Ret(1); |
| 395 } | 395 } |
| 396 | 396 |
| 397 // 3a. Convert r3 to a string. | 397 // 3a. Convert r3 to a string. |
| 398 __ bind(&to_string); | 398 __ bind(&to_string); |
| 399 { | 399 { |
| 400 FrameScope scope(masm, StackFrame::MANUAL); | 400 FrameScope scope(masm, StackFrame::MANUAL); |
| 401 ToStringStub stub(masm->isolate()); | |
| 402 __ SmiTag(r5); | 401 __ SmiTag(r5); |
| 403 __ EnterBuiltinFrame(cp, r4, r5); | 402 __ EnterBuiltinFrame(cp, r4, r5); |
| 404 __ CallStub(&stub); | 403 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
| 405 __ LeaveBuiltinFrame(cp, r4, r5); | 404 __ LeaveBuiltinFrame(cp, r4, r5); |
| 406 __ SmiUntag(r5); | 405 __ SmiUntag(r5); |
| 407 } | 406 } |
| 408 __ b(&drop_frame_and_ret); | 407 __ b(&drop_frame_and_ret); |
| 409 | 408 |
| 410 // 3b. Convert symbol in r3 to a string. | 409 // 3b. Convert symbol in r3 to a string. |
| 411 __ bind(&symbol_descriptive_string); | 410 __ bind(&symbol_descriptive_string); |
| 412 { | 411 { |
| 413 __ Drop(r5); | 412 __ Drop(r5); |
| 414 __ Drop(1); | 413 __ Drop(1); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 | 454 |
| 456 // 3. Make sure r5 is a string. | 455 // 3. Make sure r5 is a string. |
| 457 { | 456 { |
| 458 Label convert, done_convert; | 457 Label convert, done_convert; |
| 459 __ JumpIfSmi(r5, &convert); | 458 __ JumpIfSmi(r5, &convert); |
| 460 __ CompareObjectType(r5, r7, r7, FIRST_NONSTRING_TYPE); | 459 __ CompareObjectType(r5, r7, r7, FIRST_NONSTRING_TYPE); |
| 461 __ blt(&done_convert); | 460 __ blt(&done_convert); |
| 462 __ bind(&convert); | 461 __ bind(&convert); |
| 463 { | 462 { |
| 464 FrameScope scope(masm, StackFrame::MANUAL); | 463 FrameScope scope(masm, StackFrame::MANUAL); |
| 465 ToStringStub stub(masm->isolate()); | |
| 466 __ SmiTag(r9); | 464 __ SmiTag(r9); |
| 467 __ EnterBuiltinFrame(cp, r4, r9); | 465 __ EnterBuiltinFrame(cp, r4, r9); |
| 468 __ Push(r6); | 466 __ Push(r6); |
| 469 __ mr(r3, r5); | 467 __ mr(r3, r5); |
| 470 __ CallStub(&stub); | 468 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
| 471 __ mr(r5, r3); | 469 __ mr(r5, r3); |
| 472 __ Pop(r6); | 470 __ Pop(r6); |
| 473 __ LeaveBuiltinFrame(cp, r4, r9); | 471 __ LeaveBuiltinFrame(cp, r4, r9); |
| 474 __ SmiUntag(r9); | 472 __ SmiUntag(r9); |
| 475 } | 473 } |
| 476 __ bind(&done_convert); | 474 __ bind(&done_convert); |
| 477 } | 475 } |
| 478 | 476 |
| 479 // 4. Check if new target and constructor differ. | 477 // 4. Check if new target and constructor differ. |
| 480 Label drop_frame_and_ret, new_object; | 478 Label drop_frame_and_ret, new_object; |
| (...skipping 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3012 __ CallRuntime(Runtime::kThrowStackOverflow); | 3010 __ CallRuntime(Runtime::kThrowStackOverflow); |
| 3013 __ bkpt(0); | 3011 __ bkpt(0); |
| 3014 } | 3012 } |
| 3015 } | 3013 } |
| 3016 | 3014 |
| 3017 #undef __ | 3015 #undef __ |
| 3018 } // namespace internal | 3016 } // namespace internal |
| 3019 } // namespace v8 | 3017 } // namespace v8 |
| 3020 | 3018 |
| 3021 #endif // V8_TARGET_ARCH_PPC | 3019 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |