Author: [EMAIL PROTECTED]
Date: Mon Sep 22 02:22:18 2008
New Revision: 353
Modified:
branches/bleeding_edge/src/checks.h
Log:
In release, disable UNREACHABLE and make UNIMPLEMENTED and FATAL simpler,
removing the file name and line numbers, so we carry around less data and
can share more code.
Modified: branches/bleeding_edge/src/checks.h
==============================================================================
--- branches/bleeding_edge/src/checks.h (original)
+++ branches/bleeding_edge/src/checks.h Mon Sep 22 02:22:18 2008
@@ -37,14 +37,20 @@
// The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during
// development, but they should not be relied on in the final product.
+#ifdef DEBUG
#define FATAL(msg) \
V8_Fatal(__FILE__, __LINE__, "%s", (msg))
-
+#define UNIMPLEMENTED() \
+ V8_Fatal(__FILE__, __LINE__, "unimplemented code")
#define UNREACHABLE() \
V8_Fatal(__FILE__, __LINE__, "unreachable code")
-
+#else
+#define FATAL(msg) \
+ V8_Fatal("", 0, "%s", (msg))
#define UNIMPLEMENTED() \
- V8_Fatal(__FILE__, __LINE__, "unimplemented code")
+ V8_Fatal("", 0, "unimplemented code")
+#define UNREACHABLE() ((void) 0)
+#endif
// Used by the CHECK macro -- should not be called directly.
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---