chromium/v8/src/builtins/builtins.h

// Copyright 2011 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_H_
#define V8_BUILTINS_BUILTINS_H_

#include "src/base/flags.h"
#include "src/builtins/builtins-definitions.h"
#include "src/common/globals.h"
#include "src/objects/type-hints.h"
#include "src/sandbox/code-entrypoint-tag.h"

namespace v8 {
namespace internal {

class ByteArray;
class CallInterfaceDescriptor;
class Callable;

// Forward declarations.
class BytecodeOffset;
class RootVisitor;
enum class InterpreterPushArgsMode : unsigned;
class Zone;
namespace compiler {
class CodeAssemblerState;
namespace turboshaft {
class Graph;
class PipelineData;
}  // namespace turboshaft
}  // namespace compiler

template <typename T>
static constexpr T FirstFromVarArgs(T x, ...) noexcept {}

// Convenience macro to avoid generating named accessors for all builtins.
#define BUILTIN_CODE(isolate, name)

enum class Builtin : int32_t {};

V8_INLINE constexpr bool operator<(Builtin a, Builtin b) {}

V8_INLINE Builtin operator++(Builtin& builtin) {}

class Builtins {};

V8_INLINE constexpr bool IsInterpreterTrampolineBuiltin(Builtin builtin_id) {}

V8_INLINE constexpr bool IsBaselineTrampolineBuiltin(Builtin builtin_id) {}

Builtin ExampleBuiltinForTorqueFunctionPointerType(
    size_t function_pointer_type_id);

}  // namespace internal
}  // namespace v8

// Helper while transitioning some functions to libm.
#if defined(V8_USE_LIBM_TRIG_FUNCTIONS)
#define SIN_IMPL(X)
#define COS_IMPL(X)
#else
#define SIN_IMPL
#define COS_IMPL
#endif

#endif  // V8_BUILTINS_BUILTINS_H_