OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 __ Push(receiver); | 135 __ Push(receiver); |
136 // Write the arguments to stack frame. | 136 // Write the arguments to stack frame. |
137 if (is_store) { | 137 if (is_store) { |
138 DCHECK(!receiver.is(store_parameter)); | 138 DCHECK(!receiver.is(store_parameter)); |
139 DCHECK(!scratch.is(store_parameter)); | 139 DCHECK(!scratch.is(store_parameter)); |
140 __ Push(store_parameter); | 140 __ Push(store_parameter); |
141 } | 141 } |
142 __ PushReturnAddressFrom(scratch); | 142 __ PushReturnAddressFrom(scratch); |
143 // Stack now matches JSFunction abi. | 143 // Stack now matches JSFunction abi. |
144 | 144 |
145 // Abi for CallApiFunctionStub. | 145 // Abi for CallApiCallbackStub. |
146 Register callee = rdi; | 146 Register callee = rdi; |
147 Register data = rbx; | 147 Register data = rbx; |
148 Register holder = rcx; | 148 Register holder = rcx; |
149 Register api_function_address = rdx; | 149 Register api_function_address = rdx; |
150 scratch = no_reg; | 150 scratch = no_reg; |
151 | 151 |
152 // Put callee in place. | 152 // Put callee in place. |
153 __ LoadAccessor(callee, accessor_holder, accessor_index, | 153 __ LoadAccessor(callee, accessor_holder, accessor_index, |
154 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); | 154 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); |
155 | 155 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 RelocInfo::CODE_TARGET); | 202 RelocInfo::CODE_TARGET); |
203 return; | 203 return; |
204 } | 204 } |
205 | 205 |
206 // Put api_function_address in place. | 206 // Put api_function_address in place. |
207 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 207 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
208 __ Move(api_function_address, function_address, | 208 __ Move(api_function_address, function_address, |
209 RelocInfo::EXTERNAL_REFERENCE); | 209 RelocInfo::EXTERNAL_REFERENCE); |
210 | 210 |
211 // Jump to stub. | 211 // Jump to stub. |
212 CallApiAccessorStub stub(isolate, is_store, call_data_undefined, | 212 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, |
213 !optimization.is_constant_call()); | 213 !optimization.is_constant_call()); |
214 __ TailCallStub(&stub); | 214 __ TailCallStub(&stub); |
215 } | 215 } |
216 | 216 |
217 | 217 |
218 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 218 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
219 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 219 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
220 Register scratch, Label* miss) { | 220 Register scratch, Label* miss) { |
221 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 221 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); |
222 DCHECK(cell->value()->IsTheHole()); | 222 DCHECK(cell->value()->IsTheHole()); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 // Return the generated code. | 815 // Return the generated code. |
816 return GetCode(kind(), Code::NORMAL, name); | 816 return GetCode(kind(), Code::NORMAL, name); |
817 } | 817 } |
818 | 818 |
819 | 819 |
820 #undef __ | 820 #undef __ |
821 } // namespace internal | 821 } // namespace internal |
822 } // namespace v8 | 822 } // namespace v8 |
823 | 823 |
824 #endif // V8_TARGET_ARCH_X64 | 824 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |