69#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
84#if defined(DUK_USE_INTERRUPT_DEBUG_FIXUP)
85 if (entry_curr_thread ==
NULL) {
86 thr->interrupt_init = thr->interrupt_init - thr->interrupt_counter;
87 thr->
heap->inst_count_interrupt += thr->interrupt_init;
89 "user code, instruction counts: executor=%ld, interrupt=%ld",
90 (
long) thr->
heap->inst_count_exec, (
long) thr->
heap->inst_count_interrupt));
127 "idx_argbase=%ld, num_stack_args=%ld",
129 (
long) idx_argbase, (
long) num_stack_args));
140 i_argbase = idx_argbase;
195 "arguments at index %ld -> %!O "
196 "map at index %ld -> %!O "
197 "mappednames at index %ld -> %!O",
214 idx = num_stack_args - 1;
217 (
long) idx, (
long) i_argbase, (
long) (i_argbase + idx)));
229 (
long) idx, (
long) n_formals));
341 "arguments at index %ld -> %!O "
342 "map at index %ld -> %!O "
343 "mappednames at index %ld -> %!O",
423 num_stack_args = *p_num_stack_args;
459 if (is_constructor_call) {
476 for (i = 0; i < len; i++) {
486 num_stack_args += len;
494 DUK_DDD(
DUK_DDDPRINT(
"bound function handled, num_stack_args=%ld, idx_func=%ld, curr func=%!T",
495 (
long) num_stack_args, (
long) idx_func,
duk_get_tval(ctx, idx_func)));
496 }
while (--sanity > 0);
504#if defined(DUK_USE_ASSERTIONS)
517 *p_num_stack_args = num_stack_args;
563#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
613 act_callee->prev_caller = h_tmp;
630 if (act_caller && act_caller->
func) {
700 DUK_D(
DUK_DPRINT(
"this binding: wanted to use global object, but it is NULL -> using undefined instead"));
707 DUK_DDD(
DUK_DDDPRINT(
"this binding: non-strict, not object/undefined/null -> use ToObject(value)"));
736 goto not_callable_error;
753 goto not_callable_error;
764 *out_tv_func = tv_func;
769#if defined(DUK_USE_PARANOID_ERRORS)
800 vs_min_size += nregs;
803 vs_min_size += num_stack_args;
865 "num_stack_rets=%ld, num_actual_rets=%ld, stack_top=%ld, idx_retbase=%ld, idx_rcbase=%ld",
866 (
long) num_stack_rets, (
long) num_actual_rets, (
long)
duk_get_top(ctx),
867 (
long) idx_retbase, (
long) idx_rcbase));
875 (idx_rcbase > idx_retbase ? idx_rcbase : idx_retbase) +
881 if (idx_rcbase >= idx_retbase) {
882 duk_idx_t count = idx_rcbase - idx_retbase;
886 "(idx_retbase=%ld, idx_rcbase=%ld)", (
long) idx_retbase, (
long) idx_rcbase));
894 for (i = 0; i < count; i++) {
899 duk_idx_t count = idx_retbase - idx_rcbase;
903 "(idx_retbase=%ld, idx_rcbase=%ld)", (
long) idx_retbase, (
long) idx_rcbase));
911 for (i = 0; i < count; i++) {
933 off_stack_all = off_stack_args + 2 *
sizeof(
duk_tval);
1008#if defined(DUK_USE_PREFER_SIZE)
1018 entry_thread_state = thr->
state;
1022 "call_flags=0x%08lx (ignorerec=%ld, constructor=%ld), "
1023 "valstack_top=%ld, idx_func=%ld, idx_args=%ld, rec_depth=%ld/%ld, "
1024 "entry_valstack_bottom_index=%ld, entry_callstack_top=%ld, entry_catchstack_top=%ld, "
1025 "entry_call_recursion_depth=%ld, entry_curr_thread=%p, entry_thread_state=%ld",
1027 (
long) num_stack_args,
1028 (
unsigned long) call_flags,
1033 (
long) (idx_func + 2),
1036 (
long) entry_valstack_bottom_index,
1037 (long) entry_callstack_top,
1038 (
long) entry_catchstack_top,
1039 (long) entry_call_recursion_depth,
1040 (
void *) entry_curr_thread,
1041 (long) entry_thread_state));
1046#if defined(DUK_USE_CPP_EXCEPTIONS)
1070#if defined(DUK_USE_CPP_EXCEPTIONS)
1071 }
catch (duk_internal_exception &exc) {
1077#if defined(DUK_USE_CPP_EXCEPTIONS)
1082 entry_valstack_bottom_index,
1084 entry_catchstack_top,
1085 entry_callstack_top,
1086 entry_call_recursion_depth,
1100#if defined(DUK_USE_CPP_EXCEPTIONS)
1101 catch (std::exception &exc) {
1102 const char *what = exc.what();
1106 DUK_D(
DUK_DPRINT(
"unexpected c++ std::exception (perhaps thrown by user code)"));
1109 }
catch (duk_internal_exception exc) {
1110 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ std::exception"));
1113 entry_valstack_bottom_index,
1115 entry_catchstack_top,
1116 entry_callstack_top,
1117 entry_call_recursion_depth,
1126 DUK_D(
DUK_DPRINT(
"unexpected c++ exception (perhaps thrown by user code)"));
1128 DUK_ERROR_API(thr,
"caught invalid c++ exception (perhaps thrown by user code)");
1129 }
catch (duk_internal_exception exc) {
1130 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ exception"));
1133 entry_valstack_bottom_index,
1135 entry_catchstack_top,
1136 entry_callstack_top,
1137 entry_call_recursion_depth,
1192 DUK_DD(
DUK_DDPRINT(
"duk__handle_call_inner: num_stack_args=%ld, call_flags=0x%08lx, top=%ld",
1193 (
long) num_stack_args, (
long) call_flags, (
long)
duk_get_top(ctx)));
1200#if defined(DUK_USE_PREFER_SIZE)
1210 entry_thread_state = thr->
state;
1220 "call_flags=0x%08lx (ignorerec=%ld, constructor=%ld), "
1221 "valstack_top=%ld, idx_func=%ld, idx_args=%ld, rec_depth=%ld/%ld, "
1222 "entry_valstack_bottom_index=%ld, entry_callstack_top=%ld, entry_catchstack_top=%ld, "
1223 "entry_call_recursion_depth=%ld, entry_curr_thread=%p, entry_thread_state=%ld",
1225 (
long) num_stack_args,
1226 (
unsigned long) call_flags,
1231 (
long) (idx_func + 2),
1234 (
long) entry_valstack_bottom_index,
1235 (long) entry_callstack_top,
1236 (
long) entry_catchstack_top,
1237 (long) entry_call_recursion_depth,
1238 (
void *) entry_curr_thread,
1239 (long) entry_thread_state));
1250 goto thread_state_error;
1257 goto thread_state_error;
1282 DUK_DD(
DUK_DDPRINT(
"ignoring reclimit for this call (probably an errhandler call)"));
1312 tv_func = &tv_func_copy;
1409#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
1410 act->prev_caller =
NULL;
1413#if defined(DUK_USE_DEBUGGER_SUPPORT)
1416 act->
idx_bottom = entry_valstack_bottom_index + idx_func + 2;
1437#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
1439 duk__update_func_caller_prop(thr, func);
1600#if defined(DUK_USE_FASTINT)
1637 }
else if (rc > 1) {
1665#if defined(DUK_USE_FASTINT)
1699 thr->
state = (duk_uint8_t) entry_thread_state;
1715#if defined(DUK_USE_DEBUGGER_SUPPORT)
1716 if (DUK_HEAP_IS_DEBUGGER_ATTACHED(thr->
heap)) {
1718 DUK_ASSERT(thr->interrupt_counter <= thr->interrupt_init);
1719 thr->interrupt_init -= thr->interrupt_counter;
1720 thr->interrupt_counter = 0;
1721 thr->
heap->dbg_force_restart = 1;
1725#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
1726 duk__interrupt_fixup(thr, entry_curr_thread);
1789#if defined(DUK_USE_FASTINT)
1832 thr->
state = (duk_uint8_t) entry_thread_state;
1848#if defined(DUK_USE_DEBUGGER_SUPPORT)
1849 if (DUK_HEAP_IS_DEBUGGER_ATTACHED(thr->
heap)) {
1851 DUK_ASSERT(thr->interrupt_counter <= thr->interrupt_init);
1852 thr->interrupt_init -= thr->interrupt_counter;
1853 thr->interrupt_counter = 0;
1854 thr->
heap->dbg_force_restart = 1;
1858#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
1859 duk__interrupt_fixup(thr, entry_curr_thread);
1902 entry_thread_state = thr->
state;
1907 DUK_DD(
DUK_DDPRINT(
"duk_handle_safe_call: thr=%p, num_stack_args=%ld, num_stack_rets=%ld, "
1908 "valstack_top=%ld, idx_retbase=%ld, rec_depth=%ld/%ld, "
1909 "entry_valstack_bottom_index=%ld, entry_callstack_top=%ld, entry_catchstack_top=%ld, "
1910 "entry_call_recursion_depth=%ld, entry_curr_thread=%p, entry_thread_state=%ld",
1912 (
long) num_stack_args,
1913 (
long) num_stack_rets,
1918 (
long) entry_valstack_bottom_index,
1919 (
long) entry_callstack_top,
1920 (
long) entry_catchstack_top,
1921 (
long) entry_call_recursion_depth,
1922 (
void *) entry_curr_thread,
1923 (
long) entry_thread_state));
1925 if (idx_retbase < 0) {
1939#if defined(DUK_USE_CPP_EXCEPTIONS)
1952 entry_valstack_bottom_index,
1953 entry_callstack_top,
1954 entry_catchstack_top);
1966#if defined(DUK_USE_CPP_EXCEPTIONS)
1967 }
catch (duk_internal_exception &exc) {
1976 entry_valstack_bottom_index,
1977 entry_callstack_top,
1978 entry_catchstack_top,
1989#if defined(DUK_USE_CPP_EXCEPTIONS)
1990 catch (std::exception &exc) {
1991 const char *what = exc.what();
1995 DUK_D(
DUK_DPRINT(
"unexpected c++ std::exception (perhaps thrown by user code)"));
1998 }
catch (duk_internal_exception exc) {
1999 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ std::exception"));
2004 entry_valstack_bottom_index,
2005 entry_callstack_top,
2006 entry_catchstack_top,
2011 DUK_D(
DUK_DPRINT(
"unexpected c++ exception (perhaps thrown by user code)"));
2013 DUK_ERROR_API(thr,
"caught invalid c++ exception (perhaps thrown by user code)");
2014 }
catch (duk_internal_exception exc) {
2015 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ exception"));
2020 entry_valstack_bottom_index,
2021 entry_callstack_top,
2022 entry_catchstack_top,
2034 entry_call_recursion_depth,
2067 goto thread_state_error;
2074 goto thread_state_error;
2137 DUK_ERROR_API(thr,
"not enough stack values for safe_call rc");
2248 thr->
state = (duk_uint8_t) entry_thread_state;
2263#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
2264 duk__interrupt_fixup(thr, entry_curr_thread);
2336#if defined(DUK_USE_ASSERTIONS)
2344 DUK_ASSERT(our_callstack_index < thr->callstack_size);
2364 idx_args = idx_func + 2;
2367 "num_stack_args=%ld, call_flags=0x%08lx (resume=%ld, tailcall=%ld), "
2368 "idx_func=%ld, idx_args=%ld, entry_valstack_bottom_index=%ld",
2370 (
long) num_stack_args,
2371 (
unsigned long) call_flags,
2376 (
long) entry_valstack_bottom_index));
2402 DUK_DDD(
DUK_DDDPRINT(
"final target is a lightfunc/nativefunc, cannot do ecma-to-ecma call"));
2443#if !defined(DUK_USE_TAILCALL)
2456 DUK_DDD(
DUK_DDDPRINT(
"tail call prevented by current activation having DUK_ACT_FLAG_PREVENTYIELD"));
2459 DUK_D(
DUK_DPRINT(
"tail call prevented by function having a notail flag"));
2513#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2514 act->prev_caller =
NULL;
2520#if defined(DUK_USE_DEBUGGER_SUPPORT)
2524#if defined(DUK_USE_REFERENCE_COUNTING)
2529#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2530#if defined(DUK_USE_TAILCALL)
2531#error incorrect options: tail calls enabled with function caller property
2537 duk__update_func_caller_prop(thr, func);
2548 act->
idx_bottom = entry_valstack_bottom_index;
2572 for (i_arg = 0; i_arg < idx_args; i_arg++) {
2584 DUK_DDD(
DUK_DDDPRINT(
"not a tail call, pushing a new activation to callstack, to index %ld",
2590 DUK_DDD(
DUK_DDDPRINT(
"is resume -> no update to current activation (may not even exist)"));
2598 act->
idx_retval = entry_valstack_bottom_index + idx_func;
2616#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2617 act->prev_caller =
NULL;
2622#if defined(DUK_USE_DEBUGGER_SUPPORT)
2625 act->
idx_bottom = entry_valstack_bottom_index + idx_args;
2634#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2635 duk__update_func_caller_prop(thr, func);
CURL_EXTERN int void * arg
#define DUK_UNREACHABLE()
unsigned int duk_small_uint_t
duk_small_int_t duk_ret_t
duk_uint8_t duk_uint_fast8_t
duk_int_fast32_t duk_int_t
duk_uint_fast32_t duk_uint_t
duk_small_int_t duk_bool_t
#define DUK_LJ_TYPE_THROW
#define DUK_ACT_FLAG_TAILCALLED
DUK_INTERNAL_DECL void duk_hthread_callstack_grow(duk_hthread *thr)
#define DUK_TVAL_SET_TVAL(v, x)
#define DUK_ACT_FLAG_PREVENT_YIELD
#define DUK_ERROR_RANGE(thr, msg)
#define DUK_ASSERT_CTX_VALID(ctx)
#define DUK_STRIDX_INT_ARGS
#define DUK_STRIDX_INT_THIS
DUK_EXTERNAL void duk_pop_2(duk_context *ctx)
#define DUK_TVAL_SET_NULL(tv)
DUK_EXTERNAL duk_idx_t duk_normalize_index(duk_context *ctx, duk_idx_t index)
#define DUK_STR_NOT_CALLABLE
#define DUK_HCOMPILEDFUNCTION_GET_CODE_BASE(heap, h)
DUK_INTERNAL_DECL duk_hobject * duk_require_hobject(duk_context *ctx, duk_idx_t index)
#define DUK_ERROR_TYPE(thr, msg)
#define DUK_HOBJECT_HAS_BOUND(h)
DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx(duk_context *ctx, duk_idx_t obj_index, duk_small_int_t stridx)
#define DUK_STRIDX_INT_FORMALS
#define DUK_CALL_FLAG_CONSTRUCTOR_CALL
#define DUK_CAT_GET_TYPE(c)
#define DUK_VSRESIZE_FLAG_THROW
#define DUK_STRIDX_LC_ARGUMENTS
DUK_INTERNAL_DECL void duk_hthread_catchstack_shrink_check(duk_hthread *thr)
#define DUK_TVAL_SET_OBJECT(tv, hptr)
DUK_INTERNAL_DECL void duk_hthread_catchstack_unwind(duk_hthread *thr, duk_size_t new_top)
#define DUK_TVAL_GET_OBJECT(tv)
DUK_INTERNAL_DECL duk_hobject * duk_create_activation_environment_record(duk_hthread *thr, duk_hobject *func, duk_size_t idx_bottom)
#define DUK_HOBJECT_CLASS_OBJECT
#define DUK_STR_INVALID_CALL_ARGS
#define DUK_BIDX_OBJECT_PROTOTYPE
#define DUK_HOBJECT_SET_EXOTIC_ARGUMENTS(h)
#define duk_xdef_prop_index_wec(ctx, obj_index, arr_index)
#define duk_xdef_prop_wec(ctx, obj_index)
#define DUK_TVAL_IS_UNDEFINED(tv)
#define DUK_HOBJECT_IS_COMPILEDFUNCTION(h)
#define DUK_TVAL_GET_LIGHTFUNC_FUNCPTR(tv)
DUK_EXTERNAL duk_idx_t duk_require_top_index(duk_context *ctx)
#define DUK_TVAL_IS_OBJECT(tv)
#define DUK_HOBJECT_HAS_CREATEARGS(h)
#define DUK_PROPDESC_FLAGS_NONE
DUK_EXTERNAL void duk_require_stack(duk_context *ctx, duk_idx_t extra)
#define DUK_TVAL_INCREF(thr, tv)
#define DUK_HOBJECT_CLASS_ARGUMENTS
#define DUK_ERROR_INTERNAL_DEFMSG(thr)
#define DUK_PROPDESC_FLAGS_E
#define DUK_TVAL_GET_TAG(tv)
#define DUK_PROPDESC_FLAGS_WE
#define DUK_HOBJECT_IS_NONBOUND_FUNCTION(h)
#define DUK_VSRESIZE_FLAG_SHRINK
DUK_EXTERNAL void duk_remove(duk_context *ctx, duk_idx_t index)
#define DUK_TVAL_IS_UNUSED(tv)
#define DUK_ACT_FLAG_STRICT
#define DUK_HTHREAD_STRING_INT_VARENV(thr)
#define DUK_ASSERT_DISABLE(x)
#define DUK_HOBJECT_IS_CALLABLE(h)
DUK_EXTERNAL void duk_push_int(duk_context *ctx, duk_int_t val)
#define DUK_CALL_FLAG_IS_RESUME
#define DUK_ERROR_API(thr, msg)
#define DUK_HTHREAD_STRING_INT_LEXENV(thr)
#define DUK_HOBJECT_CLASS_AS_FLAGS(v)
#define DUK_CALL_FLAG_IS_TAILCALL
#define DUK_HTHREAD_STATE_INACTIVE
#define DUK_ACT_FLAG_DIRECT_EVAL
#define DUK_BIDX_GLOBAL_ENV
#define DUK_HOBJECT_IS_ENV(h)
#define DUK_LFUNC_NARGS_VARARGS
DUK_INTERNAL_DECL duk_tval * duk_hobject_find_existing_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_hstring *key)
DUK_EXTERNAL void duk_replace(duk_context *ctx, duk_idx_t to_index)
#define DUK_LJ_TYPE_UNKNOWN
DUK_INTERNAL_DECL void duk_hthread_callstack_unwind(duk_hthread *thr, duk_size_t new_top)
DUK_EXTERNAL void duk_require_stack_top(duk_context *ctx, duk_idx_t top)
#define DUK_TVAL_SET_TVAL_UPDREF
#define DUK_HOBJECT_IS_NATIVEFUNCTION(h)
DUK_EXTERNAL const char * duk_get_string(duk_context *ctx, duk_idx_t index)
#define DUK_ACT_FLAG_CONSTRUCT
DUK_INTERNAL_DECL duk_bool_t duk_valstack_resize_raw(duk_context *ctx, duk_size_t min_new_size, duk_small_uint_t flags)
#define DUK_VSRESIZE_FLAG_COMPACT
#define DUK_TVAL_IS_LIGHTFUNC(tv)
DUK_EXTERNAL void duk_set_top(duk_context *ctx, duk_idx_t index)
#define DUK_HTHREAD_STATE_RUNNING
#define DUK_STRIDX_LENGTH
DUK_EXTERNAL void duk_dup(duk_context *ctx, duk_idx_t from_index)
#define DUK_TVAL_CHKFAST_INPLACE(v)
DUK_EXTERNAL void duk_insert(duk_context *ctx, duk_idx_t to_index)
DUK_EXTERNAL duk_idx_t duk_get_top(duk_context *ctx)
DUK_INTERNAL_DECL void duk_hthread_sync_and_null_currpc(duk_hthread *thr)
DUK_EXTERNAL duk_bool_t duk_get_prop_index(duk_context *ctx, duk_idx_t obj_index, duk_uarridx_t arr_index)
#define DUK_TVAL_IS_HEAP_ALLOCATED(tv)
DUK_INTERNAL_DECL void duk_push_tval(duk_context *ctx, duk_tval *tv)
#define DUK_HOBJECT_HAS_NATIVEFUNCTION(h)
DUK_EXTERNAL void duk_push_uint(duk_context *ctx, duk_uint_t val)
struct duk_tval_struct duk_tval
DUK_EXTERNAL void duk_push_undefined(duk_context *ctx)
#define DUK_STRIDX_INT_TARGET
#define DUK_STR_C_CALLSTACK_LIMIT
#define DUK_TAG_UNDEFINED
#define DUK_PROPDESC_FLAGS_WC
DUK_INTERNAL_DECL duk_tval * duk_require_tval(duk_context *ctx, duk_idx_t index)
DUK_INTERNAL_DECL void duk_xdef_prop_stridx_thrower(duk_context *ctx, duk_idx_t obj_index, duk_small_int_t stridx, duk_small_uint_t desc_flags)
DUK_INTERNAL_DECL void duk_hthread_callstack_shrink_check(duk_hthread *thr)
#define DUK_HOBJECT_BOUND_CHAIN_SANITY
#define DUK_HOBJECT_FLAG_EXTENSIBLE
DUK_INTERNAL_DECL duk_idx_t duk_push_object_helper(duk_context *ctx, duk_uint_t hobject_flags_and_class, duk_small_int_t prototype_bidx)
#define DUK_STRIDX_INT_VARENV
#define DUK_HOBJECT_HAS_NEWENV(h)
#define DUK_VALSTACK_API_ENTRY_MINIMUM
DUK_INTERNAL void duk_error_throw_from_negative_rc(duk_hthread *thr, duk_ret_t rc)
DUK_EXTERNAL void duk_to_object(duk_context *ctx, duk_idx_t index)
DUK_EXTERNAL const char * duk_to_string(duk_context *ctx, duk_idx_t index)
#define DUK_GET_TVAL_POSIDX(ctx, idx)
#define DUK_HOBJECT_INCREF(thr, h)
#define DUK_ACT_GET_FUNC(act)
DUK_EXTERNAL void duk_pop(duk_context *ctx)
DUK_INTERNAL_DECL duk_hobject * duk_get_hobject(duk_context *ctx, duk_idx_t index)
DUK_INTERNAL_DECL void duk_push_hobject(duk_context *ctx, duk_hobject *h)
#define DUK_TVAL_SET_UNDEFINED_UPDREF
#define DUK_STRIDX_INT_MAP
#define DUK_STRIDX_CALLEE
#define DUK_LFUNC_FLAGS_GET_NARGS(lf_flags)
#define DUK_CALL_FLAG_DIRECT_EVAL
DUK_INTERNAL_DECL void duk_xdef_prop_stridx(duk_context *ctx, duk_idx_t obj_index, duk_small_int_t stridx, duk_small_uint_t desc_flags)
#define DUK_CAT_TYPE_LABEL
DUK_EXTERNAL duk_bool_t duk_is_string(duk_context *ctx, duk_idx_t index)
#define DUK_HEAP_SWITCH_THREAD(heap, newthr)
#define DUK_STR_BOUND_CHAIN_LIMIT
#define DUK_TVAL_SET_UNDEFINED(tv)
DUK_EXTERNAL duk_int_t duk_require_int(duk_context *ctx, duk_idx_t index)
DUK_INTERNAL_DECL const char * duk_push_string_tval_readable(duk_context *ctx, duk_tval *tv)
#define DUK_HOBJECT_HAS_STRICT(h)
#define DUK_HOBJECT_HAS_NOTAIL(h)
DUK_INTERNAL_DECL void duk_js_execute_bytecode(duk_hthread *exec_thr)
#define DUK_HOBJECT_INCREF_ALLOWNULL(thr, h)
#define DUK_HTHREAD_STRING_CALLER(thr)
#define DUK_STRIDX_CALLER
#define DUK_ERROR_FMT1(thr, err, fmt, arg1)
#define DUK_HOBJECT_HAS_COMPILEDFUNCTION(h)
#define DUK_TVAL_GET_LIGHTFUNC_FLAGS(tv)
#define DUK_VALSTACK_INTERNAL_EXTRA
#define DUK_HOBJECT_FLAG_ARRAY_PART
DUK_EXTERNAL duk_bool_t duk_has_prop(duk_context *ctx, duk_idx_t obj_index)
DUK_INTERNAL_DECL duk_tval * duk_get_tval(duk_context *ctx, duk_idx_t index)
#define DUK_CALL_FLAG_IGNORE_RECLIMIT
#define DUK_TAG_LIGHTFUNC
#define DUK_ERR_TYPE_ERROR
#define DUK_ERR_API_ERROR
duk_ret_t(* duk_c_function)(duk_context *ctx)
duk_ret_t(* duk_safe_call_function)(duk_context *ctx)
DUK_LOCAL void duk__coerce_effective_this_binding(duk_hthread *thr, duk_hobject *func, duk_idx_t idx_this)
DUK_LOCAL void duk__safe_call_adjust_valstack(duk_hthread *thr, duk_idx_t idx_retbase, duk_idx_t num_stack_rets, duk_idx_t num_actual_rets)
DUK_LOCAL duk_hobject * duk__nonbound_func_lookup(duk_context *ctx, duk_idx_t idx_func, duk_idx_t *out_num_stack_args, duk_tval **out_tv_func, duk_small_uint_t call_flags)
DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr, duk_hobject *func, duk_hobject *varenv, duk_idx_t idx_argbase, duk_idx_t num_stack_args)
DUK_LOCAL duk_idx_t duk__get_idx_func(duk_hthread *thr, duk_idx_t num_stack_args)
DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr, duk_idx_t idx_func, duk_idx_t *p_num_stack_args, duk_bool_t is_constructor_call)
DUK_LOCAL void duk__handle_oldenv_for_call(duk_hthread *thr, duk_hobject *func, duk_activation *act)
DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr, duk_safe_call_function func, duk_idx_t num_stack_args, duk_idx_t num_stack_rets)
DUK_LOCAL void duk__adjust_valstack_and_top(duk_hthread *thr, duk_idx_t num_stack_args, duk_idx_t idx_args, duk_idx_t nregs, duk_idx_t nargs, duk_hobject *func)
DUK_LOCAL void duk__handle_safe_call_error(duk_hthread *thr, duk_idx_t idx_retbase, duk_idx_t num_stack_rets, duk_size_t entry_valstack_bottom_index, duk_size_t entry_callstack_top, duk_size_t entry_catchstack_top, duk_jmpbuf *old_jmpbuf_ptr)
DUK_LOCAL void duk__handle_call_inner(duk_hthread *thr, duk_idx_t num_stack_args, duk_small_uint_t call_flags, duk_idx_t idx_func)
DUK_LOCAL void duk__handle_call_error(duk_hthread *thr, duk_size_t entry_valstack_bottom_index, duk_size_t entry_valstack_end, duk_size_t entry_catchstack_top, duk_size_t entry_callstack_top, duk_int_t entry_call_recursion_depth, duk_hthread *entry_curr_thread, duk_uint_fast8_t entry_thread_state, duk_instr_t **entry_ptr_curr_pc, duk_idx_t idx_func, duk_jmpbuf *old_jmpbuf_ptr)
DUK_LOCAL void duk__handle_safe_call_shared(duk_hthread *thr, duk_idx_t idx_retbase, duk_idx_t num_stack_rets, duk_int_t entry_call_recursion_depth, duk_hthread *entry_curr_thread, duk_uint_fast8_t entry_thread_state, duk_instr_t **entry_ptr_curr_pc)
DUK_INTERNAL void duk_handle_call_unprotected(duk_hthread *thr, duk_idx_t num_stack_args, duk_small_uint_t call_flags)
DUK_LOCAL void duk__handle_createargs_for_call(duk_hthread *thr, duk_hobject *func, duk_hobject *env, duk_idx_t num_stack_args)
DUK_INTERNAL duk_int_t duk_handle_call_protected(duk_hthread *thr, duk_idx_t num_stack_args, duk_small_uint_t call_flags)
DUK_LOCAL void duk__handle_safe_call_inner(duk_hthread *thr, duk_safe_call_function func, duk_idx_t idx_retbase, duk_idx_t num_stack_rets, duk_size_t entry_valstack_bottom_index, duk_size_t entry_callstack_top, duk_size_t entry_catchstack_top)
DUK_INTERNAL duk_bool_t duk_handle_ecma_call_setup(duk_hthread *thr, duk_idx_t num_stack_args, duk_small_uint_t call_flags)
duk_size_t callstack_index
duk_int_t call_recursion_limit
duk_hthread * curr_thread
duk_int_t call_recursion_depth
duk_hobject * builtins[DUK_NUM_BUILTINS]
duk_size_t catchstack_top
duk_size_t callstack_preventcount
duk_instr_t ** ptr_curr_pc
duk_size_t callstack_size
duk_activation * callstack
duk_tval * valstack_bottom