| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| 367 | 367 |
| 368 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 368 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 369 DCHECK(ToRegister(instr->context()).is(cp)); | 369 DCHECK(ToRegister(instr->context()).is(cp)); |
| 370 DCHECK(ToRegister(instr->function()).Is(x1)); | 370 DCHECK(ToRegister(instr->function()).Is(x1)); |
| 371 DCHECK(ToRegister(instr->result()).Is(x0)); | 371 DCHECK(ToRegister(instr->result()).Is(x0)); |
| 372 | 372 |
| 373 int arity = instr->arity(); | 373 int arity = instr->arity(); |
| 374 ConvertReceiverMode mode = instr->hydrogen()->convert_mode(); |
| 374 if (instr->hydrogen()->HasVectorAndSlot()) { | 375 if (instr->hydrogen()->HasVectorAndSlot()) { |
| 375 Register slot_register = ToRegister(instr->temp_slot()); | 376 Register slot_register = ToRegister(instr->temp_slot()); |
| 376 Register vector_register = ToRegister(instr->temp_vector()); | 377 Register vector_register = ToRegister(instr->temp_vector()); |
| 377 DCHECK(slot_register.is(x3)); | 378 DCHECK(slot_register.is(x3)); |
| 378 DCHECK(vector_register.is(x2)); | 379 DCHECK(vector_register.is(x2)); |
| 379 | 380 |
| 380 AllowDeferredHandleDereference vector_structure_check; | 381 AllowDeferredHandleDereference vector_structure_check; |
| 381 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 382 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
| 382 int index = vector->GetIndex(instr->hydrogen()->slot()); | 383 int index = vector->GetIndex(instr->hydrogen()->slot()); |
| 383 | 384 |
| 384 __ Mov(vector_register, vector); | 385 __ Mov(vector_register, vector); |
| 385 __ Mov(slot_register, Operand(Smi::FromInt(index))); | 386 __ Mov(slot_register, Operand(Smi::FromInt(index))); |
| 386 | 387 |
| 387 Handle<Code> ic = | 388 Handle<Code> ic = |
| 388 CodeFactory::CallICInOptimizedCode(isolate(), arity).code(); | 389 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
| 389 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 390 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 390 } else { | 391 } else { |
| 391 __ Mov(x0, arity); | 392 __ Mov(x0, arity); |
| 392 CallCode(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET, instr); | 393 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
| 393 } | 394 } |
| 394 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 395 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
| 395 } | 396 } |
| 396 | 397 |
| 397 | 398 |
| 398 void LCodeGen::DoCallNew(LCallNew* instr) { | 399 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 399 DCHECK(ToRegister(instr->context()).is(cp)); | 400 DCHECK(ToRegister(instr->context()).is(cp)); |
| 400 DCHECK(instr->IsMarkedAsCall()); | 401 DCHECK(instr->IsMarkedAsCall()); |
| 401 DCHECK(ToRegister(instr->constructor()).is(x1)); | 402 DCHECK(ToRegister(instr->constructor()).is(x1)); |
| 402 | 403 |
| (...skipping 5545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5948 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5949 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 5949 __ Push(scope_info); | 5950 __ Push(scope_info); |
| 5950 __ Push(ToRegister(instr->function())); | 5951 __ Push(ToRegister(instr->function())); |
| 5951 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5952 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5952 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5953 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5953 } | 5954 } |
| 5954 | 5955 |
| 5955 | 5956 |
| 5956 } // namespace internal | 5957 } // namespace internal |
| 5957 } // namespace v8 | 5958 } // namespace v8 |
| OLD | NEW |