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

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: Removed extra push as suggested. 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
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
576 575
577 if (!create_implicit_receiver) { 576 if (!create_implicit_receiver) {
578 __ SmiTag(r6, r2); 577 __ SmiTag(r6, r2);
579 __ LoadAndTestP(r6, r6); 578 __ LoadAndTestP(r6, r6);
580 __ Push(cp, r4, r6); 579 __ Push(cp, r6);
581 __ PushRoot(Heap::kTheHoleValueRootIndex); 580 __ PushRoot(Heap::kTheHoleValueRootIndex);
582 } else { 581 } else {
583 __ SmiTag(r2); 582 __ SmiTag(r2);
584 __ Push(cp, r4, r2); 583 __ Push(cp, r2);
585 584
586 // Allocate the new receiver object. 585 // Allocate the new receiver object.
587 __ Push(r3, r5); 586 __ Push(r3, r5);
588 FastNewObjectStub stub(masm->isolate()); 587 FastNewObjectStub stub(masm->isolate());
589 __ CallStub(&stub); 588 __ CallStub(&stub);
590 __ LoadRR(r6, r2); 589 __ LoadRR(r6, r2);
591 __ Pop(r3, r5); 590 __ Pop(r3, r5);
592 591
593 // ----------- S t a t e ------------- 592 // ----------- S t a t e -------------
594 // -- r3: constructor function 593 // -- r3: constructor function
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 702
704 __ SmiToPtrArrayOffset(r3, r3); 703 __ SmiToPtrArrayOffset(r3, r3);
705 __ AddP(sp, sp, r3); 704 __ AddP(sp, sp, r3);
706 __ AddP(sp, sp, Operand(kPointerSize)); 705 __ AddP(sp, sp, Operand(kPointerSize));
707 if (create_implicit_receiver) { 706 if (create_implicit_receiver) {
708 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r3, r4); 707 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r3, r4);
709 } 708 }
710 __ Ret(); 709 __ Ret();
711 } 710 }
712 711
712 } // namespace
713
713 void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { 714 void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
714 Generate_JSConstructStubHelper(masm, false, true, false); 715 Generate_JSConstructStubHelper(masm, false, true, false);
715 } 716 }
716 717
717 void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { 718 void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) {
718 Generate_JSConstructStubHelper(masm, true, false, false); 719 Generate_JSConstructStubHelper(masm, true, false, false);
719 } 720 }
720 721
721 void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { 722 void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) {
722 Generate_JSConstructStubHelper(masm, false, false, false); 723 Generate_JSConstructStubHelper(masm, false, false, false);
(...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 __ bkpt(0); 3007 __ bkpt(0);
3007 } 3008 }
3008 } 3009 }
3009 3010
3010 #undef __ 3011 #undef __
3011 3012
3012 } // namespace internal 3013 } // namespace internal
3013 } // namespace v8 3014 } // namespace v8
3014 3015
3015 #endif // V8_TARGET_ARCH_S390 3016 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698