• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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 #ifndef V8_IC_KEYED_STORE_GENERIC_H_
6 #define V8_IC_KEYED_STORE_GENERIC_H_
7 
8 #include "src/common/globals.h"
9 #include "src/compiler/code-assembler.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 class KeyedStoreGenericGenerator {
15  public:
16   static void Generate(compiler::CodeAssemblerState* state);
17 
18   // Building block for fast path of Object.assign implementation.
19   static void SetProperty(compiler::CodeAssemblerState* state,
20                           TNode<Context> context, TNode<JSReceiver> receiver,
21                           TNode<BoolT> is_simple_receiver, TNode<Name> name,
22                           TNode<Object> value, LanguageMode language_mode);
23 
24   // Same as above but more generic. I.e. the receiver can by anything and the
25   // key does not have to be unique. Essentially the same as KeyedStoreGeneric.
26   static void SetProperty(compiler::CodeAssemblerState* state,
27                           TNode<Context> context, TNode<Object> receiver,
28                           TNode<Object> key, TNode<Object> value,
29                           LanguageMode language_mode);
30 
31   static void SetPropertyInLiteral(compiler::CodeAssemblerState* state,
32                                    TNode<Context> context,
33                                    TNode<JSObject> receiver, TNode<Object> key,
34                                    TNode<Object> value);
35 };
36 
37 class StoreICNoFeedbackGenerator {
38  public:
39   static void Generate(compiler::CodeAssemblerState* state);
40 };
41 
42 }  // namespace internal
43 }  // namespace v8
44 
45 #endif  // V8_IC_KEYED_STORE_GENERIC_H_
46