| 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 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3433 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3433 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 3434 DCHECK(ToRegister(instr->context()).is(cp)); | 3434 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3435 DCHECK(ToRegister(instr->global_object()) | 3435 DCHECK(ToRegister(instr->global_object()) |
| 3436 .is(LoadDescriptor::ReceiverRegister())); | 3436 .is(LoadDescriptor::ReceiverRegister())); |
| 3437 DCHECK(ToRegister(instr->result()).Is(x0)); | 3437 DCHECK(ToRegister(instr->result()).Is(x0)); |
| 3438 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3438 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 3439 if (FLAG_vector_ics) { | 3439 if (FLAG_vector_ics) { |
| 3440 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3440 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 3441 } | 3441 } |
| 3442 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3442 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 3443 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); | 3443 Handle<Code> ic = |
| 3444 CodeFactory::LoadICInOptimizedCode(isolate(), mode, UNINITIALIZED).code(); |
| 3444 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3445 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3445 } | 3446 } |
| 3446 | 3447 |
| 3447 | 3448 |
| 3448 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3449 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
| 3449 Register key, | 3450 Register key, |
| 3450 Register base, | 3451 Register base, |
| 3451 Register scratch, | 3452 Register scratch, |
| 3452 bool key_is_smi, | 3453 bool key_is_smi, |
| 3453 bool key_is_constant, | 3454 bool key_is_constant, |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3742 | 3743 |
| 3743 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3744 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 3744 DCHECK(ToRegister(instr->context()).is(cp)); | 3745 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3745 // LoadIC expects name and receiver in registers. | 3746 // LoadIC expects name and receiver in registers. |
| 3746 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3747 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 3747 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3748 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 3748 if (FLAG_vector_ics) { | 3749 if (FLAG_vector_ics) { |
| 3749 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3750 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 3750 } | 3751 } |
| 3751 | 3752 |
| 3752 Handle<Code> ic = | 3753 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
| 3753 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); | 3754 isolate(), NOT_CONTEXTUAL, |
| 3755 instr->hydrogen()->initialization_state()).code(); |
| 3754 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3756 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3755 | 3757 |
| 3756 DCHECK(ToRegister(instr->result()).is(x0)); | 3758 DCHECK(ToRegister(instr->result()).is(x0)); |
| 3757 } | 3759 } |
| 3758 | 3760 |
| 3759 | 3761 |
| 3760 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3762 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
| 3761 Register result = ToRegister(instr->result()); | 3763 Register result = ToRegister(instr->result()); |
| 3762 __ LoadRoot(result, instr->index()); | 3764 __ LoadRoot(result, instr->index()); |
| 3763 } | 3765 } |
| (...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5484 } | 5486 } |
| 5485 } | 5487 } |
| 5486 | 5488 |
| 5487 | 5489 |
| 5488 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 5490 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
| 5489 DCHECK(ToRegister(instr->context()).is(cp)); | 5491 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5490 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); | 5492 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); |
| 5491 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); | 5493 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); |
| 5492 | 5494 |
| 5493 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name())); | 5495 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name())); |
| 5494 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->language_mode()); | 5496 Handle<Code> ic = |
| 5497 StoreIC::initialize_stub(isolate(), instr->language_mode(), |
| 5498 instr->hydrogen()->initialization_state()); |
| 5495 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 5499 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 5496 } | 5500 } |
| 5497 | 5501 |
| 5498 | 5502 |
| 5499 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 5503 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
| 5500 DCHECK(ToRegister(instr->context()).is(cp)); | 5504 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5501 DCHECK(ToRegister(instr->left()).Is(x1)); | 5505 DCHECK(ToRegister(instr->left()).Is(x1)); |
| 5502 DCHECK(ToRegister(instr->right()).Is(x0)); | 5506 DCHECK(ToRegister(instr->right()).Is(x0)); |
| 5503 StringAddStub stub(isolate(), | 5507 StringAddStub stub(isolate(), |
| 5504 instr->hydrogen()->flags(), | 5508 instr->hydrogen()->flags(), |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6096 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6100 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 6097 __ Push(scope_info); | 6101 __ Push(scope_info); |
| 6098 __ Push(ToRegister(instr->function())); | 6102 __ Push(ToRegister(instr->function())); |
| 6099 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6103 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6100 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6104 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6101 } | 6105 } |
| 6102 | 6106 |
| 6103 | 6107 |
| 6104 | 6108 |
| 6105 } } // namespace v8::internal | 6109 } } // namespace v8::internal |
| OLD | NEW |