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/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 __ movp(scratch, | 242 __ movp(scratch, |
243 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 243 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
244 receiver = scratch; | 244 receiver = scratch; |
245 } | 245 } |
246 __ Push(receiver); | 246 __ Push(receiver); |
247 __ Push(value()); | 247 __ Push(value()); |
248 ParameterCount actual(1); | 248 ParameterCount actual(1); |
249 ParameterCount expected(expected_arguments); | 249 ParameterCount expected(expected_arguments); |
250 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_SETTER); | 250 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_SETTER); |
251 __ InvokeFunction(rdi, no_reg, expected, actual, CALL_FUNCTION, | 251 __ InvokeFunction(rdi, no_reg, expected, actual, CALL_FUNCTION, |
252 NullCallWrapper()); | 252 CheckDebugStepCallWrapper()); |
253 } else { | 253 } else { |
254 // If we generate a global code snippet for deoptimization only, remember | 254 // If we generate a global code snippet for deoptimization only, remember |
255 // the place to continue after deoptimization. | 255 // the place to continue after deoptimization. |
256 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 256 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
257 } | 257 } |
258 | 258 |
259 // We have to return the passed value, not the return value of the setter. | 259 // We have to return the passed value, not the return value of the setter. |
260 __ Pop(rax); | 260 __ Pop(rax); |
261 | 261 |
262 // Restore context register. | 262 // Restore context register. |
(...skipping 22 matching lines...) Expand all Loading... |
285 // Swap in the global receiver. | 285 // Swap in the global receiver. |
286 __ movp(scratch, | 286 __ movp(scratch, |
287 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 287 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
288 receiver = scratch; | 288 receiver = scratch; |
289 } | 289 } |
290 __ Push(receiver); | 290 __ Push(receiver); |
291 ParameterCount actual(0); | 291 ParameterCount actual(0); |
292 ParameterCount expected(expected_arguments); | 292 ParameterCount expected(expected_arguments); |
293 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_GETTER); | 293 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_GETTER); |
294 __ InvokeFunction(rdi, no_reg, expected, actual, CALL_FUNCTION, | 294 __ InvokeFunction(rdi, no_reg, expected, actual, CALL_FUNCTION, |
295 NullCallWrapper()); | 295 CheckDebugStepCallWrapper()); |
296 } else { | 296 } else { |
297 // If we generate a global code snippet for deoptimization only, remember | 297 // If we generate a global code snippet for deoptimization only, remember |
298 // the place to continue after deoptimization. | 298 // the place to continue after deoptimization. |
299 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 299 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
300 } | 300 } |
301 | 301 |
302 // Restore context register. | 302 // Restore context register. |
303 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 303 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
304 } | 304 } |
305 __ ret(0); | 305 __ ret(0); |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 // Return the generated code. | 807 // Return the generated code. |
808 return GetCode(kind(), Code::NORMAL, name); | 808 return GetCode(kind(), Code::NORMAL, name); |
809 } | 809 } |
810 | 810 |
811 | 811 |
812 #undef __ | 812 #undef __ |
813 } // namespace internal | 813 } // namespace internal |
814 } // namespace v8 | 814 } // namespace v8 |
815 | 815 |
816 #endif // V8_TARGET_ARCH_X64 | 816 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |