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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 538573002: MIPS: Make concrete classes for individual call descriptors. - internal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips64 port added. 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
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | src/mips/debug-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 10 matching lines...) Expand all
21 21
22 22
23 static void InitializeArrayConstructorDescriptor( 23 static void InitializeArrayConstructorDescriptor(
24 Isolate* isolate, CodeStub::Major major, 24 Isolate* isolate, CodeStub::Major major,
25 CodeStubInterfaceDescriptor* descriptor, 25 CodeStubInterfaceDescriptor* descriptor,
26 int constant_stack_parameter_count) { 26 int constant_stack_parameter_count) {
27 Address deopt_handler = Runtime::FunctionForId( 27 Address deopt_handler = Runtime::FunctionForId(
28 Runtime::kArrayConstructor)->entry; 28 Runtime::kArrayConstructor)->entry;
29 29
30 if (constant_stack_parameter_count == 0) { 30 if (constant_stack_parameter_count == 0) {
31 CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( 31 ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
32 CallDescriptorKey::ArrayConstructorConstantArgCountCall);
33 descriptor->Initialize(major, call_descriptor, deopt_handler, 32 descriptor->Initialize(major, call_descriptor, deopt_handler,
34 constant_stack_parameter_count, 33 constant_stack_parameter_count,
35 JS_FUNCTION_STUB_MODE); 34 JS_FUNCTION_STUB_MODE);
36 } else { 35 } else {
37 CallInterfaceDescriptor* call_descriptor = 36 ArrayConstructorDescriptor call_descriptor(isolate);
38 isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
39 descriptor->Initialize(major, call_descriptor, a0, deopt_handler, 37 descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
40 constant_stack_parameter_count, 38 constant_stack_parameter_count,
41 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); 39 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
42 } 40 }
43 } 41 }
44 42
45 43
46 static void InitializeInternalArrayConstructorDescriptor( 44 static void InitializeInternalArrayConstructorDescriptor(
47 Isolate* isolate, CodeStub::Major major, 45 Isolate* isolate, CodeStub::Major major,
48 CodeStubInterfaceDescriptor* descriptor, 46 CodeStubInterfaceDescriptor* descriptor,
49 int constant_stack_parameter_count) { 47 int constant_stack_parameter_count) {
50 Address deopt_handler = Runtime::FunctionForId( 48 Address deopt_handler = Runtime::FunctionForId(
51 Runtime::kInternalArrayConstructor)->entry; 49 Runtime::kInternalArrayConstructor)->entry;
52 50
53 if (constant_stack_parameter_count == 0) { 51 if (constant_stack_parameter_count == 0) {
54 CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( 52 InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
55 CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
56 descriptor->Initialize(major, call_descriptor, deopt_handler, 53 descriptor->Initialize(major, call_descriptor, deopt_handler,
57 constant_stack_parameter_count, 54 constant_stack_parameter_count,
58 JS_FUNCTION_STUB_MODE); 55 JS_FUNCTION_STUB_MODE);
59 } else { 56 } else {
60 CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( 57 InternalArrayConstructorDescriptor call_descriptor(isolate);
61 CallDescriptorKey::InternalArrayConstructorCall);
62 descriptor->Initialize(major, call_descriptor, a0, deopt_handler, 58 descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
63 constant_stack_parameter_count, 59 constant_stack_parameter_count,
64 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); 60 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
65 } 61 }
66 } 62 }
67 63
68 64
69 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 65 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
70 CodeStubInterfaceDescriptor* descriptor) { 66 CodeStubInterfaceDescriptor* descriptor) {
71 InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0); 67 InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0);
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 __ LoadRoot(v0, Heap::kTrueValueRootIndex); 1704 __ LoadRoot(v0, Heap::kTrueValueRootIndex);
1709 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); 1705 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg));
1710 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 1706 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
1711 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); 1707 __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
1712 } 1708 }
1713 } 1709 }
1714 1710
1715 1711
1716 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1712 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1717 Label miss; 1713 Label miss;
1718 Register receiver = LoadConvention::ReceiverRegister(); 1714 Register receiver = LoadDescriptor::ReceiverRegister();
1719 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3, 1715 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
1720 t0, &miss); 1716 t0, &miss);
1721 __ bind(&miss); 1717 __ bind(&miss);
1722 PropertyAccessCompiler::TailCallBuiltin( 1718 PropertyAccessCompiler::TailCallBuiltin(
1723 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1719 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1724 } 1720 }
1725 1721
1726 1722
1727 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 1723 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
1728 // The displacement is the offset of the last parameter (if any) 1724 // The displacement is the offset of the last parameter (if any)
(...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after
4536 __ Addu(a1, a1, Operand(1)); 4532 __ Addu(a1, a1, Operand(1));
4537 } 4533 }
4538 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 4534 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
4539 __ sll(a1, a1, kPointerSizeLog2); 4535 __ sll(a1, a1, kPointerSizeLog2);
4540 __ Ret(USE_DELAY_SLOT); 4536 __ Ret(USE_DELAY_SLOT);
4541 __ Addu(sp, sp, a1); 4537 __ Addu(sp, sp, a1);
4542 } 4538 }
4543 4539
4544 4540
4545 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { 4541 void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
4546 EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); 4542 EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
4547 VectorLoadStub stub(isolate(), state()); 4543 VectorLoadStub stub(isolate(), state());
4548 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 4544 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
4549 } 4545 }
4550 4546
4551 4547
4552 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { 4548 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
4553 EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); 4549 EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
4554 VectorKeyedLoadStub stub(isolate()); 4550 VectorKeyedLoadStub stub(isolate());
4555 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 4551 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
4556 } 4552 }
4557 4553
4558 4554
4559 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 4555 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
4560 if (masm->isolate()->function_entry_hook() != NULL) { 4556 if (masm->isolate()->function_entry_hook() != NULL) {
4561 ProfileEntryHookStub stub(masm->isolate()); 4557 ProfileEntryHookStub stub(masm->isolate());
4562 __ push(ra); 4558 __ push(ra);
4563 __ CallStub(&stub); 4559 __ CallStub(&stub);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
5045 MemOperand(fp, 6 * kPointerSize), 5041 MemOperand(fp, 6 * kPointerSize),
5046 NULL); 5042 NULL);
5047 } 5043 }
5048 5044
5049 5045
5050 #undef __ 5046 #undef __
5051 5047
5052 } } // namespace v8::internal 5048 } } // namespace v8::internal
5053 5049
5054 #endif // V8_TARGET_ARCH_MIPS 5050 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | src/mips/debug-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698