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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 __ bge(&ok); | 439 __ bge(&ok); |
440 | 440 |
441 GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); | 441 GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); |
442 | 442 |
443 __ bind(&ok); | 443 __ bind(&ok); |
444 GenerateTailCallToSharedCode(masm); | 444 GenerateTailCallToSharedCode(masm); |
445 } | 445 } |
446 | 446 |
447 namespace { | 447 namespace { |
448 | 448 |
449 void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function, | 449 void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) { |
450 bool create_implicit_receiver, | |
451 bool disallow_non_object_return) { | |
452 Label post_instantiation_deopt_entry; | 450 Label post_instantiation_deopt_entry; |
453 // ----------- S t a t e ------------- | 451 // ----------- S t a t e ------------- |
454 // -- r3 : number of arguments | 452 // -- r3 : number of arguments |
455 // -- r4 : constructor function | 453 // -- r4 : constructor function |
456 // -- r6 : new target | 454 // -- r6 : new target |
457 // -- cp : context | 455 // -- cp : context |
458 // -- lr : return address | 456 // -- lr : return address |
459 // -- sp[...]: constructor arguments | 457 // -- sp[...]: constructor arguments |
460 // ----------------------------------- | 458 // ----------------------------------- |
461 | 459 |
462 Isolate* isolate = masm->isolate(); | |
463 | |
464 // Enter a construct frame. | 460 // Enter a construct frame. |
465 { | 461 { |
466 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); | 462 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); |
467 | 463 |
468 // Preserve the incoming parameters on the stack. | 464 // Preserve the incoming parameters on the stack. |
469 | 465 |
470 if (!create_implicit_receiver) { | 466 __ SmiTag(r3); |
471 __ SmiTag(r7, r3, SetRC); | 467 __ Push(cp, r3); |
472 __ Push(cp, r7); | 468 __ SmiUntag(r3, SetRC); |
473 __ PushRoot(Heap::kTheHoleValueRootIndex); | 469 // The receiver for the builtin/api call. |
474 } else { | 470 __ PushRoot(Heap::kTheHoleValueRootIndex); |
475 __ SmiTag(r3); | |
476 __ Push(cp, r3); | |
477 | |
478 // Allocate the new receiver object. | |
479 __ Push(r4, r6); | |
480 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), | |
481 RelocInfo::CODE_TARGET); | |
482 __ mr(r7, r3); | |
483 __ Pop(r4, r6); | |
484 | |
485 // ----------- S t a t e ------------- | |
486 // -- r4: constructor function | |
487 // -- r6: new target | |
488 // -- r7: newly allocated object | |
489 // ----------------------------------- | |
490 | |
491 // Retrieve smi-tagged arguments count from the stack. | |
492 __ LoadP(r3, MemOperand(sp)); | |
493 __ SmiUntag(r3, SetRC); | |
494 | |
495 // Push the allocated receiver to the stack. We need two copies | |
496 // because we may have to return the original one and the calling | |
497 // conventions dictate that the called function pops the receiver. | |
498 __ Push(r7, r7); | |
499 } | |
500 | |
501 // Deoptimizer re-enters stub code here. | |
502 __ bind(&post_instantiation_deopt_entry); | |
503 | |
504 // Set up pointer to last argument. | 471 // Set up pointer to last argument. |
505 __ addi(r5, fp, Operand(StandardFrameConstants::kCallerSPOffset)); | 472 __ addi(r7, fp, Operand(StandardFrameConstants::kCallerSPOffset)); |
506 | 473 |
507 // Copy arguments and receiver to the expression stack. | 474 // Copy arguments and receiver to the expression stack. |
508 // r3: number of arguments | 475 |
509 // r4: constructor function | |
510 // r5: address of last argument (caller sp) | |
511 // r6: new target | |
512 // cr0: condition indicating whether r3 is zero | |
513 // sp[0]: receiver | |
514 // sp[1]: receiver | |
515 // sp[2]: number of arguments (smi-tagged) | |
516 Label loop, no_args; | 476 Label loop, no_args; |
| 477 // ----------- S t a t e ------------- |
| 478 // -- r3: number of arguments (untagged) |
| 479 // -- r4: constructor function |
| 480 // -- r6: new target |
| 481 // -- r7: pointer to last argument |
| 482 // -- cr0: condition indicating whether r3 is zero |
| 483 // -- sp[0*kPointerSize]: the hole (receiver) |
| 484 // -- sp[1*kPointerSize]: number of arguments (tagged) |
| 485 // -- sp[2*kPointerSize]: context |
| 486 // ----------------------------------- |
517 __ beq(&no_args, cr0); | 487 __ beq(&no_args, cr0); |
518 __ ShiftLeftImm(ip, r3, Operand(kPointerSizeLog2)); | 488 __ ShiftLeftImm(ip, r3, Operand(kPointerSizeLog2)); |
519 __ sub(sp, sp, ip); | 489 __ sub(sp, sp, ip); |
520 __ mtctr(r3); | 490 __ mtctr(r3); |
521 __ bind(&loop); | 491 __ bind(&loop); |
522 __ subi(ip, ip, Operand(kPointerSize)); | 492 __ subi(ip, ip, Operand(kPointerSize)); |
523 __ LoadPX(r0, MemOperand(r5, ip)); | 493 __ LoadPX(r0, MemOperand(r7, ip)); |
524 __ StorePX(r0, MemOperand(sp, ip)); | 494 __ StorePX(r0, MemOperand(sp, ip)); |
525 __ bdnz(&loop); | 495 __ bdnz(&loop); |
526 __ bind(&no_args); | 496 __ bind(&no_args); |
527 | 497 |
528 // Call the function. | 498 // Call the function. |
529 // r3: number of arguments | 499 // r3: number of arguments (untagged) |
530 // r4: constructor function | 500 // r4: constructor function |
531 // r6: new target | 501 // r6: new target |
532 { | 502 { |
533 ConstantPoolUnavailableScope constant_pool_unavailable(masm); | 503 ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
534 ParameterCount actual(r3); | 504 ParameterCount actual(r3); |
| 505 __ InvokeFunction(r4, r6, actual, CALL_FUNCTION, |
| 506 CheckDebugStepCallWrapper()); |
| 507 } |
| 508 |
| 509 // Restore context from the frame. |
| 510 __ LoadP(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); |
| 511 // Restore smi-tagged arguments count from the frame. |
| 512 __ LoadP(r4, MemOperand(fp, ConstructFrameConstants::kLengthOffset)); |
| 513 |
| 514 // Leave construct frame. |
| 515 } |
| 516 // Remove caller arguments from the stack and return. |
| 517 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); |
| 518 |
| 519 __ SmiToPtrArrayOffset(r4, r4); |
| 520 __ add(sp, sp, r4); |
| 521 __ addi(sp, sp, Operand(kPointerSize)); |
| 522 __ blr(); |
| 523 } |
| 524 |
| 525 // The construct stub for ES5 constructor functions and ES6 class constructors. |
| 526 void Generate_JSConstructStubGeneric(MacroAssembler* masm, |
| 527 bool restrict_constructor_return) { |
| 528 // ----------- S t a t e ------------- |
| 529 // -- r3: number of arguments (untagged) |
| 530 // -- r4: constructor function |
| 531 // -- r6: new target |
| 532 // -- cp: context |
| 533 // -- lr: return address |
| 534 // -- sp[...]: constructor arguments |
| 535 // ----------------------------------- |
| 536 |
| 537 // Enter a construct frame. |
| 538 { |
| 539 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); |
| 540 Label post_instantiation_deopt_entry, not_create_implicit_receiver; |
| 541 |
| 542 // Preserve the incoming parameters on the stack. |
| 543 __ SmiTag(r3); |
| 544 __ Push(cp, r3, r4, r6); |
| 545 |
| 546 // ----------- S t a t e ------------- |
| 547 // -- sp[0*kPointerSize]: new target |
| 548 // -- r4 and sp[1*kPointerSize]: constructor function |
| 549 // -- sp[2*kPointerSize]: number of arguments (tagged) |
| 550 // -- sp[3*kPointerSize]: context |
| 551 // ----------------------------------- |
| 552 |
| 553 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); |
| 554 __ lwz(r7, FieldMemOperand(r7, SharedFunctionInfo::kCompilerHintsOffset)); |
| 555 __ TestBitMask(r7, |
| 556 FunctionKind::kDerivedConstructor |
| 557 << SharedFunctionInfo::kFunctionKindShift, |
| 558 r0); |
| 559 __ bne(¬_create_implicit_receiver, cr0); |
| 560 |
| 561 // If not derived class constructor: Allocate the new receiver object. |
| 562 __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1, |
| 563 r7, r8); |
| 564 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
| 565 RelocInfo::CODE_TARGET); |
| 566 __ b(&post_instantiation_deopt_entry); |
| 567 |
| 568 // Else: use TheHoleValue as receiver for constructor call |
| 569 __ bind(¬_create_implicit_receiver); |
| 570 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); |
| 571 |
| 572 // ----------- S t a t e ------------- |
| 573 // -- r3: receiver |
| 574 // -- Slot 3 / sp[0*kPointerSize]: new target |
| 575 // -- Slot 2 / sp[1*kPointerSize]: constructor function |
| 576 // -- Slot 1 / sp[2*kPointerSize]: number of arguments (tagged) |
| 577 // -- Slot 0 / sp[3*kPointerSize]: context |
| 578 // ----------------------------------- |
| 579 // Deoptimizer enters here. |
| 580 masm->isolate()->heap()->SetConstructStubCreateDeoptPCOffset( |
| 581 masm->pc_offset()); |
| 582 __ bind(&post_instantiation_deopt_entry); |
| 583 |
| 584 // Restore new target. |
| 585 __ Pop(r6); |
| 586 // Push the allocated receiver to the stack. We need two copies |
| 587 // because we may have to return the original one and the calling |
| 588 // conventions dictate that the called function pops the receiver. |
| 589 __ Push(r3, r3); |
| 590 |
| 591 // ----------- S t a t e ------------- |
| 592 // -- r6: new target |
| 593 // -- sp[0*kPointerSize]: implicit receiver |
| 594 // -- sp[1*kPointerSize]: implicit receiver |
| 595 // -- sp[2*kPointerSize]: constructor function |
| 596 // -- sp[3*kPointerSize]: number of arguments (tagged) |
| 597 // -- sp[4*kPointerSize]: context |
| 598 // ----------------------------------- |
| 599 |
| 600 // Restore constructor function and argument count. |
| 601 __ LoadP(r4, MemOperand(fp, ConstructFrameConstants::kConstructorOffset)); |
| 602 __ LoadP(r3, MemOperand(fp, ConstructFrameConstants::kLengthOffset)); |
| 603 __ SmiUntag(r3, SetRC); |
| 604 |
| 605 // Set up pointer to last argument. |
| 606 __ addi(r7, fp, Operand(StandardFrameConstants::kCallerSPOffset)); |
| 607 |
| 608 // Copy arguments and receiver to the expression stack. |
| 609 Label loop, no_args; |
| 610 // ----------- S t a t e ------------- |
| 611 // -- r3: number of arguments (untagged) |
| 612 // -- r6: new target |
| 613 // -- r7: pointer to last argument |
| 614 // -- cr0: condition indicating whether r3 is zero |
| 615 // -- sp[0*kPointerSize]: implicit receiver |
| 616 // -- sp[1*kPointerSize]: implicit receiver |
| 617 // -- r4 and sp[2*kPointerSize]: constructor function |
| 618 // -- sp[3*kPointerSize]: number of arguments (tagged) |
| 619 // -- sp[4*kPointerSize]: context |
| 620 // ----------------------------------- |
| 621 __ beq(&no_args, cr0); |
| 622 __ ShiftLeftImm(ip, r3, Operand(kPointerSizeLog2)); |
| 623 __ sub(sp, sp, ip); |
| 624 __ mtctr(r3); |
| 625 __ bind(&loop); |
| 626 __ subi(ip, ip, Operand(kPointerSize)); |
| 627 __ LoadPX(r0, MemOperand(r7, ip)); |
| 628 __ StorePX(r0, MemOperand(sp, ip)); |
| 629 __ bdnz(&loop); |
| 630 __ bind(&no_args); |
| 631 |
| 632 // Call the function. |
| 633 { |
| 634 ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
| 635 ParameterCount actual(r3); |
535 __ InvokeFunction(r4, r6, actual, CALL_FUNCTION, | 636 __ InvokeFunction(r4, r6, actual, CALL_FUNCTION, |
536 CheckDebugStepCallWrapper()); | 637 CheckDebugStepCallWrapper()); |
537 } | 638 } |
538 | 639 |
| 640 // ----------- S t a t e ------------- |
| 641 // -- r0: constructor result |
| 642 // -- sp[0*kPointerSize]: implicit receiver |
| 643 // -- sp[1*kPointerSize]: constructor function |
| 644 // -- sp[2*kPointerSize]: number of arguments |
| 645 // -- sp[3*kPointerSize]: context |
| 646 // ----------------------------------- |
| 647 |
539 // Store offset of return address for deoptimizer. | 648 // Store offset of return address for deoptimizer. |
540 if (create_implicit_receiver && !disallow_non_object_return && | 649 masm->isolate()->heap()->SetConstructStubInvokeDeoptPCOffset( |
541 !is_api_function) { | 650 masm->pc_offset()); |
542 masm->isolate()->heap()->SetConstructStubInvokeDeoptPCOffset( | 651 |
543 masm->pc_offset()); | 652 // Restore the context from the frame. |
| 653 __ LoadP(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); |
| 654 |
| 655 // If the result is an object (in the ECMA sense), we should get rid |
| 656 // of the receiver and use the result; see ECMA-262 section 13.2.2-7 |
| 657 // on page 74. |
| 658 Label use_receiver, do_throw, other_result, leave_frame; |
| 659 |
| 660 // If the result is undefined, we jump out to using the implicit receiver. |
| 661 __ JumpIfRoot(r3, Heap::kUndefinedValueRootIndex, &use_receiver); |
| 662 |
| 663 // Otherwise we do a smi check and fall through to check if the return value |
| 664 // is a valid receiver. |
| 665 |
| 666 // If the result is a smi, it is *not* an object in the ECMA sense. |
| 667 __ JumpIfSmi(r3, &other_result); |
| 668 |
| 669 // If the type of the result (stored in its map) is less than |
| 670 // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. |
| 671 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
| 672 __ CompareObjectType(r3, r7, r7, FIRST_JS_RECEIVER_TYPE); |
| 673 __ bge(&leave_frame); |
| 674 |
| 675 __ bind(&other_result); |
| 676 // The result is now neither undefined nor an object. |
| 677 if (restrict_constructor_return) { |
| 678 // Throw if constructor function is a class constructor |
| 679 __ LoadP(r7, MemOperand(fp, ConstructFrameConstants::kConstructorOffset)); |
| 680 __ LoadP(r7, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); |
| 681 __ lwz(r7, FieldMemOperand(r7, SharedFunctionInfo::kCompilerHintsOffset)); |
| 682 __ TestBitMask(r7, |
| 683 FunctionKind::kClassConstructor |
| 684 << SharedFunctionInfo::kFunctionKindShift, |
| 685 r0); |
| 686 __ beq(&use_receiver, cr0); |
| 687 |
| 688 } else { |
| 689 __ b(&use_receiver); |
544 } | 690 } |
545 | 691 |
546 // Restore context from the frame. | |
547 // r3: result | |
548 // sp[0]: receiver | |
549 // sp[1]: number of arguments (smi-tagged) | |
550 __ LoadP(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); | |
551 | |
552 if (create_implicit_receiver) { | |
553 // If the result is an object (in the ECMA sense), we should get rid | |
554 // of the receiver and use the result; see ECMA-262 section 13.2.2-7 | |
555 // on page 74. | |
556 Label use_receiver, return_value, do_throw; | |
557 | |
558 // If the result is a smi, it is *not* an object in the ECMA sense. | |
559 // r3: result | |
560 // sp[0]: receiver | |
561 // sp[1]: number of arguments (smi-tagged) | |
562 // If the result is undefined, we jump out to using the implicit | |
563 // receiver, otherwise we do a smi check and fall through to | |
564 // check if the return value is a valid receiver. | |
565 if (disallow_non_object_return) { | |
566 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); | |
567 __ beq(&use_receiver); | |
568 __ JumpIfSmi(r3, &do_throw); | |
569 } else { | |
570 __ JumpIfSmi(r3, &use_receiver); | |
571 } | |
572 | |
573 // If the type of the result (stored in its map) is less than | |
574 // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. | |
575 __ CompareObjectType(r3, r4, r6, FIRST_JS_RECEIVER_TYPE); | |
576 __ bge(&return_value); | |
577 | |
578 if (disallow_non_object_return) { | |
579 __ bind(&do_throw); | |
580 __ CallRuntime(Runtime::kThrowConstructorReturnedNonObject); | |
581 } | |
582 | |
583 // Throw away the result of the constructor invocation and use the | |
584 // on-stack receiver as the result. | |
585 __ bind(&use_receiver); | |
586 __ LoadP(r3, MemOperand(sp)); | |
587 | |
588 // Remove receiver from the stack, remove caller arguments, and | |
589 // return. | |
590 __ bind(&return_value); | |
591 // r3: result | |
592 // sp[0]: receiver (newly allocated object) | |
593 // sp[1]: number of arguments (smi-tagged) | |
594 __ LoadP(r4, MemOperand(sp, 1 * kPointerSize)); | |
595 } else { | |
596 __ LoadP(r4, MemOperand(sp)); | |
597 } | |
598 | |
599 // Leave construct frame. | |
600 } | |
601 | |
602 // ES6 9.2.2. Step 13+ | |
603 // For derived class constructors, throw a TypeError here if the result | |
604 // is not a JSReceiver. For the base constructor, we've already checked | |
605 // the result, so we omit the check. | |
606 if (disallow_non_object_return && !create_implicit_receiver) { | |
607 Label do_throw, dont_throw; | |
608 __ JumpIfSmi(r3, &do_throw); | |
609 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | |
610 __ CompareObjectType(r3, r6, r6, FIRST_JS_RECEIVER_TYPE); | |
611 __ bge(&dont_throw); | |
612 __ bind(&do_throw); | 692 __ bind(&do_throw); |
613 { | 693 { |
614 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 694 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
615 __ CallRuntime(Runtime::kThrowConstructorReturnedNonObject); | 695 __ CallRuntime(Runtime::kThrowConstructorReturnedNonObject); |
616 } | 696 } |
617 __ bind(&dont_throw); | 697 |
| 698 // Throw away the result of the constructor invocation and use the |
| 699 // on-stack receiver as the result. |
| 700 __ bind(&use_receiver); |
| 701 __ LoadP(r3, MemOperand(sp)); |
| 702 __ JumpIfRoot(r3, Heap::kTheHoleValueRootIndex, &do_throw); |
| 703 |
| 704 __ bind(&leave_frame); |
| 705 // Restore smi-tagged arguments count from the frame. |
| 706 __ LoadP(r4, MemOperand(fp, ConstructFrameConstants::kLengthOffset)); |
| 707 // Leave construct frame. |
618 } | 708 } |
619 | 709 |
| 710 // Remove caller arguments from the stack and return. |
| 711 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); |
| 712 |
620 __ SmiToPtrArrayOffset(r4, r4); | 713 __ SmiToPtrArrayOffset(r4, r4); |
621 __ add(sp, sp, r4); | 714 __ add(sp, sp, r4); |
622 __ addi(sp, sp, Operand(kPointerSize)); | 715 __ addi(sp, sp, Operand(kPointerSize)); |
623 if (create_implicit_receiver) { | |
624 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r4, r5); | |
625 } | |
626 __ blr(); | 716 __ blr(); |
627 // Store offset of trampoline address for deoptimizer. This is the bailout | |
628 // point after the receiver instantiation but before the function invocation. | |
629 // We need to restore some registers in order to continue the above code. | |
630 if (create_implicit_receiver && !disallow_non_object_return && | |
631 !is_api_function) { | |
632 masm->isolate()->heap()->SetConstructStubCreateDeoptPCOffset( | |
633 masm->pc_offset()); | |
634 | |
635 // ----------- S t a t e ------------- | |
636 // -- r3 : newly allocated object | |
637 // -- sp[0] : constructor function | |
638 // ----------------------------------- | |
639 | |
640 __ pop(r4); | |
641 __ Push(r3, r3); | |
642 | |
643 // Retrieve smi-tagged arguments count from the stack. | |
644 __ LoadP(r3, MemOperand(fp, ConstructFrameConstants::kLengthOffset)); | |
645 __ SmiUntag(r3); | |
646 | |
647 // Retrieve the new target value from the stack. This was placed into the | |
648 // frame description in place of the receiver by the optimizing compiler. | |
649 __ addi(r6, fp, Operand(StandardFrameConstants::kCallerSPOffset)); | |
650 __ ShiftLeftImm(ip, r3, Operand(kPointerSizeLog2)); | |
651 __ LoadPX(r6, MemOperand(r6, ip)); | |
652 | |
653 // Continue with constructor function invocation. | |
654 __ b(&post_instantiation_deopt_entry); | |
655 } | |
656 } | 717 } |
657 | 718 |
658 } // namespace | 719 } // namespace |
659 | 720 |
660 void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { | 721 void Builtins::Generate_JSConstructStubGenericRestrictedReturn( |
661 Generate_JSConstructStubHelper(masm, false, true, false); | 722 MacroAssembler* masm) { |
| 723 Generate_JSConstructStubGeneric(masm, true); |
662 } | 724 } |
663 | 725 void Builtins::Generate_JSConstructStubGenericUnrestrictedReturn( |
| 726 MacroAssembler* masm) { |
| 727 Generate_JSConstructStubGeneric(masm, false); |
| 728 } |
664 void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { | 729 void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { |
665 Generate_JSConstructStubHelper(masm, true, false, false); | 730 Generate_JSBuiltinsConstructStubHelper(masm); |
666 } | 731 } |
667 | |
668 void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { | 732 void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { |
669 Generate_JSConstructStubHelper(masm, false, false, false); | 733 Generate_JSBuiltinsConstructStubHelper(masm); |
670 } | |
671 | |
672 void Builtins::Generate_JSBuiltinsConstructStubForBase(MacroAssembler* masm) { | |
673 Generate_JSConstructStubHelper(masm, false, true, true); | |
674 } | |
675 | |
676 void Builtins::Generate_JSBuiltinsConstructStubForDerived( | |
677 MacroAssembler* masm) { | |
678 Generate_JSConstructStubHelper(masm, false, false, true); | |
679 } | 734 } |
680 | 735 |
681 // static | 736 // static |
682 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { | 737 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
683 // ----------- S t a t e ------------- | 738 // ----------- S t a t e ------------- |
684 // -- r3 : the value to pass to the generator | 739 // -- r3 : the value to pass to the generator |
685 // -- r4 : the JSGeneratorObject to resume | 740 // -- r4 : the JSGeneratorObject to resume |
686 // -- r5 : the resume mode (tagged) | 741 // -- r5 : the resume mode (tagged) |
687 // -- r6 : the SuspendFlags of the earlier suspend call (tagged) | 742 // -- r6 : the SuspendFlags of the earlier suspend call (tagged) |
688 // -- lr : return address | 743 // -- lr : return address |
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3113 } | 3168 } |
3114 // Now jump to the instructions of the returned code object. | 3169 // Now jump to the instructions of the returned code object. |
3115 __ Jump(r11); | 3170 __ Jump(r11); |
3116 } | 3171 } |
3117 | 3172 |
3118 #undef __ | 3173 #undef __ |
3119 } // namespace internal | 3174 } // namespace internal |
3120 } // namespace v8 | 3175 } // namespace v8 |
3121 | 3176 |
3122 #endif // V8_TARGET_ARCH_PPC | 3177 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |