Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: src/version.h

Issue 909473002: Add hash fields to code cache header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test case Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_VERSION_H_ 5 #ifndef V8_VERSION_H_
6 #define V8_VERSION_H_ 6 #define V8_VERSION_H_
7 7
8 #include "src/base/functional.h" 8 #include "src/base/functional.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 class Version { 13 class Version {
14 public: 14 public:
15 // Return the various version components. 15 // Return the various version components.
16 static int GetMajor() { return major_; } 16 static int GetMajor() { return major_; }
17 static int GetMinor() { return minor_; } 17 static int GetMinor() { return minor_; }
18 static int GetBuild() { return build_; } 18 static int GetBuild() { return build_; }
19 static int GetPatch() { return patch_; } 19 static int GetPatch() { return patch_; }
20 static bool IsCandidate() { return candidate_; } 20 static bool IsCandidate() { return candidate_; }
21 static int Hash() { 21 static uint32_t Hash() {
22 return static_cast<int>(base::hash_combine(major_, minor_, build_, patch_)); 22 return static_cast<uint32_t>(
23 base::hash_combine(major_, minor_, build_, patch_));
23 } 24 }
24 25
25 // Calculate the V8 version string. 26 // Calculate the V8 version string.
26 static void GetString(Vector<char> str); 27 static void GetString(Vector<char> str);
27 28
28 // Calculate the SONAME for the V8 shared library. 29 // Calculate the SONAME for the V8 shared library.
29 static void GetSONAME(Vector<char> str); 30 static void GetSONAME(Vector<char> str);
30 31
31 static const char* GetVersion() { return version_string_; } 32 static const char* GetVersion() { return version_string_; }
32 33
33 private: 34 private:
34 // NOTE: can't make these really const because of test-version.cc. 35 // NOTE: can't make these really const because of test-version.cc.
35 static int major_; 36 static int major_;
36 static int minor_; 37 static int minor_;
37 static int build_; 38 static int build_;
38 static int patch_; 39 static int patch_;
39 static bool candidate_; 40 static bool candidate_;
40 static const char* soname_; 41 static const char* soname_;
41 static const char* version_string_; 42 static const char* version_string_;
42 43
43 // In test-version.cc. 44 // In test-version.cc.
44 friend void SetVersion(int major, int minor, int build, int patch, 45 friend void SetVersion(int major, int minor, int build, int patch,
45 bool candidate, const char* soname); 46 bool candidate, const char* soname);
46 }; 47 };
47 48
48 } } // namespace v8::internal 49 } } // namespace v8::internal
49 50
50 #endif // V8_VERSION_H_ 51 #endif // V8_VERSION_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698