• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 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_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_
6 #define V8_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_
7 
8 #include "src/code-stub-assembler.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 class ConstructorBuiltinsAssembler : public CodeStubAssembler {
14  public:
ConstructorBuiltinsAssembler(compiler::CodeAssemblerState * state)15   explicit ConstructorBuiltinsAssembler(compiler::CodeAssemblerState* state)
16       : CodeStubAssembler(state) {}
17 
18   Node* EmitFastNewFunctionContext(Node* closure, Node* slots, Node* context,
19                                    ScopeType scope_type);
20 
21   Node* EmitCreateRegExpLiteral(Node* feedback_vector, Node* slot,
22                                 Node* pattern, Node* flags, Node* context);
23   Node* EmitCreateShallowArrayLiteral(Node* feedback_vector, Node* slot,
24                                       Node* context, Label* call_runtime,
25                                       AllocationSiteMode allocation_site_mode);
26 
27   Node* EmitCreateEmptyArrayLiteral(Node* feedback_vector, Node* slot,
28                                     Node* context);
29 
30   Node* EmitCreateShallowObjectLiteral(Node* feedback_vector, Node* slot,
31                                        Label* call_runtime);
32   Node* EmitCreateEmptyObjectLiteral(Node* context);
33 
34   Node* EmitFastNewObject(Node* context, Node* target, Node* new_target);
35 
36   Node* EmitFastNewObject(Node* context, Node* target, Node* new_target,
37                           Label* call_runtime);
38 };
39 
40 }  // namespace internal
41 }  // namespace v8
42 
43 #endif  // V8_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_
44