| 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 __ bind(&no_arguments); | 389 __ bind(&no_arguments); |
| 390 { | 390 { |
| 391 __ LoadRoot(r2, Heap::kempty_stringRootIndex); | 391 __ LoadRoot(r2, Heap::kempty_stringRootIndex); |
| 392 __ Ret(1); | 392 __ Ret(1); |
| 393 } | 393 } |
| 394 | 394 |
| 395 // 3a. Convert r2 to a string. | 395 // 3a. Convert r2 to a string. |
| 396 __ bind(&to_string); | 396 __ bind(&to_string); |
| 397 { | 397 { |
| 398 FrameScope scope(masm, StackFrame::MANUAL); | 398 FrameScope scope(masm, StackFrame::MANUAL); |
| 399 ToStringStub stub(masm->isolate()); | |
| 400 __ SmiTag(r4); | 399 __ SmiTag(r4); |
| 401 __ EnterBuiltinFrame(cp, r3, r4); | 400 __ EnterBuiltinFrame(cp, r3, r4); |
| 402 __ CallStub(&stub); | 401 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
| 403 __ LeaveBuiltinFrame(cp, r3, r4); | 402 __ LeaveBuiltinFrame(cp, r3, r4); |
| 404 __ SmiUntag(r4); | 403 __ SmiUntag(r4); |
| 405 } | 404 } |
| 406 __ b(&drop_frame_and_ret); | 405 __ b(&drop_frame_and_ret); |
| 407 // 3b. Convert symbol in r2 to a string. | 406 // 3b. Convert symbol in r2 to a string. |
| 408 __ bind(&symbol_descriptive_string); | 407 __ bind(&symbol_descriptive_string); |
| 409 { | 408 { |
| 410 __ Drop(r4); | 409 __ Drop(r4); |
| 411 __ Drop(1); | 410 __ Drop(1); |
| 412 __ Push(r2); | 411 __ Push(r2); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 451 |
| 453 // 3. Make sure r4 is a string. | 452 // 3. Make sure r4 is a string. |
| 454 { | 453 { |
| 455 Label convert, done_convert; | 454 Label convert, done_convert; |
| 456 __ JumpIfSmi(r4, &convert); | 455 __ JumpIfSmi(r4, &convert); |
| 457 __ CompareObjectType(r4, r6, r6, FIRST_NONSTRING_TYPE); | 456 __ CompareObjectType(r4, r6, r6, FIRST_NONSTRING_TYPE); |
| 458 __ blt(&done_convert); | 457 __ blt(&done_convert); |
| 459 __ bind(&convert); | 458 __ bind(&convert); |
| 460 { | 459 { |
| 461 FrameScope scope(masm, StackFrame::MANUAL); | 460 FrameScope scope(masm, StackFrame::MANUAL); |
| 462 ToStringStub stub(masm->isolate()); | |
| 463 __ SmiTag(r8); | 461 __ SmiTag(r8); |
| 464 __ EnterBuiltinFrame(cp, r3, r8); | 462 __ EnterBuiltinFrame(cp, r3, r8); |
| 465 __ Push(r5); | 463 __ Push(r5); |
| 466 __ LoadRR(r2, r4); | 464 __ LoadRR(r2, r4); |
| 467 __ CallStub(&stub); | 465 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
| 468 __ LoadRR(r4, r2); | 466 __ LoadRR(r4, r2); |
| 469 __ Pop(r5); | 467 __ Pop(r5); |
| 470 __ LeaveBuiltinFrame(cp, r3, r8); | 468 __ LeaveBuiltinFrame(cp, r3, r8); |
| 471 __ SmiUntag(r8); | 469 __ SmiUntag(r8); |
| 472 } | 470 } |
| 473 __ bind(&done_convert); | 471 __ bind(&done_convert); |
| 474 } | 472 } |
| 475 | 473 |
| 476 // 4. Check if new target and constructor differ. | 474 // 4. Check if new target and constructor differ. |
| 477 Label drop_frame_and_ret, new_object; | 475 Label drop_frame_and_ret, new_object; |
| (...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 __ bkpt(0); | 3021 __ bkpt(0); |
| 3024 } | 3022 } |
| 3025 } | 3023 } |
| 3026 | 3024 |
| 3027 #undef __ | 3025 #undef __ |
| 3028 | 3026 |
| 3029 } // namespace internal | 3027 } // namespace internal |
| 3030 } // namespace v8 | 3028 } // namespace v8 |
| 3031 | 3029 |
| 3032 #endif // V8_TARGET_ARCH_S390 | 3030 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |