| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // Swap in the global receiver. | 234 // Swap in the global receiver. |
| 235 __ movp(scratch, | 235 __ movp(scratch, |
| 236 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 236 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 237 receiver = scratch; | 237 receiver = scratch; |
| 238 } | 238 } |
| 239 __ Push(receiver); | 239 __ Push(receiver); |
| 240 __ Push(value()); | 240 __ Push(value()); |
| 241 ParameterCount actual(1); | 241 ParameterCount actual(1); |
| 242 ParameterCount expected(expected_arguments); | 242 ParameterCount expected(expected_arguments); |
| 243 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_SETTER); | 243 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_SETTER); |
| 244 __ InvokeFunction(rdi, expected, actual, CALL_FUNCTION, | 244 __ InvokeFunction(rdi, no_reg, expected, actual, CALL_FUNCTION, |
| 245 NullCallWrapper()); | 245 NullCallWrapper()); |
| 246 } else { | 246 } else { |
| 247 // If we generate a global code snippet for deoptimization only, remember | 247 // If we generate a global code snippet for deoptimization only, remember |
| 248 // the place to continue after deoptimization. | 248 // the place to continue after deoptimization. |
| 249 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 249 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
| 250 } | 250 } |
| 251 | 251 |
| 252 // We have to return the passed value, not the return value of the setter. | 252 // We have to return the passed value, not the return value of the setter. |
| 253 __ Pop(rax); | 253 __ Pop(rax); |
| 254 | 254 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 277 if (map->IsJSGlobalObjectMap()) { | 277 if (map->IsJSGlobalObjectMap()) { |
| 278 // Swap in the global receiver. | 278 // Swap in the global receiver. |
| 279 __ movp(scratch, | 279 __ movp(scratch, |
| 280 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); | 280 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 281 receiver = scratch; | 281 receiver = scratch; |
| 282 } | 282 } |
| 283 __ Push(receiver); | 283 __ Push(receiver); |
| 284 ParameterCount actual(0); | 284 ParameterCount actual(0); |
| 285 ParameterCount expected(expected_arguments); | 285 ParameterCount expected(expected_arguments); |
| 286 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_GETTER); | 286 __ LoadAccessor(rdi, holder, accessor_index, ACCESSOR_GETTER); |
| 287 __ InvokeFunction(rdi, expected, actual, CALL_FUNCTION, | 287 __ InvokeFunction(rdi, no_reg, expected, actual, CALL_FUNCTION, |
| 288 NullCallWrapper()); | 288 NullCallWrapper()); |
| 289 } else { | 289 } else { |
| 290 // If we generate a global code snippet for deoptimization only, remember | 290 // If we generate a global code snippet for deoptimization only, remember |
| 291 // the place to continue after deoptimization. | 291 // the place to continue after deoptimization. |
| 292 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 292 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| 293 } | 293 } |
| 294 | 294 |
| 295 // Restore context register. | 295 // Restore context register. |
| 296 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 296 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 297 } | 297 } |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 // Return the generated code. | 800 // Return the generated code. |
| 801 return GetCode(kind(), Code::NORMAL, name); | 801 return GetCode(kind(), Code::NORMAL, name); |
| 802 } | 802 } |
| 803 | 803 |
| 804 | 804 |
| 805 #undef __ | 805 #undef __ |
| 806 } // namespace internal | 806 } // namespace internal |
| 807 } // namespace v8 | 807 } // namespace v8 |
| 808 | 808 |
| 809 #endif // V8_TARGET_ARCH_X64 | 809 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |