chromium/v8/src/builtins/builtins-call-gen.cc

// 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.

#include "src/builtins/builtins-call-gen.h"

#include <optional>

#include "src/builtins/builtins-inl.h"
#include "src/builtins/builtins-utils-gen.h"
#include "src/codegen/macro-assembler.h"
#include "src/common/globals.h"
#include "src/execution/isolate.h"
#include "src/execution/protectors.h"
#include "src/objects/api-callbacks.h"
#include "src/objects/arguments.h"
#include "src/objects/property-cell.h"
#include "src/objects/templates.h"

namespace v8 {
namespace internal {

#include "src/codegen/define-code-stub-assembler-macros.inc"

void Builtins::Generate_CallFunction_ReceiverIsNullOrUndefined(
    MacroAssembler* masm) {}

void Builtins::Generate_CallFunction_ReceiverIsNotNullOrUndefined(
    MacroAssembler* masm) {}

void Builtins::Generate_CallFunction_ReceiverIsAny(MacroAssembler* masm) {}

void Builtins::Generate_CallBoundFunction(MacroAssembler* masm) {}

void Builtins::Generate_Call_ReceiverIsNullOrUndefined(MacroAssembler* masm) {}

void Builtins::Generate_Call_ReceiverIsNotNullOrUndefined(
    MacroAssembler* masm) {}

void Builtins::Generate_Call_ReceiverIsAny(MacroAssembler* masm) {}

void Builtins::Generate_CallVarargs(MacroAssembler* masm) {}

void Builtins::Generate_CallForwardVarargs(MacroAssembler* masm) {}

void Builtins::Generate_CallFunctionForwardVarargs(MacroAssembler* masm) {}

void Builtins::Generate_CallApiCallbackGeneric(MacroAssembler* masm) {}

void Builtins::Generate_CallApiCallbackOptimizedNoProfiling(
    MacroAssembler* masm) {}

void Builtins::Generate_CallApiCallbackOptimized(MacroAssembler* masm) {}

// TODO(cbruni): Try reusing code between builtin versions to avoid binary
// overhead.
TF_BUILTIN(Call_ReceiverIsNullOrUndefined_Baseline_Compact,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsNullOrUndefined_Baseline,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsNotNullOrUndefined_Baseline_Compact,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsNotNullOrUndefined_Baseline,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsAny_Baseline_Compact,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsAny_Baseline, CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsNullOrUndefined_WithFeedback,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsNotNullOrUndefined_WithFeedback,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(Call_ReceiverIsAny_WithFeedback, CallOrConstructBuiltinsAssembler) {}

void CallOrConstructBuiltinsAssembler::CallOrConstructWithArrayLike(
    TNode<Object> target, std::optional<TNode<Object>> new_target,
    TNode<Object> arguments_list, TNode<Context> context) {}

// Takes a FixedArray of doubles and creates a new FixedArray with those doubles
// boxed as HeapNumbers, then tail calls CallVarargs/ConstructVarargs depending
// on whether {new_target} was passed.
void CallOrConstructBuiltinsAssembler::CallOrConstructDoubleVarargs(
    TNode<Object> target, std::optional<TNode<Object>> new_target,
    TNode<FixedDoubleArray> elements, TNode<Int32T> length,
    TNode<Int32T> args_count, TNode<Context> context, TNode<Int32T> kind) {}

void CallOrConstructBuiltinsAssembler::CallOrConstructWithSpread(
    TNode<Object> target, std::optional<TNode<Object>> new_target,
    TNode<Object> spread, TNode<Int32T> args_count, TNode<Context> context) {}

template <class Descriptor>
void CallOrConstructBuiltinsAssembler::CallReceiver(
    Builtin id, std::optional<TNode<Object>> receiver) {}

template <class Descriptor>
void CallOrConstructBuiltinsAssembler::CallReceiver(
    Builtin id, TNode<Int32T> argc, TNode<UintPtrT> slot,
    std::optional<TNode<Object>> maybe_receiver) {}

TF_BUILTIN(CallWithArrayLike, CallOrConstructBuiltinsAssembler) {}

// TODO(ishell): not used, consider removing.
TF_BUILTIN(CallWithArrayLike_WithFeedback, CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(CallWithSpread, CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(CallWithSpread_Baseline, CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(CallWithSpread_WithFeedback, CallOrConstructBuiltinsAssembler) {}

TNode<JSReceiver> CallOrConstructBuiltinsAssembler::GetCompatibleReceiver(
    TNode<JSReceiver> receiver, TNode<HeapObject> signature,
    TNode<Context> context) {}

// static
constexpr bool CallOrConstructBuiltinsAssembler::IsAccessCheckRequired(
    CallFunctionTemplateMode mode) {}

// This calls an API callback by passing a {FunctionTemplateInfo},
// does appropriate access and compatible receiver checks.
void CallOrConstructBuiltinsAssembler::CallFunctionTemplate(
    CallFunctionTemplateMode mode,
    TNode<FunctionTemplateInfo> function_template_info, TNode<Int32T> argc,
    TNode<Context> context, TNode<Object> topmost_script_having_context) {}

TF_BUILTIN(CallFunctionTemplate_Generic, CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(CallFunctionTemplate_CheckAccess, CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(CallFunctionTemplate_CheckCompatibleReceiver,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(CallFunctionTemplate_CheckAccessAndCompatibleReceiver,
           CallOrConstructBuiltinsAssembler) {}

TF_BUILTIN(HandleApiCallOrConstruct, CallOrConstructBuiltinsAssembler) {}

#include "src/codegen/undef-code-stub-assembler-macros.inc"

}  // namespace internal
}  // namespace v8