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 | |
149 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( | 136 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( |
150 Isolate* isolate, | 137 Isolate* isolate, |
151 CodeStubInterfaceDescriptor* descriptor) { | 138 CodeStubInterfaceDescriptor* descriptor) { |
152 static Register registers[] = { r2, r1, r0 }; | 139 static Register registers[] = { r2, r1, r0 }; |
153 descriptor->register_param_count_ = 3; | 140 descriptor->register_param_count_ = 3; |
154 descriptor->register_params_ = registers; | 141 descriptor->register_params_ = registers; |
155 descriptor->deoptimization_handler_ = | 142 descriptor->deoptimization_handler_ = |
156 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); | 143 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); |
157 } | 144 } |
158 | 145 |
(...skipping 5540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5699 if (function_mode_ == JS_FUNCTION_STUB_MODE) { | 5686 if (function_mode_ == JS_FUNCTION_STUB_MODE) { |
5700 __ add(r1, r1, Operand(1)); | 5687 __ add(r1, r1, Operand(1)); |
5701 } | 5688 } |
5702 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 5689 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
5703 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); | 5690 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); |
5704 __ add(sp, sp, r1); | 5691 __ add(sp, sp, r1); |
5705 __ Ret(); | 5692 __ Ret(); |
5706 } | 5693 } |
5707 | 5694 |
5708 | 5695 |
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 | |
5727 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 5696 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
5728 if (masm->isolate()->function_entry_hook() != NULL) { | 5697 if (masm->isolate()->function_entry_hook() != NULL) { |
5729 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); | 5698 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); |
5730 AllowStubCallsScope allow_stub_calls(masm, true); | 5699 AllowStubCallsScope allow_stub_calls(masm, true); |
5731 ProfileEntryHookStub stub; | 5700 ProfileEntryHookStub stub; |
5732 __ push(lr); | 5701 __ push(lr); |
5733 __ CallStub(&stub); | 5702 __ CallStub(&stub); |
5734 __ pop(lr); | 5703 __ pop(lr); |
5735 } | 5704 } |
5736 } | 5705 } |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6121 __ bind(&fast_elements_case); | 6090 __ bind(&fast_elements_case); |
6122 GenerateCase(masm, FAST_ELEMENTS); | 6091 GenerateCase(masm, FAST_ELEMENTS); |
6123 } | 6092 } |
6124 | 6093 |
6125 | 6094 |
6126 #undef __ | 6095 #undef __ |
6127 | 6096 |
6128 } } // namespace v8::internal | 6097 } } // namespace v8::internal |
6129 | 6098 |
6130 #endif // V8_TARGET_ARCH_ARM | 6099 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |