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