chromium/v8/src/flags/flags.h

// Copyright 2006-2008 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_FLAGS_FLAGS_H_
#define V8_FLAGS_FLAGS_H_

#include <optional>

#include "src/common/globals.h"

#if V8_ENABLE_WEBASSEMBLY
// Include the wasm-limits.h header for some default values of Wasm flags.
// This can be reverted once we can use designated initializations (C++20) for
// {v8_flags} (defined in flags.cc) instead of specifying the default values in
// the header and using the default constructor.
#include "src/wasm/wasm-limits.h"
#endif

namespace v8::internal {

// The value of a single flag (this is the type of all v8_flags.* fields).
template <typename T>
class FlagValue {};

// Declare a struct to hold all of our flags.
struct alignas(kMinimumOSPageSize) FlagValues {};

V8_EXPORT_PRIVATE extern FlagValues v8_flags;

// The global list of all flags.
class V8_EXPORT_PRIVATE FlagList {};

template <typename T>
FlagValue<T>& FlagValue<T>::operator=(T new_value) {}

}  // namespace v8::internal

#endif  // V8_FLAGS_FLAGS_H_