OLD | NEW |
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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
8 | 8 |
9 #include "src/field-type.h" | 9 #include "src/field-type.h" |
10 #include "src/ic/call-optimization.h" | 10 #include "src/ic/call-optimization.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // Write the arguments to stack frame. | 151 // Write the arguments to stack frame. |
152 if (is_store) { | 152 if (is_store) { |
153 DCHECK(!receiver.is(store_parameter)); | 153 DCHECK(!receiver.is(store_parameter)); |
154 DCHECK(!scratch.is(store_parameter)); | 154 DCHECK(!scratch.is(store_parameter)); |
155 __ push(store_parameter); | 155 __ push(store_parameter); |
156 } | 156 } |
157 __ push(scratch); | 157 __ push(scratch); |
158 // Stack now matches JSFunction abi. | 158 // Stack now matches JSFunction abi. |
159 DCHECK(optimization.is_simple_api_call()); | 159 DCHECK(optimization.is_simple_api_call()); |
160 | 160 |
161 // Abi for CallApiCallbackStub. | 161 // Abi for CallApiFunctionStub. |
162 Register callee = edi; | 162 Register callee = edi; |
163 Register data = ebx; | 163 Register data = ebx; |
164 Register holder = ecx; | 164 Register holder = ecx; |
165 Register api_function_address = edx; | 165 Register api_function_address = edx; |
166 scratch = no_reg; | 166 scratch = no_reg; |
167 | 167 |
168 // Put callee in place. | 168 // Put callee in place. |
169 __ LoadAccessor(callee, accessor_holder, accessor_index, | 169 __ LoadAccessor(callee, accessor_holder, accessor_index, |
170 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); | 170 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); |
171 | 171 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // Just tail call into the code. | 213 // Just tail call into the code. |
214 __ Jump(handle(Code::cast(api_call_info->fast_handler())), | 214 __ Jump(handle(Code::cast(api_call_info->fast_handler())), |
215 RelocInfo::CODE_TARGET); | 215 RelocInfo::CODE_TARGET); |
216 return; | 216 return; |
217 } | 217 } |
218 // Put api_function_address in place. | 218 // Put api_function_address in place. |
219 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 219 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
220 __ mov(api_function_address, Immediate(function_address)); | 220 __ mov(api_function_address, Immediate(function_address)); |
221 | 221 |
222 // Jump to stub. | 222 // Jump to stub. |
223 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, | 223 CallApiAccessorStub stub(isolate, is_store, call_data_undefined, |
224 !optimization.is_constant_call()); | 224 !optimization.is_constant_call()); |
225 __ TailCallStub(&stub); | 225 __ TailCallStub(&stub); |
226 } | 226 } |
227 | 227 |
228 | 228 |
229 // Generate code to check that a global property cell is empty. Create | 229 // Generate code to check that a global property cell is empty. Create |
230 // the property cell at compilation time if no cell exists for the | 230 // the property cell at compilation time if no cell exists for the |
231 // property. | 231 // property. |
232 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 232 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
233 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 233 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 // Return the generated code. | 814 // Return the generated code. |
815 return GetCode(kind(), Code::NORMAL, name); | 815 return GetCode(kind(), Code::NORMAL, name); |
816 } | 816 } |
817 | 817 |
818 | 818 |
819 #undef __ | 819 #undef __ |
820 } // namespace internal | 820 } // namespace internal |
821 } // namespace v8 | 821 } // namespace v8 |
822 | 822 |
823 #endif // V8_TARGET_ARCH_X87 | 823 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |