OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( | 127 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( |
128 Isolate* isolate, | 128 Isolate* isolate, |
129 CodeStubInterfaceDescriptor* descriptor) { | 129 CodeStubInterfaceDescriptor* descriptor) { |
130 static Register registers[] = { a1 }; | 130 static Register registers[] = { a1 }; |
131 descriptor->register_param_count_ = 1; | 131 descriptor->register_param_count_ = 1; |
132 descriptor->register_params_ = registers; | 132 descriptor->register_params_ = registers; |
133 descriptor->deoptimization_handler_ = NULL; | 133 descriptor->deoptimization_handler_ = NULL; |
134 } | 134 } |
135 | 135 |
136 | 136 |
| 137 void KeyedArrayCallStub::InitializeInterfaceDescriptor( |
| 138 Isolate* isolate, |
| 139 CodeStubInterfaceDescriptor* descriptor) { |
| 140 static Register registers[] = { a2 }; |
| 141 descriptor->register_param_count_ = 1; |
| 142 descriptor->register_params_ = registers; |
| 143 descriptor->continuation_type_ = TAIL_CALL_CONTINUATION; |
| 144 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 145 descriptor->deoptimization_handler_ = |
| 146 FUNCTION_ADDR(KeyedCallIC_MissFromStubFailure); |
| 147 } |
| 148 |
| 149 |
137 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( | 150 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( |
138 Isolate* isolate, | 151 Isolate* isolate, |
139 CodeStubInterfaceDescriptor* descriptor) { | 152 CodeStubInterfaceDescriptor* descriptor) { |
140 static Register registers[] = { a2, a1, a0 }; | 153 static Register registers[] = { a2, a1, a0 }; |
141 descriptor->register_param_count_ = 3; | 154 descriptor->register_param_count_ = 3; |
142 descriptor->register_params_ = registers; | 155 descriptor->register_params_ = registers; |
143 descriptor->deoptimization_handler_ = | 156 descriptor->deoptimization_handler_ = |
144 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); | 157 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); |
145 } | 158 } |
146 | 159 |
(...skipping 5700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5847 if (function_mode_ == JS_FUNCTION_STUB_MODE) { | 5860 if (function_mode_ == JS_FUNCTION_STUB_MODE) { |
5848 __ Addu(a1, a1, Operand(1)); | 5861 __ Addu(a1, a1, Operand(1)); |
5849 } | 5862 } |
5850 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 5863 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
5851 __ sll(a1, a1, kPointerSizeLog2); | 5864 __ sll(a1, a1, kPointerSizeLog2); |
5852 __ Ret(USE_DELAY_SLOT); | 5865 __ Ret(USE_DELAY_SLOT); |
5853 __ Addu(sp, sp, a1); | 5866 __ Addu(sp, sp, a1); |
5854 } | 5867 } |
5855 | 5868 |
5856 | 5869 |
| 5870 void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) { |
| 5871 CEntryStub ces(1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); |
| 5872 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
| 5873 __ mov(a1, v0); |
| 5874 int parameter_count_offset = |
| 5875 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 5876 __ lw(a0, MemOperand(fp, parameter_count_offset)); |
| 5877 // The parameter count above includes the receiver for the arguments passed to |
| 5878 // the deoptimization handler. Subtract the receiver for the parameter count |
| 5879 // for the call. |
| 5880 __ Subu(a0, a0, 1); |
| 5881 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 5882 ParameterCount argument_count(a0); |
| 5883 __ InvokeFunction( |
| 5884 a1, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); |
| 5885 } |
| 5886 |
| 5887 |
5857 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 5888 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
5858 if (masm->isolate()->function_entry_hook() != NULL) { | 5889 if (masm->isolate()->function_entry_hook() != NULL) { |
5859 AllowStubCallsScope allow_stub_calls(masm, true); | 5890 AllowStubCallsScope allow_stub_calls(masm, true); |
5860 ProfileEntryHookStub stub; | 5891 ProfileEntryHookStub stub; |
5861 __ push(ra); | 5892 __ push(ra); |
5862 __ CallStub(&stub); | 5893 __ CallStub(&stub); |
5863 __ pop(ra); | 5894 __ pop(ra); |
5864 } | 5895 } |
5865 } | 5896 } |
5866 | 5897 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6244 __ bind(&fast_elements_case); | 6275 __ bind(&fast_elements_case); |
6245 GenerateCase(masm, FAST_ELEMENTS); | 6276 GenerateCase(masm, FAST_ELEMENTS); |
6246 } | 6277 } |
6247 | 6278 |
6248 | 6279 |
6249 #undef __ | 6280 #undef __ |
6250 | 6281 |
6251 } } // namespace v8::internal | 6282 } } // namespace v8::internal |
6252 | 6283 |
6253 #endif // V8_TARGET_ARCH_MIPS | 6284 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |