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