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

Side by Side Diff: src/mips64/code-stubs-mips64.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/mips/lithium-mips.cc ('k') | src/mips64/debug-mips64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
11 #include "src/codegen.h" 11 #include "src/codegen.h"
12 #include "src/ic/handler-compiler.h" 12 #include "src/ic/handler-compiler.h"
13 #include "src/isolate.h" 13 #include "src/isolate.h"
14 #include "src/jsregexp.h" 14 #include "src/jsregexp.h"
15 #include "src/regexp-macro-assembler.h" 15 #include "src/regexp-macro-assembler.h"
16 #include "src/runtime.h" 16 #include "src/runtime.h"
17 17
18 namespace v8 { 18 namespace v8 {
19 namespace internal { 19 namespace internal {
20 20
21 21
22 static void InitializeArrayConstructorDescriptor( 22 static void InitializeArrayConstructorDescriptor(
23 Isolate* isolate, CodeStub::Major major, 23 Isolate* isolate, CodeStub::Major major,
24 CodeStubInterfaceDescriptor* descriptor, 24 CodeStubInterfaceDescriptor* descriptor,
25 int constant_stack_parameter_count) { 25 int constant_stack_parameter_count) {
26 Address deopt_handler = Runtime::FunctionForId( 26 Address deopt_handler = Runtime::FunctionForId(
27 Runtime::kArrayConstructor)->entry; 27 Runtime::kArrayConstructor)->entry;
28 28
29 if (constant_stack_parameter_count == 0) { 29 if (constant_stack_parameter_count == 0) {
30 CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( 30 ArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
31 CallDescriptorKey::ArrayConstructorConstantArgCountCall);
32 descriptor->Initialize(major, call_descriptor, deopt_handler, 31 descriptor->Initialize(major, call_descriptor, deopt_handler,
33 constant_stack_parameter_count, 32 constant_stack_parameter_count,
34 JS_FUNCTION_STUB_MODE); 33 JS_FUNCTION_STUB_MODE);
35 } else { 34 } else {
36 CallInterfaceDescriptor* call_descriptor = 35 ArrayConstructorDescriptor call_descriptor(isolate);
37 isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall);
38 descriptor->Initialize(major, call_descriptor, a0, deopt_handler, 36 descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
39 constant_stack_parameter_count, 37 constant_stack_parameter_count,
40 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); 38 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
41 } 39 }
42 } 40 }
43 41
44 42
45 static void InitializeInternalArrayConstructorDescriptor( 43 static void InitializeInternalArrayConstructorDescriptor(
46 Isolate* isolate, CodeStub::Major major, 44 Isolate* isolate, CodeStub::Major major,
47 CodeStubInterfaceDescriptor* descriptor, 45 CodeStubInterfaceDescriptor* descriptor,
48 int constant_stack_parameter_count) { 46 int constant_stack_parameter_count) {
49 Address deopt_handler = Runtime::FunctionForId( 47 Address deopt_handler = Runtime::FunctionForId(
50 Runtime::kInternalArrayConstructor)->entry; 48 Runtime::kInternalArrayConstructor)->entry;
51 49
52 if (constant_stack_parameter_count == 0) { 50 if (constant_stack_parameter_count == 0) {
53 CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( 51 InternalArrayConstructorConstantArgCountDescriptor call_descriptor(isolate);
54 CallDescriptorKey::InternalArrayConstructorConstantArgCountCall);
55 descriptor->Initialize(major, call_descriptor, deopt_handler, 52 descriptor->Initialize(major, call_descriptor, deopt_handler,
56 constant_stack_parameter_count, 53 constant_stack_parameter_count,
57 JS_FUNCTION_STUB_MODE); 54 JS_FUNCTION_STUB_MODE);
58 } else { 55 } else {
59 CallInterfaceDescriptor* call_descriptor = isolate->call_descriptor( 56 InternalArrayConstructorDescriptor call_descriptor(isolate);
60 CallDescriptorKey::InternalArrayConstructorCall);
61 descriptor->Initialize(major, call_descriptor, a0, deopt_handler, 57 descriptor->Initialize(major, call_descriptor, a0, deopt_handler,
62 constant_stack_parameter_count, 58 constant_stack_parameter_count,
63 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); 59 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
64 } 60 }
65 } 61 }
66 62
67 63
68 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 64 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
69 CodeStubInterfaceDescriptor* descriptor) { 65 CodeStubInterfaceDescriptor* descriptor) {
70 InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0); 66 InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0);
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 __ LoadRoot(v0, Heap::kTrueValueRootIndex); 1701 __ LoadRoot(v0, Heap::kTrueValueRootIndex);
1706 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg)); 1702 __ DropAndRet(HasArgsInRegisters() ? 0 : 2, eq, a0, Operand(zero_reg));
1707 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 1703 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
1708 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); 1704 __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
1709 } 1705 }
1710 } 1706 }
1711 1707
1712 1708
1713 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1709 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1714 Label miss; 1710 Label miss;
1715 Register receiver = LoadConvention::ReceiverRegister(); 1711 Register receiver = LoadDescriptor::ReceiverRegister();
1716 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3, 1712 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
1717 a4, &miss); 1713 a4, &miss);
1718 __ bind(&miss); 1714 __ bind(&miss);
1719 PropertyAccessCompiler::TailCallBuiltin( 1715 PropertyAccessCompiler::TailCallBuiltin(
1720 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1716 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1721 } 1717 }
1722 1718
1723 1719
1724 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 1720 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
1725 // The displacement is the offset of the last parameter (if any) 1721 // The displacement is the offset of the last parameter (if any)
(...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after
4572 __ Daddu(a1, a1, Operand(1)); 4568 __ Daddu(a1, a1, Operand(1));
4573 } 4569 }
4574 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 4570 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
4575 __ dsll(a1, a1, kPointerSizeLog2); 4571 __ dsll(a1, a1, kPointerSizeLog2);
4576 __ Ret(USE_DELAY_SLOT); 4572 __ Ret(USE_DELAY_SLOT);
4577 __ Daddu(sp, sp, a1); 4573 __ Daddu(sp, sp, a1);
4578 } 4574 }
4579 4575
4580 4576
4581 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { 4577 void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
4582 EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); 4578 EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
4583 VectorLoadStub stub(isolate(), state()); 4579 VectorLoadStub stub(isolate(), state());
4584 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 4580 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
4585 } 4581 }
4586 4582
4587 4583
4588 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { 4584 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
4589 EmitLoadTypeFeedbackVector(masm, FullVectorLoadConvention::VectorRegister()); 4585 EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister());
4590 VectorKeyedLoadStub stub(isolate()); 4586 VectorKeyedLoadStub stub(isolate());
4591 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 4587 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
4592 } 4588 }
4593 4589
4594 4590
4595 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 4591 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
4596 if (masm->isolate()->function_entry_hook() != NULL) { 4592 if (masm->isolate()->function_entry_hook() != NULL) {
4597 ProfileEntryHookStub stub(masm->isolate()); 4593 ProfileEntryHookStub stub(masm->isolate());
4598 __ push(ra); 4594 __ push(ra);
4599 __ CallStub(&stub); 4595 __ CallStub(&stub);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
5081 MemOperand(fp, 6 * kPointerSize), 5077 MemOperand(fp, 6 * kPointerSize),
5082 NULL); 5078 NULL);
5083 } 5079 }
5084 5080
5085 5081
5086 #undef __ 5082 #undef __
5087 5083
5088 } } // namespace v8::internal 5084 } } // namespace v8::internal
5089 5085
5090 #endif // V8_TARGET_ARCH_MIPS64 5086 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/debug-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698