diff options
Diffstat (limited to 'deps/v8/src/checks.h')
-rw-r--r-- | deps/v8/src/checks.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/deps/v8/src/checks.h b/deps/v8/src/checks.h index f7b145fc8a..e53475a0a4 100644 --- a/deps/v8/src/checks.h +++ b/deps/v8/src/checks.h @@ -34,6 +34,7 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...); + // The FATAL, UNREACHABLE and UNIMPLEMENTED macros are useful during // development, but they should not be relied on in the final product. #ifdef DEBUG @@ -51,6 +52,23 @@ extern "C" void V8_Fatal(const char* file, int line, const char* format, ...); #define UNREACHABLE() ((void) 0) #endif +// Simulator specific helpers. +#if defined(USE_SIMULATOR) && defined(V8_TARGET_ARCH_ARM64) + // TODO(all): If possible automatically prepend an indicator like + // UNIMPLEMENTED or LOCATION. + #define ASM_UNIMPLEMENTED(message) \ + __ Debug(message, __LINE__, NO_PARAM) + #define ASM_UNIMPLEMENTED_BREAK(message) \ + __ Debug(message, __LINE__, \ + FLAG_ignore_asm_unimplemented_break ? NO_PARAM : BREAK) + #define ASM_LOCATION(message) \ + __ Debug("LOCATION: " message, __LINE__, NO_PARAM) +#else + #define ASM_UNIMPLEMENTED(message) + #define ASM_UNIMPLEMENTED_BREAK(message) + #define ASM_LOCATION(message) +#endif + // The CHECK macro checks that the given condition is true; if not, it // prints a message to stderr and aborts. @@ -288,8 +306,12 @@ extern bool FLAG_enable_slow_asserts; #define SLOW_ASSERT(condition) ((void) 0) const bool FLAG_enable_slow_asserts = false; #endif -} // namespace internal -} // namespace v8 + +// Exposed for making debugging easier (to see where your function is being +// called, just add a call to DumpBacktrace). +void DumpBacktrace(); + +} } // namespace v8::internal // The ASSERT macro is equivalent to CHECK except that it only |