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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
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 3357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3368 DCHECK(ToRegister(instr->result()).Is(x0)); | 3368 DCHECK(ToRegister(instr->result()).Is(x0)); |
3369 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3369 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3370 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3370 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3371 Handle<Code> ic = | 3371 Handle<Code> ic = |
3372 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), | 3372 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), |
3373 SLOPPY, PREMONOMORPHIC).code(); | 3373 SLOPPY, PREMONOMORPHIC).code(); |
3374 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3374 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3375 } | 3375 } |
3376 | 3376 |
3377 | 3377 |
| 3378 void LCodeGen::DoLoadGlobalViaContext(LLoadGlobalViaContext* instr) { |
| 3379 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3380 DCHECK(ToRegister(instr->result()).is(x0)); |
| 3381 |
| 3382 __ Mov(LoadGlobalViaContextDescriptor::DepthRegister(), |
| 3383 Operand(Smi::FromInt(instr->depth()))); |
| 3384 __ Mov(LoadGlobalViaContextDescriptor::SlotRegister(), |
| 3385 Operand(Smi::FromInt(instr->slot_index()))); |
| 3386 __ Mov(LoadGlobalViaContextDescriptor::NameRegister(), |
| 3387 Operand(instr->name())); |
| 3388 |
| 3389 Handle<Code> stub = |
| 3390 CodeFactory::LoadGlobalViaContext(isolate(), instr->depth()).code(); |
| 3391 CallCode(stub, RelocInfo::CODE_TARGET, instr); |
| 3392 } |
| 3393 |
| 3394 |
3378 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3395 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3379 Register key, | 3396 Register key, |
3380 Register base, | 3397 Register base, |
3381 Register scratch, | 3398 Register scratch, |
3382 bool key_is_smi, | 3399 bool key_is_smi, |
3383 bool key_is_constant, | 3400 bool key_is_constant, |
3384 int constant_key, | 3401 int constant_key, |
3385 ElementsKind elements_kind, | 3402 ElementsKind elements_kind, |
3386 int base_offset) { | 3403 int base_offset) { |
3387 int element_size_shift = ElementsKindToShiftSize(elements_kind); | 3404 int element_size_shift = ElementsKindToShiftSize(elements_kind); |
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5506 } | 5523 } |
5507 | 5524 |
5508 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name())); | 5525 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name())); |
5509 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( | 5526 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( |
5510 isolate(), instr->language_mode(), | 5527 isolate(), instr->language_mode(), |
5511 instr->hydrogen()->initialization_state()).code(); | 5528 instr->hydrogen()->initialization_state()).code(); |
5512 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 5529 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
5513 } | 5530 } |
5514 | 5531 |
5515 | 5532 |
| 5533 void LCodeGen::DoStoreGlobalViaContext(LStoreGlobalViaContext* instr) { |
| 5534 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5535 DCHECK(ToRegister(instr->value()) |
| 5536 .is(StoreGlobalViaContextDescriptor::ValueRegister())); |
| 5537 |
| 5538 __ Mov(StoreGlobalViaContextDescriptor::DepthRegister(), |
| 5539 Operand(Smi::FromInt(instr->depth()))); |
| 5540 __ Mov(StoreGlobalViaContextDescriptor::SlotRegister(), |
| 5541 Operand(Smi::FromInt(instr->slot_index()))); |
| 5542 __ Mov(StoreGlobalViaContextDescriptor::NameRegister(), |
| 5543 Operand(instr->name())); |
| 5544 |
| 5545 Handle<Code> stub = |
| 5546 CodeFactory::StoreGlobalViaContext(isolate(), instr->depth(), |
| 5547 instr->language_mode()).code(); |
| 5548 CallCode(stub, RelocInfo::CODE_TARGET, instr); |
| 5549 } |
| 5550 |
| 5551 |
5516 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 5552 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
5517 DCHECK(ToRegister(instr->context()).is(cp)); | 5553 DCHECK(ToRegister(instr->context()).is(cp)); |
5518 DCHECK(ToRegister(instr->left()).Is(x1)); | 5554 DCHECK(ToRegister(instr->left()).Is(x1)); |
5519 DCHECK(ToRegister(instr->right()).Is(x0)); | 5555 DCHECK(ToRegister(instr->right()).Is(x0)); |
5520 StringAddStub stub(isolate(), | 5556 StringAddStub stub(isolate(), |
5521 instr->hydrogen()->flags(), | 5557 instr->hydrogen()->flags(), |
5522 instr->hydrogen()->pretenure_flag()); | 5558 instr->hydrogen()->pretenure_flag()); |
5523 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5559 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5524 } | 5560 } |
5525 | 5561 |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6131 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6167 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6132 __ Push(scope_info); | 6168 __ Push(scope_info); |
6133 __ Push(ToRegister(instr->function())); | 6169 __ Push(ToRegister(instr->function())); |
6134 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6170 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6135 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6171 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6136 } | 6172 } |
6137 | 6173 |
6138 | 6174 |
6139 } // namespace internal | 6175 } // namespace internal |
6140 } // namespace v8 | 6176 } // namespace v8 |
OLD | NEW |