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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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/mips64/lithium-codegen-mips64.h ('k') | src/crankshaft/mips64/lithium-mips64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 5632 matching lines...) Expand 10 before | Expand all | Expand 10 after
5643 } else { 5643 } else {
5644 *cmp1 = at; 5644 *cmp1 = at;
5645 *cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion. 5645 *cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion.
5646 __ Branch(false_label); 5646 __ Branch(false_label);
5647 } 5647 }
5648 5648
5649 return final_branch_condition; 5649 return final_branch_condition;
5650 } 5650 }
5651 5651
5652 5652
5653 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5654 Register temp1 = ToRegister(instr->temp());
5655
5656 EmitIsConstructCall(temp1, scratch0());
5657
5658 EmitBranch(instr, eq, temp1,
5659 Operand(Smi::FromInt(StackFrame::CONSTRUCT)));
5660 }
5661
5662
5663 void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
5664 DCHECK(!temp1.is(temp2));
5665 // Get the frame pointer for the calling frame.
5666 __ ld(temp1, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
5667
5668 // Skip the arguments adaptor frame if it exists.
5669 Label check_frame_marker;
5670 __ ld(temp2, MemOperand(temp1, StandardFrameConstants::kContextOffset));
5671 __ Branch(&check_frame_marker, ne, temp2,
5672 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
5673 __ ld(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset));
5674
5675 // Check the marker in the calling frame.
5676 __ bind(&check_frame_marker);
5677 __ ld(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset));
5678 }
5679
5680
5681 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 5653 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
5682 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 5654 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
5683 // Ensure that we have enough space after the previous lazy-bailout 5655 // Ensure that we have enough space after the previous lazy-bailout
5684 // instruction for patching the code here. 5656 // instruction for patching the code here.
5685 int current_pc = masm()->pc_offset(); 5657 int current_pc = masm()->pc_offset();
5686 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 5658 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
5687 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 5659 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
5688 DCHECK_EQ(0, padding_size % Assembler::kInstrSize); 5660 DCHECK_EQ(0, padding_size % Assembler::kInstrSize);
5689 while (padding_size > 0) { 5661 while (padding_size > 0) {
5690 __ nop(); 5662 __ nop();
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
5950 __ Push(at, ToRegister(instr->function())); 5922 __ Push(at, ToRegister(instr->function()));
5951 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5923 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5952 RecordSafepoint(Safepoint::kNoLazyDeopt); 5924 RecordSafepoint(Safepoint::kNoLazyDeopt);
5953 } 5925 }
5954 5926
5955 5927
5956 #undef __ 5928 #undef __
5957 5929
5958 } // namespace internal 5930 } // namespace internal
5959 } // namespace v8 5931 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.h ('k') | src/crankshaft/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698