Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: src/builtins/s390/builtins-s390.cc

Issue 2429983002: PPC/s390: [builtins] Remove the unused AllocationSite slot from ConstructFrame. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 Label ok; 544 Label ok;
545 __ CmpLogicalP(sp, RootMemOperand(Heap::kStackLimitRootIndex)); 545 __ CmpLogicalP(sp, RootMemOperand(Heap::kStackLimitRootIndex));
546 __ bge(&ok, Label::kNear); 546 __ bge(&ok, Label::kNear);
547 547
548 GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); 548 GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode);
549 549
550 __ bind(&ok); 550 __ bind(&ok);
551 GenerateTailCallToSharedCode(masm); 551 GenerateTailCallToSharedCode(masm);
552 } 552 }
553 553
554 static void Generate_JSConstructStubHelper(MacroAssembler* masm, 554 namespace {
555 bool is_api_function, 555
556 bool create_implicit_receiver, 556 void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function,
557 bool check_derived_construct) { 557 bool create_implicit_receiver,
558 bool check_derived_construct) {
558 // ----------- S t a t e ------------- 559 // ----------- S t a t e -------------
559 // -- r2 : number of arguments 560 // -- r2 : number of arguments
560 // -- r3 : constructor function 561 // -- r3 : constructor function
561 // -- r4 : allocation site or undefined
562 // -- r5 : new target 562 // -- r5 : new target
563 // -- cp : context 563 // -- cp : context
564 // -- lr : return address 564 // -- lr : return address
565 // -- sp[...]: constructor arguments 565 // -- sp[...]: constructor arguments
566 // ----------------------------------- 566 // -----------------------------------
567 567
568 Isolate* isolate = masm->isolate(); 568 Isolate* isolate = masm->isolate();
569 569
570 // Enter a construct frame. 570 // Enter a construct frame.
571 { 571 {
572 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); 572 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT);
573 573
574 // Preserve the incoming parameters on the stack. 574 // Preserve the incoming parameters on the stack.
575 __ AssertUndefinedOrAllocationSite(r4, r6); 575 __ Push(cp);
576 576
577 if (!create_implicit_receiver) { 577 if (!create_implicit_receiver) {
578 __ SmiTag(r6, r2); 578 __ SmiTag(r6, r2);
579 __ LoadAndTestP(r6, r6); 579 __ LoadAndTestP(r6, r6);
580 __ Push(cp, r4, r6); 580 __ Push(cp, r6);
581 __ PushRoot(Heap::kTheHoleValueRootIndex); 581 __ PushRoot(Heap::kTheHoleValueRootIndex);
582 } else { 582 } else {
583 __ SmiTag(r2); 583 __ SmiTag(r2);
584 __ Push(cp, r4, r2); 584 __ Push(cp, r2);
585 585
586 // Allocate the new receiver object. 586 // Allocate the new receiver object.
587 __ Push(r3, r5); 587 __ Push(r3, r5);
588 FastNewObjectStub stub(masm->isolate()); 588 FastNewObjectStub stub(masm->isolate());
589 __ CallStub(&stub); 589 __ CallStub(&stub);
590 __ LoadRR(r6, r2); 590 __ LoadRR(r6, r2);
591 __ Pop(r3, r5); 591 __ Pop(r3, r5);
592 592
593 // ----------- S t a t e ------------- 593 // ----------- S t a t e -------------
594 // -- r3: constructor function 594 // -- r3: constructor function
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 703
704 __ SmiToPtrArrayOffset(r3, r3); 704 __ SmiToPtrArrayOffset(r3, r3);
705 __ AddP(sp, sp, r3); 705 __ AddP(sp, sp, r3);
706 __ AddP(sp, sp, Operand(kPointerSize)); 706 __ AddP(sp, sp, Operand(kPointerSize));
707 if (create_implicit_receiver) { 707 if (create_implicit_receiver) {
708 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r3, r4); 708 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r3, r4);
709 } 709 }
710 __ Ret(); 710 __ Ret();
711 } 711 }
712 712
713 } // namespace
714
713 void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { 715 void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
714 Generate_JSConstructStubHelper(masm, false, true, false); 716 Generate_JSConstructStubHelper(masm, false, true, false);
715 } 717 }
716 718
717 void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { 719 void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) {
718 Generate_JSConstructStubHelper(masm, true, false, false); 720 Generate_JSConstructStubHelper(masm, true, false, false);
719 } 721 }
720 722
721 void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { 723 void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
722 Generate_JSConstructStubHelper(masm, false, false, false); 724 Generate_JSConstructStubHelper(masm, false, false, false);
(...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 __ bkpt(0); 3008 __ bkpt(0);
3007 } 3009 }
3008 } 3010 }
3009 3011
3010 #undef __ 3012 #undef __
3011 3013
3012 } // namespace internal 3014 } // namespace internal
3013 } // namespace v8 3015 } // namespace v8
3014 3016
3015 #endif // V8_TARGET_ARCH_S390 3017 #endif // V8_TARGET_ARCH_S390
OLDNEW
« src/builtins/ppc/builtins-ppc.cc ('K') | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698