v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
builtins-call-gen.h
Go to the documentation of this file.
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_CALL_GEN_H_
6#define V8_BUILTINS_BUILTINS_CALL_GEN_H_
7
8#include <optional>
9
11
12namespace v8 {
13namespace internal {
14
16 public:
19
21 std::optional<TNode<Object>> new_target,
22 TNode<Object> arguments_list,
23 TNode<Context> context);
25 std::optional<TNode<Object>> new_target,
27 TNode<Int32T> length,
28 TNode<Int32T> args_count,
31 std::optional<TNode<Object>> new_target,
32 TNode<JSAny> spread, TNode<Int32T> args_count,
33 TNode<Context> context);
34
35 template <class Descriptor>
36 void CallReceiver(Builtin id, std::optional<TNode<JSAny>> = std::nullopt);
37 template <class Descriptor>
39 std::optional<TNode<JSAny>> = std::nullopt);
40
41 enum class CallFunctionTemplateMode : uint8_t {
42 // This version is for using from IC system and generic builtins like
43 // HandleApiCallOrConstruct. It does both access and receiver compatibility
44 // checks if necessary and uses CallApiCallbackGeneric for calling Api
45 // function in order to support side-effects checking and make the Api
46 // function show up in the stack trace in case of exception.
48
49 // These versions are used for generating calls from optimized code with
50 // respective checks and use CallApiCallbackOptimized for calling Api
51 // function.
55 };
56 constexpr static bool IsAccessCheckRequired(CallFunctionTemplateMode mode);
57
59 TNode<FunctionTemplateInfo> function_template_info,
60 TNode<Int32T> argc, TNode<Context> context,
61 TNode<Object> maybe_incumbent_context);
62
63 void BuildConstruct(
65 const LazyNode<Context>& context,
66 const LazyNode<Union<Undefined, FeedbackVector>>& feedback_vector,
68
71 TNode<Int32T> argc, const LazyNode<Context>& context,
72 const LazyNode<Union<Undefined, FeedbackVector>>& feedback_vector,
74
77 const LazyNode<Context>& context,
78 const LazyNode<Union<Undefined, FeedbackVector>>& feedback_vector,
80
82 TNode<HeapObject> signature,
83 TNode<Context> context);
84};
85
86} // namespace internal
87} // namespace v8
88
89#endif // V8_BUILTINS_BUILTINS_CALL_GEN_H_
Builtins::Kind kind
Definition builtins.cc:40
void CallOrConstructDoubleVarargs(TNode< JSAny > target, std::optional< TNode< Object > > new_target, TNode< FixedDoubleArray > elements, TNode< Int32T > length, TNode< Int32T > args_count, TNode< Context > context, TNode< Int32T > kind)
void BuildConstructForwardAllArgs(TNode< JSAny > target, TNode< JSAny > new_target, const LazyNode< Context > &context, const LazyNode< Union< Undefined, FeedbackVector > > &feedback_vector, TNode< TaggedIndex > slot)
void CallFunctionTemplate(CallFunctionTemplateMode mode, TNode< FunctionTemplateInfo > function_template_info, TNode< Int32T > argc, TNode< Context > context, TNode< Object > maybe_incumbent_context)
TNode< JSReceiver > GetCompatibleReceiver(TNode< JSReceiver > receiver, TNode< HeapObject > signature, TNode< Context > context)
static constexpr bool IsAccessCheckRequired(CallFunctionTemplateMode mode)
void BuildConstructWithSpread(TNode< JSAny > target, TNode< JSAny > new_target, TNode< JSAny > spread, TNode< Int32T > argc, const LazyNode< Context > &context, const LazyNode< Union< Undefined, FeedbackVector > > &feedback_vector, TNode< TaggedIndex > slot, UpdateFeedbackMode mode)
void BuildConstruct(TNode< JSAny > target, TNode< JSAny > new_target, TNode< Int32T > argc, const LazyNode< Context > &context, const LazyNode< Union< Undefined, FeedbackVector > > &feedback_vector, TNode< UintPtrT > slot, UpdateFeedbackMode mode)
void CallReceiver(Builtin id, std::optional< TNode< JSAny > >=std::nullopt)
void CallOrConstructWithArrayLike(TNode< JSAny > target, std::optional< TNode< Object > > new_target, TNode< Object > arguments_list, TNode< Context > context)
void CallOrConstructWithSpread(TNode< JSAny > target, std::optional< TNode< Object > > new_target, TNode< JSAny > spread, TNode< Int32T > args_count, TNode< Context > context)
CallOrConstructBuiltinsAssembler(compiler::CodeAssemblerState *state)
std::function< TNode< T >()> LazyNode
DirectHandle< Object > new_target
Definition execution.cc:75
TNode< Object > receiver