| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 if ((code->kind() == Code::BINARY_OP_IC) || | 353 if ((code->kind() == Code::BINARY_OP_IC) || |
| 354 (code->kind() == Code::COMPARE_IC)) { | 354 (code->kind() == Code::COMPARE_IC)) { |
| 355 // Signal that we don't inline smi code before these stubs in the | 355 // Signal that we don't inline smi code before these stubs in the |
| 356 // optimizing code generator. | 356 // optimizing code generator. |
| 357 InlineSmiCheckInfo::EmitNotInlined(masm()); | 357 InlineSmiCheckInfo::EmitNotInlined(masm()); |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 | 360 |
| 361 | 361 |
| 362 void LCodeGen::DoCallFunction(LCallFunction* instr) { | |
| 363 HCallFunction* hinstr = instr->hydrogen(); | |
| 364 DCHECK(ToRegister(instr->context()).is(cp)); | |
| 365 DCHECK(ToRegister(instr->function()).Is(x1)); | |
| 366 DCHECK(ToRegister(instr->result()).Is(x0)); | |
| 367 | |
| 368 int arity = instr->arity(); | |
| 369 ConvertReceiverMode mode = hinstr->convert_mode(); | |
| 370 if (hinstr->HasVectorAndSlot()) { | |
| 371 Register slot_register = ToRegister(instr->temp_slot()); | |
| 372 Register vector_register = ToRegister(instr->temp_vector()); | |
| 373 DCHECK(slot_register.is(x3)); | |
| 374 DCHECK(vector_register.is(x2)); | |
| 375 | |
| 376 AllowDeferredHandleDereference vector_structure_check; | |
| 377 Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); | |
| 378 int index = vector->GetIndex(hinstr->slot()); | |
| 379 | |
| 380 __ Mov(vector_register, vector); | |
| 381 __ Mov(slot_register, Operand(Smi::FromInt(index))); | |
| 382 | |
| 383 Handle<Code> ic = | |
| 384 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); | |
| 385 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
| 386 } else { | |
| 387 __ Mov(x0, arity); | |
| 388 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); | |
| 389 } | |
| 390 RecordPushedArgumentsDelta(hinstr->argument_delta()); | |
| 391 } | |
| 392 | |
| 393 | |
| 394 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 362 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 395 DCHECK(instr->IsMarkedAsCall()); | 363 DCHECK(instr->IsMarkedAsCall()); |
| 396 DCHECK(ToRegister(instr->context()).is(cp)); | 364 DCHECK(ToRegister(instr->context()).is(cp)); |
| 397 DCHECK(ToRegister(instr->constructor()).is(x1)); | 365 DCHECK(ToRegister(instr->constructor()).is(x1)); |
| 398 | 366 |
| 399 __ Mov(x0, Operand(instr->arity())); | 367 __ Mov(x0, Operand(instr->arity())); |
| 400 if (instr->arity() == 1) { | 368 if (instr->arity() == 1) { |
| 401 // We only need the allocation site for the case we have a length argument. | 369 // We only need the allocation site for the case we have a length argument. |
| 402 // The case may bail out to the runtime, which will determine the correct | 370 // The case may bail out to the runtime, which will determine the correct |
| 403 // elements kind with the site. | 371 // elements kind with the site. |
| (...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5704 | 5672 |
| 5705 | 5673 |
| 5706 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5674 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5707 Register context = ToRegister(instr->context()); | 5675 Register context = ToRegister(instr->context()); |
| 5708 __ Str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5676 __ Str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 5709 } | 5677 } |
| 5710 | 5678 |
| 5711 | 5679 |
| 5712 } // namespace internal | 5680 } // namespace internal |
| 5713 } // namespace v8 | 5681 } // namespace v8 |
| OLD | NEW |