v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1
// Copyright 2009 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_UTILS_VERSION_H_
6
#define V8_UTILS_VERSION_H_
7
8
#include <cstdint>
9
10
#include "
src/base/hashing.h
"
11
12
namespace
v8
{
13
14
namespace
base
{
15
template
<
typename
T>
16
class
Vector;
17
}
// namespace base
18
19
namespace
internal
{
20
21
class
V8_EXPORT
Version
{
22
public
:
23
// Return the various version components.
24
static
int
GetMajor
() {
return
major_; }
25
static
int
GetMinor
() {
return
minor_; }
26
static
int
GetBuild
() {
return
build_; }
27
static
int
GetPatch
() {
return
patch_; }
28
static
const
char
*
GetEmbedder
() {
return
embedder_; }
29
static
bool
IsCandidate
() {
return
candidate_; }
30
static
uint32_t
Hash
() {
31
return
static_cast<
uint32_t
>
(
32
base::hash_combine(major_, minor_, build_, patch_));
33
}
34
35
// Calculate the V8 version string.
36
static
void
GetString(
base::Vector<char>
str);
37
38
// Calculate the SONAME for the V8 shared library.
39
static
void
GetSONAME(
base::Vector<char>
str);
40
41
static
const
char
*
GetVersion
() {
return
version_string_; }
42
43
private
:
44
// NOTE: can't make these really const because of test-version.cc.
45
static
int
major_
;
46
static
int
minor_
;
47
static
int
build_
;
48
static
int
patch_
;
49
static
const
char
*
embedder_
;
50
static
bool
candidate_
;
51
static
const
char
*
soname_
;
52
static
const
char
*
version_string_
;
53
54
// In test-version.cc.
55
friend
void
SetVersion
(
int
major,
int
minor,
int
build,
int
patch,
56
const
char
* embedder,
bool
candidate,
57
const
char
* soname);
58
};
59
60
}
// namespace internal
61
}
// namespace v8
62
63
#endif
// V8_UTILS_VERSION_H_
v8::base::Vector
Definition
zone-list.h:15
v8::internal::Version
Definition
version.h:21
v8::internal::Version::build_
static int build_
Definition
version.h:47
v8::internal::Version::GetEmbedder
static const char * GetEmbedder()
Definition
version.h:28
v8::internal::Version::GetMajor
static int GetMajor()
Definition
version.h:24
v8::internal::Version::GetBuild
static int GetBuild()
Definition
version.h:26
v8::internal::Version::GetPatch
static int GetPatch()
Definition
version.h:27
v8::internal::Version::GetMinor
static int GetMinor()
Definition
version.h:25
v8::internal::Version::candidate_
static bool candidate_
Definition
version.h:50
v8::internal::Version::SetVersion
friend void SetVersion(int major, int minor, int build, int patch, const char *embedder, bool candidate, const char *soname)
v8::internal::Version::version_string_
static const char * version_string_
Definition
version.h:52
v8::internal::Version::soname_
static const char * soname_
Definition
version.h:51
v8::internal::Version::embedder_
static const char * embedder_
Definition
version.h:49
v8::internal::Version::minor_
static int minor_
Definition
version.h:46
v8::internal::Version::patch_
static int patch_
Definition
version.h:48
v8::internal::Version::Hash
static uint32_t Hash()
Definition
version.h:30
v8::internal::Version::IsCandidate
static bool IsCandidate()
Definition
version.h:29
v8::internal::Version::major_
static int major_
Definition
version.h:45
v8::internal::Version::GetVersion
static const char * GetVersion()
Definition
version.h:41
hashing.h
base
OpIndex base
Definition
instruction-selector-ia32.cc:65
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
V8_EXPORT
#define V8_EXPORT
Definition
v8config.h:800
src
utils
version.h
Generated on Sun Apr 6 2025 21:08:57 for v8 by
1.12.0