Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3341 DeoptimizeIfRoot( 3341 DeoptimizeIfRoot(
3342 result, Heap::kTheHoleValueRootIndex, instr->environment()); 3342 result, Heap::kTheHoleValueRootIndex, instr->environment());
3343 } 3343 }
3344 } 3344 }
3345 3345
3346 3346
3347 template <class T> 3347 template <class T>
3348 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { 3348 void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
3349 DCHECK(FLAG_vector_ics); 3349 DCHECK(FLAG_vector_ics);
3350 Register vector = ToRegister(instr->temp_vector()); 3350 Register vector = ToRegister(instr->temp_vector());
3351 DCHECK(vector.is(FullVectorLoadConvention::VectorRegister())); 3351 DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister()));
3352 __ Mov(vector, instr->hydrogen()->feedback_vector()); 3352 __ Mov(vector, instr->hydrogen()->feedback_vector());
3353 // No need to allocate this register. 3353 // No need to allocate this register.
3354 DCHECK(FullVectorLoadConvention::SlotRegister().is(x0)); 3354 DCHECK(VectorLoadICDescriptor::SlotRegister().is(x0));
3355 __ Mov(FullVectorLoadConvention::SlotRegister(), 3355 __ Mov(VectorLoadICDescriptor::SlotRegister(),
3356 Smi::FromInt(instr->hydrogen()->slot())); 3356 Smi::FromInt(instr->hydrogen()->slot()));
3357 } 3357 }
3358 3358
3359 3359
3360 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3360 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3361 DCHECK(ToRegister(instr->context()).is(cp)); 3361 DCHECK(ToRegister(instr->context()).is(cp));
3362 DCHECK(ToRegister(instr->global_object()) 3362 DCHECK(ToRegister(instr->global_object())
3363 .is(LoadConvention::ReceiverRegister())); 3363 .is(LoadDescriptor::ReceiverRegister()));
3364 DCHECK(ToRegister(instr->result()).Is(x0)); 3364 DCHECK(ToRegister(instr->result()).Is(x0));
3365 __ Mov(LoadConvention::NameRegister(), Operand(instr->name())); 3365 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3366 if (FLAG_vector_ics) { 3366 if (FLAG_vector_ics) {
3367 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3367 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3368 } 3368 }
3369 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3369 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3370 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); 3370 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode);
3371 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3371 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3372 } 3372 }
3373 3373
3374 3374
3375 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( 3375 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand(
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 } else { 3609 } else {
3610 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, 3610 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex,
3611 instr->environment()); 3611 instr->environment());
3612 } 3612 }
3613 } 3613 }
3614 } 3614 }
3615 3615
3616 3616
3617 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3617 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3618 DCHECK(ToRegister(instr->context()).is(cp)); 3618 DCHECK(ToRegister(instr->context()).is(cp));
3619 DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); 3619 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3620 DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister())); 3620 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3621 if (FLAG_vector_ics) { 3621 if (FLAG_vector_ics) {
3622 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3622 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3623 } 3623 }
3624 3624
3625 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 3625 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
3626 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3626 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3627 3627
3628 DCHECK(ToRegister(instr->result()).Is(x0)); 3628 DCHECK(ToRegister(instr->result()).Is(x0));
3629 } 3629 }
3630 3630
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3665 Representation::Integer32()); 3665 Representation::Integer32());
3666 } else { 3666 } else {
3667 __ Load(result, FieldMemOperand(source, offset), access.representation()); 3667 __ Load(result, FieldMemOperand(source, offset), access.representation());
3668 } 3668 }
3669 } 3669 }
3670 3670
3671 3671
3672 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3672 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3673 DCHECK(ToRegister(instr->context()).is(cp)); 3673 DCHECK(ToRegister(instr->context()).is(cp));
3674 // LoadIC expects name and receiver in registers. 3674 // LoadIC expects name and receiver in registers.
3675 DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister())); 3675 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3676 __ Mov(LoadConvention::NameRegister(), Operand(instr->name())); 3676 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3677 if (FLAG_vector_ics) { 3677 if (FLAG_vector_ics) {
3678 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3678 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3679 } 3679 }
3680 3680
3681 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); 3681 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL);
3682 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3682 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3683 3683
3684 DCHECK(ToRegister(instr->result()).is(x0)); 3684 DCHECK(ToRegister(instr->result()).is(x0));
3685 } 3685 }
3686 3686
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
5302 __ Add(element_addr, mem_op.base(), mem_op.OffsetAsOperand()); 5302 __ Add(element_addr, mem_op.base(), mem_op.OffsetAsOperand());
5303 __ RecordWrite(elements, element_addr, value, GetLinkRegisterState(), 5303 __ RecordWrite(elements, element_addr, value, GetLinkRegisterState(),
5304 kSaveFPRegs, EMIT_REMEMBERED_SET, check_needed, 5304 kSaveFPRegs, EMIT_REMEMBERED_SET, check_needed,
5305 instr->hydrogen()->PointersToHereCheckForValue()); 5305 instr->hydrogen()->PointersToHereCheckForValue());
5306 } 5306 }
5307 } 5307 }
5308 5308
5309 5309
5310 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 5310 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
5311 DCHECK(ToRegister(instr->context()).is(cp)); 5311 DCHECK(ToRegister(instr->context()).is(cp));
5312 DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); 5312 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
5313 DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister())); 5313 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
5314 DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); 5314 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
5315 5315
5316 Handle<Code> ic = instr->strict_mode() == STRICT 5316 Handle<Code> ic = instr->strict_mode() == STRICT
5317 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 5317 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
5318 : isolate()->builtins()->KeyedStoreIC_Initialize(); 5318 : isolate()->builtins()->KeyedStoreIC_Initialize();
5319 CallCode(ic, RelocInfo::CODE_TARGET, instr); 5319 CallCode(ic, RelocInfo::CODE_TARGET, instr);
5320 } 5320 }
5321 5321
5322 5322
5323 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 5323 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
5324 Representation representation = instr->representation(); 5324 Representation representation = instr->representation();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
5409 kSaveFPRegs, 5409 kSaveFPRegs,
5410 EMIT_REMEMBERED_SET, 5410 EMIT_REMEMBERED_SET,
5411 instr->hydrogen()->SmiCheckForWriteBarrier(), 5411 instr->hydrogen()->SmiCheckForWriteBarrier(),
5412 instr->hydrogen()->PointersToHereCheckForValue()); 5412 instr->hydrogen()->PointersToHereCheckForValue());
5413 } 5413 }
5414 } 5414 }
5415 5415
5416 5416
5417 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 5417 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
5418 DCHECK(ToRegister(instr->context()).is(cp)); 5418 DCHECK(ToRegister(instr->context()).is(cp));
5419 DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister())); 5419 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
5420 DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister())); 5420 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
5421 5421
5422 __ Mov(StoreConvention::NameRegister(), Operand(instr->name())); 5422 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
5423 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); 5423 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
5424 CallCode(ic, RelocInfo::CODE_TARGET, instr); 5424 CallCode(ic, RelocInfo::CODE_TARGET, instr);
5425 } 5425 }
5426 5426
5427 5427
5428 void LCodeGen::DoStringAdd(LStringAdd* instr) { 5428 void LCodeGen::DoStringAdd(LStringAdd* instr) {
5429 DCHECK(ToRegister(instr->context()).is(cp)); 5429 DCHECK(ToRegister(instr->context()).is(cp));
5430 DCHECK(ToRegister(instr->left()).Is(x1)); 5430 DCHECK(ToRegister(instr->left()).Is(x1));
5431 DCHECK(ToRegister(instr->right()).Is(x0)); 5431 DCHECK(ToRegister(instr->right()).Is(x0));
5432 StringAddStub stub(isolate(), 5432 StringAddStub stub(isolate(),
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
6021 Handle<ScopeInfo> scope_info = instr->scope_info(); 6021 Handle<ScopeInfo> scope_info = instr->scope_info();
6022 __ Push(scope_info); 6022 __ Push(scope_info);
6023 __ Push(ToRegister(instr->function())); 6023 __ Push(ToRegister(instr->function()));
6024 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6024 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6025 RecordSafepoint(Safepoint::kNoLazyDeopt); 6025 RecordSafepoint(Safepoint::kNoLazyDeopt);
6026 } 6026 }
6027 6027
6028 6028
6029 6029
6030 } } // namespace v8::internal 6030 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698