builtins-constructor-gen.h 2.37 KB
Newer Older
1 2 3 4 5 6 7
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_
#define V8_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_

8
#include "src/codegen/code-stub-assembler.h"
9 10 11 12 13 14 15 16 17

namespace v8 {
namespace internal {

class ConstructorBuiltinsAssembler : public CodeStubAssembler {
 public:
  explicit ConstructorBuiltinsAssembler(compiler::CodeAssemblerState* state)
      : CodeStubAssembler(state) {}

18 19 20 21
  TNode<Context> FastNewFunctionContext(TNode<ScopeInfo> scope_info,
                                        TNode<Uint32T> slots,
                                        TNode<Context> context,
                                        ScopeType scope_type);
22

23 24 25 26
  TNode<JSRegExp> CreateRegExpLiteral(TNode<HeapObject> maybe_feedback_vector,
                                      TNode<TaggedIndex> slot,
                                      TNode<Object> pattern, TNode<Smi> flags,
                                      TNode<Context> context);
27

28
  TNode<JSArray> CreateShallowArrayLiteral(
29
      TNode<FeedbackVector> feedback_vector, TNode<TaggedIndex> slot,
30 31
      TNode<Context> context, AllocationSiteMode allocation_site_mode,
      Label* call_runtime);
32

33 34 35
  TNode<JSArray> CreateEmptyArrayLiteral(TNode<FeedbackVector> feedback_vector,
                                         TNode<TaggedIndex> slot,
                                         TNode<Context> context);
36

37
  TNode<HeapObject> CreateShallowObjectLiteral(
38
      TNode<FeedbackVector> feedback_vector, TNode<TaggedIndex> slot,
39
      Label* call_runtime);
40
  TNode<JSObject> CreateEmptyObjectLiteral(TNode<Context> context);
41

42 43 44
  TNode<JSObject> FastNewObject(TNode<Context> context,
                                TNode<JSFunction> target,
                                TNode<JSReceiver> new_target);
45

46 47 48 49
  TNode<JSObject> FastNewObject(TNode<Context> context,
                                TNode<JSFunction> target,
                                TNode<JSReceiver> new_target,
                                Label* call_runtime);
50 51 52 53

  void CopyMutableHeapNumbersInObject(TNode<HeapObject> copy,
                                      TNode<IntPtrT> start_offset,
                                      TNode<IntPtrT> instance_size);
54 55 56 57 58 59
};

}  // namespace internal
}  // namespace v8

#endif  // V8_BUILTINS_BUILTINS_CONSTRUCTOR_GEN_H_