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.
8 #include "src/base/functional.h"
9 #include "src/vector.h"
16 // Return the various version components.
17 static int GetMajor() { return major_; }
18 static int GetMinor() { return minor_; }
19 static int GetBuild() { return build_; }
20 static int GetPatch() { return patch_; }
21 static bool IsCandidate() { return candidate_; }
22 static uint32_t Hash() {
23 return static_cast<uint32_t>(
24 base::hash_combine(major_, minor_, build_, patch_));
27 // Calculate the V8 version string.
28 static void GetString(Vector<char> str);
30 // Calculate the SONAME for the V8 shared library.
31 static void GetSONAME(Vector<char> str);
33 static const char* GetVersion() { return version_string_; }
36 // NOTE: can't make these really const because of test-version.cc.
41 static bool candidate_;
42 static const char* soname_;
43 static const char* version_string_;
45 // In test-version.cc.
46 friend void SetVersion(int major, int minor, int build, int patch,
47 bool candidate, const char* soname);
50 } // namespace internal
53 #endif // V8_VERSION_H_