| OLD | NEW | 
|     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/arm/lithium-codegen-arm.h" |     5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" |    10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 
| (...skipping 5399 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5410     // clang-format on |  5410     // clang-format on | 
|  5411  |  5411  | 
|  5412   } else { |  5412   } else { | 
|  5413     __ b(false_label); |  5413     __ b(false_label); | 
|  5414   } |  5414   } | 
|  5415  |  5415  | 
|  5416   return final_branch_condition; |  5416   return final_branch_condition; | 
|  5417 } |  5417 } | 
|  5418  |  5418  | 
|  5419  |  5419  | 
|  5420 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { |  | 
|  5421   Register temp1 = ToRegister(instr->temp()); |  | 
|  5422  |  | 
|  5423   EmitIsConstructCall(temp1, scratch0()); |  | 
|  5424   EmitBranch(instr, eq); |  | 
|  5425 } |  | 
|  5426  |  | 
|  5427  |  | 
|  5428 void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) { |  | 
|  5429   DCHECK(!temp1.is(temp2)); |  | 
|  5430   // Get the frame pointer for the calling frame. |  | 
|  5431   __ ldr(temp1, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |  | 
|  5432  |  | 
|  5433   // Skip the arguments adaptor frame if it exists. |  | 
|  5434   __ ldr(temp2, MemOperand(temp1, StandardFrameConstants::kContextOffset)); |  | 
|  5435   __ cmp(temp2, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |  | 
|  5436   __ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset), eq); |  | 
|  5437  |  | 
|  5438   // Check the marker in the calling frame. |  | 
|  5439   __ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset)); |  | 
|  5440   __ cmp(temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); |  | 
|  5441 } |  | 
|  5442  |  | 
|  5443  |  | 
|  5444 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { |  5420 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { | 
|  5445   if (info()->ShouldEnsureSpaceForLazyDeopt()) { |  5421   if (info()->ShouldEnsureSpaceForLazyDeopt()) { | 
|  5446     // Ensure that we have enough space after the previous lazy-bailout |  5422     // Ensure that we have enough space after the previous lazy-bailout | 
|  5447     // instruction for patching the code here. |  5423     // instruction for patching the code here. | 
|  5448     int current_pc = masm()->pc_offset(); |  5424     int current_pc = masm()->pc_offset(); | 
|  5449     if (current_pc < last_lazy_deopt_pc_ + space_needed) { |  5425     if (current_pc < last_lazy_deopt_pc_ + space_needed) { | 
|  5450       // Block literal pool emission for duration of padding. |  5426       // Block literal pool emission for duration of padding. | 
|  5451       Assembler::BlockConstPoolScope block_const_pool(masm()); |  5427       Assembler::BlockConstPoolScope block_const_pool(masm()); | 
|  5452       int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |  5428       int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 
|  5453       DCHECK_EQ(0, padding_size % Assembler::kInstrSize); |  5429       DCHECK_EQ(0, padding_size % Assembler::kInstrSize); | 
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5718   __ push(ToRegister(instr->function())); |  5694   __ push(ToRegister(instr->function())); | 
|  5719   CallRuntime(Runtime::kPushBlockContext, 2, instr); |  5695   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 
|  5720   RecordSafepoint(Safepoint::kNoLazyDeopt); |  5696   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
|  5721 } |  5697 } | 
|  5722  |  5698  | 
|  5723  |  5699  | 
|  5724 #undef __ |  5700 #undef __ | 
|  5725  |  5701  | 
|  5726 }  // namespace internal |  5702 }  // namespace internal | 
|  5727 }  // namespace v8 |  5703 }  // namespace v8 | 
| OLD | NEW |