@@ -139,22 +139,25 @@ class DebuggingContext {
139139
140140// assertions
141141#ifndef ASSERT
142+ #define vmassert_with_file_and_line (p, file, line, ...)
142143#define vmassert (p, ...)
143144#else
144145// Note: message says "assert" rather than "vmassert" for backward
145146// compatibility with tools that parse/match the message text.
146147// Note: The signature is vmassert(p, format, ...), but the solaris
147148// compiler can't handle an empty ellipsis in a macro without a warning.
148- #define vmassert (p, ...) \
149- do { \
150- if (! VMASSERT_CHECK_PASSED (p)) { \
151- TOUCH_ASSERT_POISON; \
152- report_vm_error (__FILE__, __LINE__ , " assert(" #p " ) failed" , __VA_ARGS__); \
153- } \
149+ #define vmassert_with_file_and_line (p, file, line, ...) \
150+ do { \
151+ if (! VMASSERT_CHECK_PASSED (p)) { \
152+ TOUCH_ASSERT_POISON; \
153+ report_vm_error (file, line , " assert(" #p " ) failed" , __VA_ARGS__); \
154+ } \
154155} while (0 )
156+ #define vmassert (p, ...) vmassert_with_file_and_line(p, __FILE__, __LINE__, __VA_ARGS__)
155157#endif
156158
157159// For backward compatibility.
160+ #define assert_with_file_and_line (p, file, line, ...) vmassert_with_file_and_line(p, file, line, __VA_ARGS__)
158161#define assert (p, ...) vmassert(p, __VA_ARGS__)
159162
160163#define precond (p ) assert (p, " precond" )
0 commit comments