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

Side by Side Diff: src/version.h

Issue 373713006: Introduce code serializer/deserializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and rebased Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/snapshot-source-sink.cc ('k') | test/cctest/test-compiler.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 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
11 class Version { 11 class Version {
12 public: 12 public:
13 // Return the various version components. 13 // Return the various version components.
14 static int GetMajor() { return major_; } 14 static int GetMajor() { return major_; }
15 static int GetMinor() { return minor_; } 15 static int GetMinor() { return minor_; }
16 static int GetBuild() { return build_; } 16 static int GetBuild() { return build_; }
17 static int GetPatch() { return patch_; } 17 static int GetPatch() { return patch_; }
18 static bool IsCandidate() { return candidate_; } 18 static bool IsCandidate() { return candidate_; }
19 static int Hash() { return (major_ << 20) ^ (minor_ << 10) ^ patch_; }
19 20
20 // Calculate the V8 version string. 21 // Calculate the V8 version string.
21 static void GetString(Vector<char> str); 22 static void GetString(Vector<char> str);
22 23
23 // Calculate the SONAME for the V8 shared library. 24 // Calculate the SONAME for the V8 shared library.
24 static void GetSONAME(Vector<char> str); 25 static void GetSONAME(Vector<char> str);
25 26
26 static const char* GetVersion() { return version_string_; } 27 static const char* GetVersion() { return version_string_; }
27 28
28 private: 29 private:
29 // NOTE: can't make these really const because of test-version.cc. 30 // NOTE: can't make these really const because of test-version.cc.
30 static int major_; 31 static int major_;
31 static int minor_; 32 static int minor_;
32 static int build_; 33 static int build_;
33 static int patch_; 34 static int patch_;
34 static bool candidate_; 35 static bool candidate_;
35 static const char* soname_; 36 static const char* soname_;
36 static const char* version_string_; 37 static const char* version_string_;
37 38
38 // In test-version.cc. 39 // In test-version.cc.
39 friend void SetVersion(int major, int minor, int build, int patch, 40 friend void SetVersion(int major, int minor, int build, int patch,
40 bool candidate, const char* soname); 41 bool candidate, const char* soname);
41 }; 42 };
42 43
43 } } // namespace v8::internal 44 } } // namespace v8::internal
44 45
45 #endif // V8_VERSION_H_ 46 #endif // V8_VERSION_H_
OLDNEW
« no previous file with comments | « src/snapshot-source-sink.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698