Line data Source code
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:
15 : explicit ConstructorBuiltinsAssembler(compiler::CodeAssemblerState* state)
16 1462 : : CodeStubAssembler(state) {}
17 :
18 : Node* EmitFastNewClosure(Node* shared_info, Node* feedback_vector, Node* slot,
19 : Node* context);
20 : Node* EmitFastNewFunctionContext(Node* closure, Node* slots, Node* context,
21 : ScopeType scope_type);
22 :
23 : Node* EmitFastCloneRegExp(Node* closure, Node* literal_index, Node* pattern,
24 : Node* flags, Node* context);
25 : Node* EmitFastCloneShallowArray(Node* closure, Node* literal_index,
26 : Node* context, Label* call_runtime,
27 : AllocationSiteMode allocation_site_mode);
28 :
29 : void CreateFastCloneShallowArrayBuiltin(
30 : AllocationSiteMode allocation_site_mode);
31 :
32 : Node* EmitFastCloneShallowObject(Label* call_runtime, Node* closure,
33 : Node* literals_index,
34 : Node* properties_count);
35 :
36 : template <typename Descriptor>
37 : void CreateFastCloneShallowObjectBuiltin(int properties_count);
38 :
39 : Node* EmitFastNewObject(Node* context, Node* target, Node* new_target);
40 :
41 : Node* EmitFastNewObject(Node* context, Node* target, Node* new_target,
42 : Label* call_runtime);
43 :
44 : private:
45 : Node* NonEmptyShallowClone(Node* boilerplate, Node* boilerplate_map,
46 : Node* boilerplate_elements, Node* allocation_site,
47 : Node* capacity, ElementsKind kind);
48 : };
49 :
50 : } // namespace internal
51 : } // namespace v8
52 :
53 : #endif // V8_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_
|