30 #if V8_LIBC_GLIBC || V8_OS_BSD
32 # include <execinfo.h>
34 # include <backtrace.h>
35 #endif // V8_LIBC_GLIBC || V8_OS_BSD
48 #if V8_LIBC_GLIBC || V8_OS_BSD
51 char**
symbols = backtrace_symbols(trace, size);
52 OS::PrintError(
"\n==== C stack trace ===============================\n\n");
55 }
else if (symbols ==
NULL) {
58 for (
int i = 1; i <
size; ++i) {
61 if (sscanf(symbols[i],
"%*[^(]%*[(]%200[^)+]", mangled) == 1) {
64 char* demangled = abi::__cxa_demangle(mangled,
NULL, &length, &status);
77 bt_init_accessor(&acc, BT_SELF);
78 bt_load_memmap(&acc, &memmap);
79 bt_sprn_memmap(&memmap, out,
sizeof(out));
82 int size = bt_get_backtrace(&acc, trace,
ARRAY_SIZE(trace));
83 OS::PrintError(
"\n==== C stack trace ===============================\n\n");
87 bt_sprnf_addrs(&memmap, trace, size, const_cast<char*>(
"%a\n"),
88 out,
sizeof(out),
NULL);
91 bt_unload_memmap(&memmap);
92 bt_release_accessor(&acc);
93 #endif // V8_LIBC_GLIBC || V8_OS_BSD
100 extern "C" void V8_Fatal(
const char* file,
int line,
const char* format, ...) {
107 va_start(arguments, format);
119 const char* expected_source,
121 const char* value_source,
123 if (!expected->
Equals(value)) {
127 "CHECK_EQ(%s, %s) failed\n# Expected: %s\n# Found: %s",
128 expected_source, value_source, *expected_str, *value_str);
135 const char* unexpected_source,
137 const char* value_source,
139 if (unexpected->
Equals(value)) {
141 V8_Fatal(file, line,
"CHECK_NE(%s, %s) failed\n# Value: %s",
142 unexpected_source, value_source, *value_str);
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
enable upcoming ES6 features enable harmony block scoping enable harmony symbols(a.k.a.private names)") DEFINE_bool(harmony_proxies
const intptr_t kHeapObjectTagMask
bool Equals(Handle< Value > that) const
void V8_Fatal(const char *file, int line, const char *format,...)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
static void VPrintError(const char *format, va_list args)
intptr_t HeapObjectTagMask()
static void PrintError(const char *format,...)
void CheckNonEqualsHelper(const char *file, int line, const char *unexpected_source, v8::Handle< v8::Value > unexpected, const char *value_source, v8::Handle< v8::Value > value)
void CheckEqualsHelper(const char *file, int line, const char *expected_source, v8::Handle< v8::Value > expected, const char *value_source, v8::Handle< v8::Value > value)