Skip to content

Commit 4af6461

Browse files
mi-acV8 LUCI CQ
authored andcommitted
[flags] Split off header with implementation details
Bug: 41497291 Change-Id: I930f6157e2a5ffbc1ac9bd9c76b008029ce7de63 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5300310 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/main@{#92417}
1 parent f48b347 commit 4af6461

6 files changed

Lines changed: 28 additions & 9 deletions

File tree

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ filegroup(
674674
name = "v8_flags",
675675
srcs = [
676676
"src/flags/flag-definitions.h",
677+
"src/flags/flags-impl.h",
677678
"src/flags/flags.h",
678679
] + select({
679680
"is_v8_enable_webassembly": ["src/wasm/wasm-feature-flags.h"],
@@ -1540,6 +1541,7 @@ filegroup(
15401541
"src/extensions/trigger-failure-extension.cc",
15411542
"src/extensions/trigger-failure-extension.h",
15421543
"src/flags/flag-definitions.h",
1544+
"src/flags/flags-impl.h",
15431545
"src/flags/flags.cc",
15441546
"src/flags/flags.h",
15451547
"src/handles/global-handles.cc",

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,6 +3145,7 @@ v8_header_set("v8_flags") {
31453145

31463146
sources = [
31473147
"src/flags/flag-definitions.h",
3148+
"src/flags/flags-impl.h",
31483149
"src/flags/flags.h",
31493150
]
31503151

src/flags/flags-impl.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2024 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_FLAGS_FLAGS_IMPL_H_
6+
#define V8_FLAGS_FLAGS_IMPL_H_
7+
8+
#include "src/base/macros.h"
9+
10+
namespace v8::internal {
11+
12+
class V8_EXPORT_PRIVATE FlagHelpers {
13+
public:
14+
static char NormalizeChar(char ch);
15+
16+
static int FlagNamesCmp(const char* a, const char* b);
17+
18+
static bool EqualNames(const char* a, const char* b);
19+
};
20+
21+
} // namespace v8::internal
22+
23+
#endif // V8_FLAGS_FLAGS_IMPL_H_

src/flags/flags.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "src/base/logging.h"
2121
#include "src/base/platform/platform.h"
2222
#include "src/codegen/cpu-features.h"
23+
#include "src/flags/flags-impl.h"
2324
#include "src/logging/counters.h"
2425
#include "src/logging/tracing-flags.h"
2526
#include "src/tracing/tracing-category-observer.h"

src/flags/flags.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818

1919
namespace v8::internal {
2020

21-
class V8_EXPORT_PRIVATE FlagHelpers {
22-
public:
23-
static char NormalizeChar(char ch);
24-
25-
static int FlagNamesCmp(const char* a, const char* b);
26-
27-
static bool EqualNames(const char* a, const char* b);
28-
};
29-
3021
// The value of a single flag (this is the type of all v8_flags.* fields).
3122
template <typename T>
3223
class FlagValue {

test/unittests/flags/flag-definitions-unittest.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include <stdlib.h>
2929

30+
#include "src/flags/flags-impl.h"
3031
#include "src/flags/flags.h"
3132
#include "src/init/v8.h"
3233
#include "test/unittests/fuzztest.h"

0 commit comments

Comments
 (0)