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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1479233002: Deprecate the %IsConstructCall intrinsic completely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_js-use-new-target-3
Patch Set: Rebased. Created 5 years 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/crankshaft/ppc/lithium-codegen-ppc.h ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 5683 matching lines...) Expand 10 before | Expand all | Expand 10 after
5694 // clang-format on 5694 // clang-format on
5695 5695
5696 } else { 5696 } else {
5697 __ b(false_label); 5697 __ b(false_label);
5698 } 5698 }
5699 5699
5700 return final_branch_condition; 5700 return final_branch_condition;
5701 } 5701 }
5702 5702
5703 5703
5704 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5705 Register temp1 = ToRegister(instr->temp());
5706
5707 EmitIsConstructCall(temp1, scratch0());
5708 EmitBranch(instr, eq);
5709 }
5710
5711
5712 void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
5713 DCHECK(!temp1.is(temp2));
5714 // Get the frame pointer for the calling frame.
5715 __ LoadP(temp1, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
5716
5717 // Skip the arguments adaptor frame if it exists.
5718 Label check_frame_marker;
5719 __ LoadP(temp2, MemOperand(temp1, StandardFrameConstants::kContextOffset));
5720 __ CmpSmiLiteral(temp2, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0);
5721 __ bne(&check_frame_marker);
5722 __ LoadP(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset));
5723
5724 // Check the marker in the calling frame.
5725 __ bind(&check_frame_marker);
5726 __ LoadP(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset));
5727 __ CmpSmiLiteral(temp1, Smi::FromInt(StackFrame::CONSTRUCT), r0);
5728 }
5729
5730
5731 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 5704 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
5732 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 5705 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
5733 // Ensure that we have enough space after the previous lazy-bailout 5706 // Ensure that we have enough space after the previous lazy-bailout
5734 // instruction for patching the code here. 5707 // instruction for patching the code here.
5735 int current_pc = masm()->pc_offset(); 5708 int current_pc = masm()->pc_offset();
5736 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 5709 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
5737 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 5710 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
5738 DCHECK_EQ(0, padding_size % Assembler::kInstrSize); 5711 DCHECK_EQ(0, padding_size % Assembler::kInstrSize);
5739 while (padding_size > 0) { 5712 while (padding_size > 0) {
5740 __ nop(); 5713 __ nop();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
5993 __ Push(scope_info); 5966 __ Push(scope_info);
5994 __ push(ToRegister(instr->function())); 5967 __ push(ToRegister(instr->function()));
5995 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5968 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5996 RecordSafepoint(Safepoint::kNoLazyDeopt); 5969 RecordSafepoint(Safepoint::kNoLazyDeopt);
5997 } 5970 }
5998 5971
5999 5972
6000 #undef __ 5973 #undef __
6001 } // namespace internal 5974 } // namespace internal
6002 } // namespace v8 5975 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.h ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698