| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 #define SEMI_STATIC_JOIN_HELPER(a, b) a##b | 329 #define SEMI_STATIC_JOIN_HELPER(a, b) a##b |
| 330 // Causes an error during compilation of the condition is not | 330 // Causes an error during compilation of the condition is not |
| 331 // statically known to be true. It is formulated as a typedef so that | 331 // statically known to be true. It is formulated as a typedef so that |
| 332 // it can be used wherever a typedef can be used. Beware that this | 332 // it can be used wherever a typedef can be used. Beware that this |
| 333 // actually causes each use to introduce a new defined type with a | 333 // actually causes each use to introduce a new defined type with a |
| 334 // name depending on the source line. | 334 // name depending on the source line. |
| 335 template <int> class StaticAssertionHelper { }; | 335 template <int> class StaticAssertionHelper { }; |
| 336 #define STATIC_CHECK(test) \ | 336 #define STATIC_CHECK(test) \ |
| 337 typedef \ | 337 typedef \ |
| 338 StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \ | 338 StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \ |
| 339 SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) | 339 SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) V8_UNUSED |
| 340 #endif | 340 #endif |
| 341 | 341 |
| 342 | 342 |
| 343 #ifdef DEBUG | 343 #ifdef DEBUG |
| 344 #ifndef OPTIMIZED_DEBUG | 344 #ifndef OPTIMIZED_DEBUG |
| 345 #define ENABLE_SLOW_ASSERTS 1 | 345 #define ENABLE_SLOW_ASSERTS 1 |
| 346 #endif | 346 #endif |
| 347 #endif | 347 #endif |
| 348 | 348 |
| 349 namespace v8 { | 349 namespace v8 { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 // "Extra checks" are lightweight checks that are enabled in some release | 391 // "Extra checks" are lightweight checks that are enabled in some release |
| 392 // builds. | 392 // builds. |
| 393 #ifdef ENABLE_EXTRA_CHECKS | 393 #ifdef ENABLE_EXTRA_CHECKS |
| 394 #define EXTRA_CHECK(condition) CHECK(condition) | 394 #define EXTRA_CHECK(condition) CHECK(condition) |
| 395 #else | 395 #else |
| 396 #define EXTRA_CHECK(condition) ((void) 0) | 396 #define EXTRA_CHECK(condition) ((void) 0) |
| 397 #endif | 397 #endif |
| 398 | 398 |
| 399 #endif // V8_CHECKS_H_ | 399 #endif // V8_CHECKS_H_ |
| OLD | NEW |