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

Side by Side Diff: src/version.cc

Issue 2878014: [Isolates] Fixing Win32 compile and running tests failure. (Closed)
Patch Set: Typos Created 10 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
« no previous file with comments | « src/v8.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 18 matching lines...) Expand all
29 29
30 #include "version.h" 30 #include "version.h"
31 31
32 // These macros define the version number for the current version. 32 // These macros define the version number for the current version.
33 // NOTE these macros are used by the SCons build script so their names 33 // NOTE these macros are used by the SCons build script so their names
34 // cannot be changed without changing the SCons build script. 34 // cannot be changed without changing the SCons build script.
35 #define MAJOR_VERSION 2 35 #define MAJOR_VERSION 2
36 #define MINOR_VERSION 2 36 #define MINOR_VERSION 2
37 #define BUILD_NUMBER 20 37 #define BUILD_NUMBER 20
38 #define PATCH_LEVEL 0 38 #define PATCH_LEVEL 0
39 #define CANDIDATE_VERSION true 39 // Use 1 for candidates and 0 otherwise.
40 // (Boolean macro values are not supported by all preprocessors.)
41 #define IS_CANDIDATE_VERSION 0
40 42
41 // Define SONAME to have the SCons build the put a specific SONAME into the 43 // Define SONAME to have the SCons build the put a specific SONAME into the
42 // shared library instead the generic SONAME generated from the V8 version 44 // shared library instead the generic SONAME generated from the V8 version
43 // number. This define is mainly used by the SCons build script. 45 // number. This define is mainly used by the SCons build script.
44 #define SONAME "" 46 #define SONAME ""
45 47
46 #if CANDIDATE_VERSION == true 48 #if IS_CANDIDATE_VERSION
47 #define CANDIDATE_STRING " (candidate)" 49 #define CANDIDATE_STRING " (candidate)"
48 #else 50 #else
49 #define CANDIDATE_STRING "" 51 #define CANDIDATE_STRING ""
50 #endif 52 #endif
51 53
52 #define SX(x) #x 54 #define SX(x) #x
53 #define S(x) SX(x) 55 #define S(x) SX(x)
54 56
55 #if PATCH_LEVEL > 0 57 #if PATCH_LEVEL > 0
56 #define VERSION_STRING \ 58 #define VERSION_STRING \
57 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) "." \ 59 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) "." \
58 S(PATCH_LEVEL) CANDIDATE_STRING 60 S(PATCH_LEVEL) CANDIDATE_STRING
59 #else 61 #else
60 #define VERSION_STRING \ 62 #define VERSION_STRING \
61 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) \ 63 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) \
62 CANDIDATE_STRING 64 CANDIDATE_STRING
63 #endif 65 #endif
64 66
65 namespace v8 { 67 namespace v8 {
66 namespace internal { 68 namespace internal {
67 69
68 int Version::major_ = MAJOR_VERSION; 70 int Version::major_ = MAJOR_VERSION;
69 int Version::minor_ = MINOR_VERSION; 71 int Version::minor_ = MINOR_VERSION;
70 int Version::build_ = BUILD_NUMBER; 72 int Version::build_ = BUILD_NUMBER;
71 int Version::patch_ = PATCH_LEVEL; 73 int Version::patch_ = PATCH_LEVEL;
72 bool Version::candidate_ = CANDIDATE_VERSION; 74 bool Version::candidate_ = (IS_CANDIDATE_VERSION != 0);
73 const char* Version::soname_ = SONAME; 75 const char* Version::soname_ = SONAME;
74 const char* Version::version_string_ = VERSION_STRING; 76 const char* Version::version_string_ = VERSION_STRING;
75 77
76 // Calculate the V8 version string. 78 // Calculate the V8 version string.
77 void Version::GetString(Vector<char> str) { 79 void Version::GetString(Vector<char> str) {
78 const char* candidate = IsCandidate() ? " (candidate)" : ""; 80 const char* candidate = IsCandidate() ? " (candidate)" : "";
79 if (GetPatch() > 0) { 81 if (GetPatch() > 0) {
80 OS::SNPrintF(str, "%d.%d.%d.%d%s", 82 OS::SNPrintF(str, "%d.%d.%d.%d%s",
81 GetMajor(), GetMinor(), GetBuild(), GetPatch(), candidate); 83 GetMajor(), GetMinor(), GetBuild(), GetPatch(), candidate);
82 } else { 84 } else {
(...skipping 15 matching lines...) Expand all
98 OS::SNPrintF(str, "libv8-%d.%d.%d%s.so", 100 OS::SNPrintF(str, "libv8-%d.%d.%d%s.so",
99 GetMajor(), GetMinor(), GetBuild(), candidate); 101 GetMajor(), GetMinor(), GetBuild(), candidate);
100 } 102 }
101 } else { 103 } else {
102 // Use specific SONAME. 104 // Use specific SONAME.
103 OS::SNPrintF(str, "%s", soname_); 105 OS::SNPrintF(str, "%s", soname_);
104 } 106 }
105 } 107 }
106 108
107 } } // namespace v8::internal 109 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/v8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698