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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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/ia32/lithium-codegen-ia32.h ('k') | src/crankshaft/ia32/lithium-ia32.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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5279 matching lines...) Expand 10 before | Expand all | Expand 10 after
5290 #undef SIMD128_TYPE 5290 #undef SIMD128_TYPE
5291 // clang-format on 5291 // clang-format on
5292 5292
5293 } else { 5293 } else {
5294 __ jmp(false_label, false_distance); 5294 __ jmp(false_label, false_distance);
5295 } 5295 }
5296 return final_branch_condition; 5296 return final_branch_condition;
5297 } 5297 }
5298 5298
5299 5299
5300 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5301 Register temp = ToRegister(instr->temp());
5302
5303 EmitIsConstructCall(temp);
5304 EmitBranch(instr, equal);
5305 }
5306
5307
5308 void LCodeGen::EmitIsConstructCall(Register temp) {
5309 // Get the frame pointer for the calling frame.
5310 __ mov(temp, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
5311
5312 // Skip the arguments adaptor frame if it exists.
5313 Label check_frame_marker;
5314 __ cmp(Operand(temp, StandardFrameConstants::kContextOffset),
5315 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
5316 __ j(not_equal, &check_frame_marker, Label::kNear);
5317 __ mov(temp, Operand(temp, StandardFrameConstants::kCallerFPOffset));
5318
5319 // Check the marker in the calling frame.
5320 __ bind(&check_frame_marker);
5321 __ cmp(Operand(temp, StandardFrameConstants::kMarkerOffset),
5322 Immediate(Smi::FromInt(StackFrame::CONSTRUCT)));
5323 }
5324
5325
5326 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 5300 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
5327 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 5301 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
5328 // Ensure that we have enough space after the previous lazy-bailout 5302 // Ensure that we have enough space after the previous lazy-bailout
5329 // instruction for patching the code here. 5303 // instruction for patching the code here.
5330 int current_pc = masm()->pc_offset(); 5304 int current_pc = masm()->pc_offset();
5331 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 5305 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
5332 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 5306 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
5333 __ Nop(padding_size); 5307 __ Nop(padding_size);
5334 } 5308 }
5335 } 5309 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
5588 RecordSafepoint(Safepoint::kNoLazyDeopt); 5562 RecordSafepoint(Safepoint::kNoLazyDeopt);
5589 } 5563 }
5590 5564
5591 5565
5592 #undef __ 5566 #undef __
5593 5567
5594 } // namespace internal 5568 } // namespace internal
5595 } // namespace v8 5569 } // namespace v8
5596 5570
5597 #endif // V8_TARGET_ARCH_IA32 5571 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.h ('k') | src/crankshaft/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698