• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 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_UNARY_OP_ASSEMBLER_H_
6 #define V8_IC_UNARY_OP_ASSEMBLER_H_
7 
8 #include "src/codegen/code-stub-assembler.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 namespace compiler {
14 class CodeAssemblerState;
15 }  // namespace compiler
16 
17 class UnaryOpAssembler final {
18  public:
UnaryOpAssembler(compiler::CodeAssemblerState * state)19   explicit UnaryOpAssembler(compiler::CodeAssemblerState* state)
20       : state_(state) {}
21 
22   TNode<Object> Generate_BitwiseNotWithFeedback(
23       TNode<Context> context, TNode<Object> value, TNode<UintPtrT> slot,
24       TNode<HeapObject> maybe_feedback_vector,
25       UpdateFeedbackMode update_feedback_mode);
26 
27   TNode<Object> Generate_DecrementWithFeedback(
28       TNode<Context> context, TNode<Object> value, TNode<UintPtrT> slot,
29       TNode<HeapObject> maybe_feedback_vector,
30       UpdateFeedbackMode update_feedback_mode);
31 
32   TNode<Object> Generate_IncrementWithFeedback(
33       TNode<Context> context, TNode<Object> value, TNode<UintPtrT> slot,
34       TNode<HeapObject> maybe_feedback_vector,
35       UpdateFeedbackMode update_feedback_mode);
36 
37   TNode<Object> Generate_NegateWithFeedback(
38       TNode<Context> context, TNode<Object> value, TNode<UintPtrT> slot,
39       TNode<HeapObject> maybe_feedback_vector,
40       UpdateFeedbackMode update_feedback_mode);
41 
42  private:
43   compiler::CodeAssemblerState* const state_;
44 };
45 
46 }  // namespace internal
47 }  // namespace v8
48 
49 #endif  // V8_IC_UNARY_OP_ASSEMBLER_H_
50