OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 # else | 72 # else |
73 # define V8_EXPORT | 73 # define V8_EXPORT |
74 # endif | 74 # endif |
75 #else | 75 #else |
76 # define V8_EXPORT | 76 # define V8_EXPORT |
77 #endif | 77 #endif |
78 | 78 |
79 #endif // V8_OS_WIN | 79 #endif // V8_OS_WIN |
80 | 80 |
81 /** | 81 /** |
| 82 * The major version number of the V8 library. |
| 83 */ |
| 84 #define V8_MAJOR_VERSION 3 |
| 85 |
| 86 /** |
| 87 * The minor version number of the V8 library. |
| 88 */ |
| 89 #define V8_MINOR_VERSION 21 |
| 90 |
| 91 /** |
| 92 * The build number of the V8 library. |
| 93 */ |
| 94 #define V8_BUILD_NUMBER 8 |
| 95 |
| 96 /** |
| 97 * The patch level of the V8 library. |
| 98 */ |
| 99 #define V8_PATCH_LEVEL 0 |
| 100 |
| 101 /** |
| 102 * This is non-zero if the V8 library is a candidate version or zero for |
| 103 * release versions. |
| 104 */ |
| 105 #define V8_CANDIDATE_VERSION 1 |
| 106 |
| 107 /** |
| 108 * \def V8_VERSION_STRING |
| 109 * The version string of the V8 library. |
| 110 */ |
| 111 #if V8_CANDIDATE_VERSION && V8_PATCH_LEVEL |
| 112 # define V8_VERSION_STRING \ |
| 113 V8_STRINGIFY(V8_MAJOR_VERSION) "." \ |
| 114 V8_STRINGIFY(V8_MINOR_VERSION) "." \ |
| 115 V8_STRINGIFY(V8_BUILD_NUMBER) "." \ |
| 116 V8_STRINGIFY(V8_PATCH_LEVEL) " (candidate)" |
| 117 #elif V8_PATCH_LEVEL |
| 118 # define V8_VERSION_STRING \ |
| 119 V8_STRINGIFY(V8_MAJOR_VERSION) "." \ |
| 120 V8_STRINGIFY(V8_MINOR_VERSION) "." \ |
| 121 V8_STRINGIFY(V8_BUILD_NUMBER) "." \ |
| 122 V8_STRINGIFY(V8_PATCH_LEVEL) |
| 123 #elif V8_CANDIDATE_VERSION |
| 124 # define V8_VERSION_STRING \ |
| 125 V8_STRINGIFY(V8_MAJOR_VERSION) "." \ |
| 126 V8_STRINGIFY(V8_MINOR_VERSION) "." \ |
| 127 V8_STRINGIFY(V8_BUILD_NUMBER) " (candidate)" |
| 128 #else |
| 129 # define V8_VERSION_STRING \ |
| 130 V8_STRINGIFY(V8_MAJOR_VERSION) "." \ |
| 131 V8_STRINGIFY(V8_MINOR_VERSION) "." \ |
| 132 V8_STRINGIFY(V8_BUILD_NUMBER) |
| 133 #endif |
| 134 |
| 135 /** |
| 136 * Checks the version of the V8 library that is being compiled against. |
| 137 * |
| 138 * Sample usage: |
| 139 * \code |
| 140 * #if V8_CHECK_VERSION(3, 21, 8, 0) |
| 141 * // Code that requires V8 3.21.8.0 or later. |
| 142 * ... |
| 143 * #endif |
| 144 * \endcode |
| 145 */ |
| 146 #define V8_CHECK_VERSION(major, minor, build, patch) \ |
| 147 ((V8_MAJOR_VERSION * 1000000 + \ |
| 148 V8_MINOR_VERSION * 10000 + \ |
| 149 V8_BUILD_NUMBER * 100 + \ |
| 150 V8_PATCH_LEVEL) >= \ |
| 151 ((major) * 1000000 + \ |
| 152 (minor) * 10000 + \ |
| 153 (build) * 100 + \ |
| 154 (patch))) |
| 155 |
| 156 /** |
82 * The v8 JavaScript engine. | 157 * The v8 JavaScript engine. |
83 */ | 158 */ |
84 namespace v8 { | 159 namespace v8 { |
85 | 160 |
86 class AccessorSignature; | 161 class AccessorSignature; |
87 class Array; | 162 class Array; |
88 class Boolean; | 163 class Boolean; |
89 class BooleanObject; | 164 class BooleanObject; |
90 class Context; | 165 class Context; |
91 class CpuProfiler; | 166 class CpuProfiler; |
(...skipping 6407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6499 */ | 6574 */ |
6500 | 6575 |
6501 | 6576 |
6502 } // namespace v8 | 6577 } // namespace v8 |
6503 | 6578 |
6504 | 6579 |
6505 #undef TYPE_CHECK | 6580 #undef TYPE_CHECK |
6506 | 6581 |
6507 | 6582 |
6508 #endif // V8_H_ | 6583 #endif // V8_H_ |
OLD | NEW |