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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( | 126 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( |
127 Isolate* isolate, | 127 Isolate* isolate, |
128 CodeStubInterfaceDescriptor* descriptor) { | 128 CodeStubInterfaceDescriptor* descriptor) { |
129 static Register registers[] = { r1 }; | 129 static Register registers[] = { r1 }; |
130 descriptor->register_param_count_ = 1; | 130 descriptor->register_param_count_ = 1; |
131 descriptor->register_params_ = registers; | 131 descriptor->register_params_ = registers; |
132 descriptor->deoptimization_handler_ = NULL; | 132 descriptor->deoptimization_handler_ = NULL; |
133 } | 133 } |
134 | 134 |
135 | 135 |
| 136 void KeyedArrayCallStub::InitializeInterfaceDescriptor( |
| 137 Isolate* isolate, |
| 138 CodeStubInterfaceDescriptor* descriptor) { |
| 139 static Register registers[] = { r2 }; |
| 140 descriptor->register_param_count_ = 1; |
| 141 descriptor->register_params_ = registers; |
| 142 descriptor->continuation_type_ = TAIL_CALL_CONTINUATION; |
| 143 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 144 descriptor->deoptimization_handler_ = |
| 145 FUNCTION_ADDR(KeyedCallIC_MissFromStubFailure); |
| 146 } |
| 147 |
| 148 |
136 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( | 149 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( |
137 Isolate* isolate, | 150 Isolate* isolate, |
138 CodeStubInterfaceDescriptor* descriptor) { | 151 CodeStubInterfaceDescriptor* descriptor) { |
139 static Register registers[] = { r2, r1, r0 }; | 152 static Register registers[] = { r2, r1, r0 }; |
140 descriptor->register_param_count_ = 3; | 153 descriptor->register_param_count_ = 3; |
141 descriptor->register_params_ = registers; | 154 descriptor->register_params_ = registers; |
142 descriptor->deoptimization_handler_ = | 155 descriptor->deoptimization_handler_ = |
143 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); | 156 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); |
144 } | 157 } |
145 | 158 |
(...skipping 5540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5686 if (function_mode_ == JS_FUNCTION_STUB_MODE) { | 5699 if (function_mode_ == JS_FUNCTION_STUB_MODE) { |
5687 __ add(r1, r1, Operand(1)); | 5700 __ add(r1, r1, Operand(1)); |
5688 } | 5701 } |
5689 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 5702 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
5690 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); | 5703 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); |
5691 __ add(sp, sp, r1); | 5704 __ add(sp, sp, r1); |
5692 __ Ret(); | 5705 __ Ret(); |
5693 } | 5706 } |
5694 | 5707 |
5695 | 5708 |
| 5709 void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) { |
| 5710 CEntryStub ces(1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); |
| 5711 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
| 5712 __ mov(r1, r0); |
| 5713 int parameter_count_offset = |
| 5714 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 5715 __ ldr(r0, MemOperand(fp, parameter_count_offset)); |
| 5716 // The parameter count above includes the receiver for the arguments passed to |
| 5717 // the deoptimization handler. Subtract the receiver for the parameter count |
| 5718 // for the call. |
| 5719 __ sub(r0, r0, Operand(1)); |
| 5720 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 5721 ParameterCount argument_count(r0); |
| 5722 __ InvokeFunction( |
| 5723 r1, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); |
| 5724 } |
| 5725 |
| 5726 |
5696 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 5727 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
5697 if (masm->isolate()->function_entry_hook() != NULL) { | 5728 if (masm->isolate()->function_entry_hook() != NULL) { |
5698 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); | 5729 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); |
5699 AllowStubCallsScope allow_stub_calls(masm, true); | 5730 AllowStubCallsScope allow_stub_calls(masm, true); |
5700 ProfileEntryHookStub stub; | 5731 ProfileEntryHookStub stub; |
5701 __ push(lr); | 5732 __ push(lr); |
5702 __ CallStub(&stub); | 5733 __ CallStub(&stub); |
5703 __ pop(lr); | 5734 __ pop(lr); |
5704 } | 5735 } |
5705 } | 5736 } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6086 __ bind(&fast_elements_case); | 6117 __ bind(&fast_elements_case); |
6087 GenerateCase(masm, FAST_ELEMENTS); | 6118 GenerateCase(masm, FAST_ELEMENTS); |
6088 } | 6119 } |
6089 | 6120 |
6090 | 6121 |
6091 #undef __ | 6122 #undef __ |
6092 | 6123 |
6093 } } // namespace v8::internal | 6124 } } // namespace v8::internal |
6094 | 6125 |
6095 #endif // V8_TARGET_ARCH_ARM | 6126 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |