Sami Vaarala
39ecb8b7eb
Source fixes for #ifdef and #ifndef convention
8 years ago
Sami Vaarala
5af5e58af1
Add duk_ret_t retval to duk_{throw,error,fatal}()
8 years ago
Sami Vaarala
ba48645a2f
Verbose errors also for return shorthand
8 years ago
Sami Vaarala
96d301b3cb
Rename src/ to src-input/ to match dist
With this change the directory naming in the main repo and dist is the same.
8 years ago
Sami Vaarala
a7f1adaf63
Remove Duktape specific error subtypes
These don't play well with the API currently: the Duktape specific error
codes don't have Ecmascript Error class counterparts so they don't get
represented usefully as Ecmascript objects (e.g. AllocError is a plain
Error from Ecmascript point of view).
There's no real need for Duktape specific error code. Some of the codes
had become unused; a couple were used but Ecmascript standard types can
be used instead.
Also minor error message tweaking.
9 years ago
Bruce Pascoe
8e4882abf3
Trivial comment change reclimit -> callstack limit
9 years ago
Bruce Pascoe
e6e8c9339d
Strengthen 10-recursion guarantee in error handling
9 years ago
Bruce Pascoe
356d9e1c66
Allow callstack headroom during error handling to fix GH-191
9 years ago
Sami Vaarala
1b3dee4903
Fixes to curr_pc sync, ptr_curr_pc NULLing
9 years ago
Sami Vaarala
3aa7edbb41
Use direct bytecode pointer to improve performance
10 years ago
Sami Vaarala
8fbd81e597
Implement bytecode dump/load API calls
10 years ago
Sami Vaarala
1fa66cd25a
Symbol visibility changes for code and headers
10 years ago
Sami Vaarala
53ba327003
FIXME cleanups and downgrades
Add value stack asserts to executor for the (somewhat messy) resetting of
value stack top in a few longjmp handling cases.
Downgrade a few other FIXMEs. Ditz issues and XXX comments track whatever
improvements are left.
10 years ago
Sami Vaarala
35ff9fcb64
FIXME cleanup
10 years ago
Sami Vaarala
6a15c0be73
Formatting casts for custom format (%!T etc)
10 years ago
Sami Vaarala
018774dc55
Format string cleanups, %ld instead of %d etc
10 years ago
Sami Vaarala
f8423ffb36
Format string cleanups, allow NULL+%s/%p in debug
Lots of minor string format cleanups (casts mainly).
Add a special check to detect NULL pointers with %s/%p formats in debug
logging to avoid calling the platform sprintf() with a NULL value. This
is especially important for %s + NULL, which is not portable and may crash
on some platforms. Debug logging will now format these specially as "NULL"
and avoid calling the platform for formatting, so debug log call sites don't
need to be careful with NULL pointers any more.
10 years ago
Sami Vaarala
9a85cb5974
Internal typing fixes (mostly error code)
11 years ago
Sami Vaarala
eefa8026a4
add some uses of duk_push_hobject_bidx()
11 years ago
Sami Vaarala
de9151c384
typing rework
11 years ago
Sami Vaarala
77b2e3c3f5
fix a set of multiline debug call sites
11 years ago
Sami Vaarala
95dee49efa
autofixed one line debug call sites
11 years ago
Sami Vaarala
2fe5e71b1b
replace Duktape.errhnd with Duktape.errthrow; add Duktape.errcreate so that user can also add an error handler for creating errors (which may be useful than errthrow); move errhandler calling to duk_error_augment.c; reorganize DUK_USE_xxx flags around error handlers
11 years ago
Sami Vaarala
af5890af3d
add a DUK_USE_ERRHANDLER define
11 years ago
Sami Vaarala
b852d81e90
add error handler calls to Duktape C API error throws, Ecmascript error throws (bytecode), and yield/resume when error flag is true
11 years ago
Sami Vaarala
cba13e5544
change error handler to be stored in the Duktape.errhnd property instead of an internal property: not as good for sandboxing, but requires no additional APIs, follows from one thread to another automatically, and reference to Duktape object can be removed from a sandbox anyway
11 years ago
Sami Vaarala
2b0bf5f285
remove errhandler_index from protected call handling, and fix call sites in Duktape internals
11 years ago
Sami Vaarala
6036c86def
prepend a 'duk__' prefix to a bunch of internal functions
11 years ago
Sami Vaarala
f7ce9b0d8d
reduce string constant set size for negative rc promotion code
11 years ago
Sami Vaarala
e965076ada
sprintf trivia, some asserts
11 years ago
Sami Vaarala
9c093c4eb2
don't blame __FILE__ / __LINE__ for Duktape generated errors (but record them in the traceback)
11 years ago
Sami Vaarala
884045b1d1
typedef C99 'wrapper' types like duk_uint32_t; bulk replacement of duk_u32 with duk_uint32_t, and other type usage replacements
11 years ago
Sami Vaarala
bf9649ab2b
remove DUK_NEVER_HERE() and use DUK_UNREACHABLE() instead
11 years ago
Sami Vaarala
d74e3c42d1
add __FILE__/__LINE__ to API errors, detecting variadic macro support; change traceback to tracedata, also store __FILE__/__LINE__ in tracedata if available; other minor cleanups
11 years ago
Sami Vaarala
a669f9829b
add a DUK_UNREF() macro and change code to use it; use (void) unused_var convention which works with clang too
11 years ago
Sami Vaarala
11c664a4eb
mass rename of multiple duk_push_new_xxx() into duk_push_xxx() for API consistency
11 years ago
Sami Vaarala
7d02742a03
require valstack before pushing an error (not an issue by itself but hobject_props asserts for work space)
12 years ago
Sami Vaarala
49c3585ed5
remove duplicate error augment calls
12 years ago
Sami Vaarala
5b5364b6dc
error code
12 years ago