• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #if V8_TARGET_ARCH_X64
6 
7 #include "src/ic/ic.h"
8 #include "src/ic/ic-compiler.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 #define __ ACCESS_MASM(masm)
14 
15 
GenerateRuntimeSetProperty(MacroAssembler * masm,LanguageMode language_mode)16 void PropertyICCompiler::GenerateRuntimeSetProperty(
17     MacroAssembler* masm, LanguageMode language_mode) {
18   // Return address is on the stack.
19   DCHECK(!rbx.is(StoreDescriptor::ReceiverRegister()) &&
20          !rbx.is(StoreDescriptor::NameRegister()) &&
21          !rbx.is(StoreDescriptor::ValueRegister()));
22 
23   __ PopReturnAddressTo(rbx);
24   __ Push(StoreDescriptor::ReceiverRegister());
25   __ Push(StoreDescriptor::NameRegister());
26   __ Push(StoreDescriptor::ValueRegister());
27   __ Push(Smi::FromInt(language_mode));
28   __ PushReturnAddressFrom(rbx);
29 
30   // Do tail-call to runtime routine.
31   __ TailCallRuntime(Runtime::kSetProperty);
32 }
33 
34 
35 #undef __
36 }  // namespace internal
37 }  // namespace v8
38 
39 #endif  // V8_TARGET_ARCH_X64
40