| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_CHECKS_H_ | 28 #ifndef V8_CHECKS_H_ |
| 29 #define V8_CHECKS_H_ | 29 #define V8_CHECKS_H_ |
| 30 | 30 |
| 31 #include <string.h> | 31 #include <string.h> |
| 32 | 32 |
| 33 #include "flags.h" | 33 #include "flags.h" |
| 34 | 34 |
| 35 #ifdef DEBUG | |
| 36 DECLARE_bool(enable_slow_asserts); | |
| 37 #endif // DEBUG | |
| 38 | |
| 39 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...); | 35 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...); |
| 40 void API_Fatal(const char* location, const char* format, ...); | 36 void API_Fatal(const char* location, const char* format, ...); |
| 41 | 37 |
| 42 // The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during | 38 // The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during |
| 43 // development, but they should not be relied on in the final product. | 39 // development, but they should not be relied on in the final product. |
| 44 #define FATAL(msg) \ | 40 #define FATAL(msg) \ |
| 45 V8_Fatal(__FILE__, __LINE__, "%s", (msg)) | 41 V8_Fatal(__FILE__, __LINE__, "%s", (msg)) |
| 46 | 42 |
| 47 #define UNREACHABLE() \ | 43 #define UNREACHABLE() \ |
| 48 V8_Fatal(__FILE__, __LINE__, "unreachable code") | 44 V8_Fatal(__FILE__, __LINE__, "unreachable code") |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 #define SLOW_ASSERT(condition) ((void) 0) | 237 #define SLOW_ASSERT(condition) ((void) 0) |
| 242 #endif | 238 #endif |
| 243 | 239 |
| 244 | 240 |
| 245 #define ASSERT_TAG_ALIGNED(address) \ | 241 #define ASSERT_TAG_ALIGNED(address) \ |
| 246 ASSERT((reinterpret_cast<int>(address) & kHeapObjectTagMask) == 0) | 242 ASSERT((reinterpret_cast<int>(address) & kHeapObjectTagMask) == 0) |
| 247 | 243 |
| 248 #define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & kHeapObjectTagMask) == 0) | 244 #define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & kHeapObjectTagMask) == 0) |
| 249 | 245 |
| 250 #endif // V8_CHECKS_H_ | 246 #endif // V8_CHECKS_H_ |
| OLD | NEW |