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) {
474 for (i = 0; i < len; i++) {
484 num_stack_args += len;
492 DUK_DDD(
DUK_DDDPRINT(
"bound function handled, num_stack_args=%ld, idx_func=%ld, curr func=%!T",
493 (
long) num_stack_args, (
long) idx_func,
duk_get_tval(ctx, idx_func)));
494 }
while (--sanity > 0);
502#if defined(DUK_USE_ASSERTIONS)
515 *p_num_stack_args = num_stack_args;
561#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
611 act_callee->prev_caller = h_tmp;
628 if (act_caller && act_caller->
func) {
698 DUK_D(
DUK_DPRINT(
"this binding: wanted to use global object, but it is NULL -> using undefined instead"));
705 DUK_DDD(
DUK_DDDPRINT(
"this binding: non-strict, not object/undefined/null -> use ToObject(value)"));
734 goto not_callable_error;
751 goto not_callable_error;
762 *out_tv_func = tv_func;
767#if defined(DUK_USE_PARANOID_ERRORS)
798 vs_min_size += nregs;
801 vs_min_size += num_stack_args;
863 "num_stack_rets=%ld, num_actual_rets=%ld, stack_top=%ld, idx_retbase=%ld, idx_rcbase=%ld",
864 (
long) num_stack_rets, (
long) num_actual_rets, (
long)
duk_get_top(ctx),
865 (
long) idx_retbase, (
long) idx_rcbase));
873 (idx_rcbase > idx_retbase ? idx_rcbase : idx_retbase) +
879 if (idx_rcbase >= idx_retbase) {
880 duk_idx_t count = idx_rcbase - idx_retbase;
884 "(idx_retbase=%ld, idx_rcbase=%ld)", (
long) idx_retbase, (
long) idx_rcbase));
892 for (i = 0; i < count; i++) {
897 duk_idx_t count = idx_retbase - idx_rcbase;
901 "(idx_retbase=%ld, idx_rcbase=%ld)", (
long) idx_retbase, (
long) idx_rcbase));
909 for (i = 0; i < count; i++) {
931 off_stack_all = off_stack_args + 2 *
sizeof(
duk_tval);
1006#if defined(DUK_USE_PREFER_SIZE)
1016 entry_thread_state = thr->
state;
1020 "call_flags=0x%08lx (ignorerec=%ld, constructor=%ld), "
1021 "valstack_top=%ld, idx_func=%ld, idx_args=%ld, rec_depth=%ld/%ld, "
1022 "entry_valstack_bottom_index=%ld, entry_callstack_top=%ld, entry_catchstack_top=%ld, "
1023 "entry_call_recursion_depth=%ld, entry_curr_thread=%p, entry_thread_state=%ld",
1025 (
long) num_stack_args,
1026 (
unsigned long) call_flags,
1031 (
long) (idx_func + 2),
1034 (
long) entry_valstack_bottom_index,
1035 (long) entry_callstack_top,
1036 (
long) entry_catchstack_top,
1037 (long) entry_call_recursion_depth,
1038 (
void *) entry_curr_thread,
1039 (long) entry_thread_state));
1044#if defined(DUK_USE_CPP_EXCEPTIONS)
1068#if defined(DUK_USE_CPP_EXCEPTIONS)
1069 }
catch (duk_internal_exception &exc) {
1075#if defined(DUK_USE_CPP_EXCEPTIONS)
1080 entry_valstack_bottom_index,
1082 entry_catchstack_top,
1083 entry_callstack_top,
1084 entry_call_recursion_depth,
1098#if defined(DUK_USE_CPP_EXCEPTIONS)
1099 catch (std::exception &exc) {
1100 const char *what = exc.what();
1104 DUK_D(
DUK_DPRINT(
"unexpected c++ std::exception (perhaps thrown by user code)"));
1107 }
catch (duk_internal_exception exc) {
1108 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ std::exception"));
1111 entry_valstack_bottom_index,
1113 entry_catchstack_top,
1114 entry_callstack_top,
1115 entry_call_recursion_depth,
1124 DUK_D(
DUK_DPRINT(
"unexpected c++ exception (perhaps thrown by user code)"));
1126 DUK_ERROR_API(thr,
"caught invalid c++ exception (perhaps thrown by user code)");
1127 }
catch (duk_internal_exception exc) {
1128 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ exception"));
1131 entry_valstack_bottom_index,
1133 entry_catchstack_top,
1134 entry_callstack_top,
1135 entry_call_recursion_depth,
1190 DUK_DD(
DUK_DDPRINT(
"duk__handle_call_inner: num_stack_args=%ld, call_flags=0x%08lx, top=%ld",
1191 (
long) num_stack_args, (
long) call_flags, (
long)
duk_get_top(ctx)));
1198#if defined(DUK_USE_PREFER_SIZE)
1208 entry_thread_state = thr->
state;
1218 "call_flags=0x%08lx (ignorerec=%ld, constructor=%ld), "
1219 "valstack_top=%ld, idx_func=%ld, idx_args=%ld, rec_depth=%ld/%ld, "
1220 "entry_valstack_bottom_index=%ld, entry_callstack_top=%ld, entry_catchstack_top=%ld, "
1221 "entry_call_recursion_depth=%ld, entry_curr_thread=%p, entry_thread_state=%ld",
1223 (
long) num_stack_args,
1224 (
unsigned long) call_flags,
1229 (
long) (idx_func + 2),
1232 (
long) entry_valstack_bottom_index,
1233 (long) entry_callstack_top,
1234 (
long) entry_catchstack_top,
1235 (long) entry_call_recursion_depth,
1236 (
void *) entry_curr_thread,
1237 (long) entry_thread_state));
1248 goto thread_state_error;
1255 goto thread_state_error;
1280 DUK_DD(
DUK_DDPRINT(
"ignoring reclimit for this call (probably an errhandler call)"));
1310 tv_func = &tv_func_copy;
1407#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
1408 act->prev_caller =
NULL;
1411#if defined(DUK_USE_DEBUGGER_SUPPORT)
1414 act->
idx_bottom = entry_valstack_bottom_index + idx_func + 2;
1435#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
1437 duk__update_func_caller_prop(thr, func);
1596#if defined(DUK_USE_FASTINT)
1633 }
else if (rc > 1) {
1661#if defined(DUK_USE_FASTINT)
1695 thr->
state = (duk_uint8_t) entry_thread_state;
1711#if defined(DUK_USE_DEBUGGER_SUPPORT)
1712 if (DUK_HEAP_IS_DEBUGGER_ATTACHED(thr->
heap)) {
1714 DUK_ASSERT(thr->interrupt_counter <= thr->interrupt_init);
1715 thr->interrupt_init -= thr->interrupt_counter;
1716 thr->interrupt_counter = 0;
1717 thr->
heap->dbg_force_restart = 1;
1721#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
1722 duk__interrupt_fixup(thr, entry_curr_thread);
1785#if defined(DUK_USE_FASTINT)
1828 thr->
state = (duk_uint8_t) entry_thread_state;
1844#if defined(DUK_USE_DEBUGGER_SUPPORT)
1845 if (DUK_HEAP_IS_DEBUGGER_ATTACHED(thr->
heap)) {
1847 DUK_ASSERT(thr->interrupt_counter <= thr->interrupt_init);
1848 thr->interrupt_init -= thr->interrupt_counter;
1849 thr->interrupt_counter = 0;
1850 thr->
heap->dbg_force_restart = 1;
1854#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
1855 duk__interrupt_fixup(thr, entry_curr_thread);
1898 entry_thread_state = thr->
state;
1903 DUK_DD(
DUK_DDPRINT(
"duk_handle_safe_call: thr=%p, num_stack_args=%ld, num_stack_rets=%ld, "
1904 "valstack_top=%ld, idx_retbase=%ld, rec_depth=%ld/%ld, "
1905 "entry_valstack_bottom_index=%ld, entry_callstack_top=%ld, entry_catchstack_top=%ld, "
1906 "entry_call_recursion_depth=%ld, entry_curr_thread=%p, entry_thread_state=%ld",
1908 (
long) num_stack_args,
1909 (
long) num_stack_rets,
1914 (
long) entry_valstack_bottom_index,
1915 (
long) entry_callstack_top,
1916 (
long) entry_catchstack_top,
1917 (
long) entry_call_recursion_depth,
1918 (
void *) entry_curr_thread,
1919 (
long) entry_thread_state));
1921 if (idx_retbase < 0) {
1935#if defined(DUK_USE_CPP_EXCEPTIONS)
1948 entry_valstack_bottom_index,
1949 entry_callstack_top,
1950 entry_catchstack_top);
1962#if defined(DUK_USE_CPP_EXCEPTIONS)
1963 }
catch (duk_internal_exception &exc) {
1972 entry_valstack_bottom_index,
1973 entry_callstack_top,
1974 entry_catchstack_top,
1985#if defined(DUK_USE_CPP_EXCEPTIONS)
1986 catch (std::exception &exc) {
1987 const char *what = exc.what();
1991 DUK_D(
DUK_DPRINT(
"unexpected c++ std::exception (perhaps thrown by user code)"));
1994 }
catch (duk_internal_exception exc) {
1995 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ std::exception"));
2000 entry_valstack_bottom_index,
2001 entry_callstack_top,
2002 entry_catchstack_top,
2007 DUK_D(
DUK_DPRINT(
"unexpected c++ exception (perhaps thrown by user code)"));
2009 DUK_ERROR_API(thr,
"caught invalid c++ exception (perhaps thrown by user code)");
2010 }
catch (duk_internal_exception exc) {
2011 DUK_D(
DUK_DPRINT(
"caught api error thrown from unexpected c++ exception"));
2016 entry_valstack_bottom_index,
2017 entry_callstack_top,
2018 entry_catchstack_top,
2030 entry_call_recursion_depth,
2063 goto thread_state_error;
2070 goto thread_state_error;
2133 DUK_ERROR_API(thr,
"not enough stack values for safe_call rc");
2244 thr->
state = (duk_uint8_t) entry_thread_state;
2259#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
2260 duk__interrupt_fixup(thr, entry_curr_thread);
2332#if defined(DUK_USE_ASSERTIONS)
2340 DUK_ASSERT(our_callstack_index < thr->callstack_size);
2360 idx_args = idx_func + 2;
2363 "num_stack_args=%ld, call_flags=0x%08lx (resume=%ld, tailcall=%ld), "
2364 "idx_func=%ld, idx_args=%ld, entry_valstack_bottom_index=%ld",
2366 (
long) num_stack_args,
2367 (
unsigned long) call_flags,
2372 (
long) entry_valstack_bottom_index));
2398 DUK_DDD(
DUK_DDDPRINT(
"final target is a lightfunc/nativefunc, cannot do ecma-to-ecma call"));
2439#if !defined(DUK_USE_TAILCALL)
2452 DUK_DDD(
DUK_DDDPRINT(
"tail call prevented by current activation having DUK_ACT_FLAG_PREVENTYIELD"));
2455 DUK_D(
DUK_DPRINT(
"tail call prevented by function having a notail flag"));
2509#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2510 act->prev_caller =
NULL;
2516#if defined(DUK_USE_DEBUGGER_SUPPORT)
2520#if defined(DUK_USE_REFERENCE_COUNTING)
2525#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2526#if defined(DUK_USE_TAILCALL)
2527#error incorrect options: tail calls enabled with function caller property
2533 duk__update_func_caller_prop(thr, func);
2544 act->
idx_bottom = entry_valstack_bottom_index;
2568 for (i_arg = 0; i_arg < idx_args; i_arg++) {
2580 DUK_DDD(
DUK_DDDPRINT(
"not a tail call, pushing a new activation to callstack, to index %ld",
2586 DUK_DDD(
DUK_DDDPRINT(
"is resume -> no update to current activation (may not even exist)"));
2594 act->
idx_retval = entry_valstack_bottom_index + idx_func;
2612#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2613 act->prev_caller =
NULL;
2618#if defined(DUK_USE_DEBUGGER_SUPPORT)
2621 act->
idx_bottom = entry_valstack_bottom_index + idx_args;
2630#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
2631 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