NetSurf
Data Structures | Macros | Typedefs | Functions | Variables
duktape.h File Reference
#include "duk_config.h"
Include dependency graph for duktape.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  duk_thread_state
 
struct  duk_memory_functions
 
struct  duk_function_list_entry
 
struct  duk_number_list_entry
 
struct  duk_time_components
 

Macros

#define DUK_SINGLE_FILE
 
#define DUK_VERSION   20700L
 
#define DUK_GIT_COMMIT   "external"
 
#define DUK_GIT_DESCRIBE   "external"
 
#define DUK_GIT_BRANCH   "external"
 
#define DUK_API_NORETURN(decl)   DUK_NORETURN(decl)
 
#define DUK_DEBUG_PROTOCOL_VERSION   2
 
#define DUK_INVALID_INDEX   DUK_IDX_MIN
 
#define DUK_VARARGS   ((duk_int_t) (-1))
 
#define DUK_API_ENTRY_STACK   64U
 
#define DUK_TYPE_MIN   0U
 
#define DUK_TYPE_NONE   0U /* no value, e.g. invalid index */
 
#define DUK_TYPE_UNDEFINED   1U /* ECMAScript undefined */
 
#define DUK_TYPE_NULL   2U /* ECMAScript null */
 
#define DUK_TYPE_BOOLEAN   3U /* ECMAScript boolean: 0 or 1 */
 
#define DUK_TYPE_NUMBER   4U /* ECMAScript number: double */
 
#define DUK_TYPE_STRING   5U /* ECMAScript string: CESU-8 / extended UTF-8 encoded */
 
#define DUK_TYPE_OBJECT   6U /* ECMAScript object: includes objects, arrays, functions, threads */
 
#define DUK_TYPE_BUFFER   7U /* fixed or dynamic, garbage collected byte buffer */
 
#define DUK_TYPE_POINTER   8U /* raw void pointer */
 
#define DUK_TYPE_LIGHTFUNC   9U /* lightweight function pointer */
 
#define DUK_TYPE_MAX   9U
 
#define DUK_TYPE_MASK_NONE   (1U << DUK_TYPE_NONE)
 
#define DUK_TYPE_MASK_UNDEFINED   (1U << DUK_TYPE_UNDEFINED)
 
#define DUK_TYPE_MASK_NULL   (1U << DUK_TYPE_NULL)
 
#define DUK_TYPE_MASK_BOOLEAN   (1U << DUK_TYPE_BOOLEAN)
 
#define DUK_TYPE_MASK_NUMBER   (1U << DUK_TYPE_NUMBER)
 
#define DUK_TYPE_MASK_STRING   (1U << DUK_TYPE_STRING)
 
#define DUK_TYPE_MASK_OBJECT   (1U << DUK_TYPE_OBJECT)
 
#define DUK_TYPE_MASK_BUFFER   (1U << DUK_TYPE_BUFFER)
 
#define DUK_TYPE_MASK_POINTER   (1U << DUK_TYPE_POINTER)
 
#define DUK_TYPE_MASK_LIGHTFUNC   (1U << DUK_TYPE_LIGHTFUNC)
 
#define DUK_TYPE_MASK_THROW   (1U << 10) /* internal flag value: throw if mask doesn't match */
 
#define DUK_TYPE_MASK_PROMOTE   (1U << 11) /* internal flag value: promote to object if mask matches */
 
#define DUK_HINT_NONE
 
#define DUK_HINT_STRING   1 /* prefer string */
 
#define DUK_HINT_NUMBER   2 /* prefer number */
 
#define DUK_ENUM_INCLUDE_NONENUMERABLE   (1U << 0) /* enumerate non-numerable properties in addition to enumerable */
 
#define DUK_ENUM_INCLUDE_HIDDEN   (1U << 1) /* enumerate hidden symbols too (in Duktape 1.x called internal properties) */
 
#define DUK_ENUM_INCLUDE_SYMBOLS   (1U << 2) /* enumerate symbols */
 
#define DUK_ENUM_EXCLUDE_STRINGS   (1U << 3) /* exclude strings */
 
#define DUK_ENUM_OWN_PROPERTIES_ONLY   (1U << 4) /* don't walk prototype chain, only check own properties */
 
#define DUK_ENUM_ARRAY_INDICES_ONLY   (1U << 5) /* only enumerate array indices */
 
#define DUK_ENUM_SORT_ARRAY_INDICES   (1U << 6) /* sort array indices (applied to full enumeration result, including inherited array indices); XXX: misleading name */
 
#define DUK_ENUM_NO_PROXY_BEHAVIOR   (1U << 7) /* enumerate a proxy object itself without invoking proxy behavior */
 
#define DUK_COMPILE_EVAL   (1U << 3) /* compile eval code (instead of global code) */
 
#define DUK_COMPILE_FUNCTION   (1U << 4) /* compile function code (instead of global code) */
 
#define DUK_COMPILE_STRICT   (1U << 5) /* use strict (outer) context for global, eval, or function code */
 
#define DUK_COMPILE_SHEBANG   (1U << 6) /* allow shebang ('#! ...') comment on first line of source */
 
#define DUK_COMPILE_SAFE   (1U << 7) /* (internal) catch compilation errors */
 
#define DUK_COMPILE_NORESULT   (1U << 8) /* (internal) omit eval result */
 
#define DUK_COMPILE_NOSOURCE   (1U << 9) /* (internal) no source string on stack */
 
#define DUK_COMPILE_STRLEN   (1U << 10) /* (internal) take strlen() of src_buffer (avoids double evaluation in macro) */
 
#define DUK_COMPILE_NOFILENAME   (1U << 11) /* (internal) no filename on stack */
 
#define DUK_COMPILE_FUNCEXPR   (1U << 12) /* (internal) source is a function expression (used for Function constructor) */
 
#define DUK_DEFPROP_WRITABLE   (1U << 0) /* set writable (effective if DUK_DEFPROP_HAVE_WRITABLE set) */
 
#define DUK_DEFPROP_ENUMERABLE   (1U << 1) /* set enumerable (effective if DUK_DEFPROP_HAVE_ENUMERABLE set) */
 
#define DUK_DEFPROP_CONFIGURABLE   (1U << 2) /* set configurable (effective if DUK_DEFPROP_HAVE_CONFIGURABLE set) */
 
#define DUK_DEFPROP_HAVE_WRITABLE   (1U << 3) /* set/clear writable */
 
#define DUK_DEFPROP_HAVE_ENUMERABLE   (1U << 4) /* set/clear enumerable */
 
#define DUK_DEFPROP_HAVE_CONFIGURABLE   (1U << 5) /* set/clear configurable */
 
#define DUK_DEFPROP_HAVE_VALUE   (1U << 6) /* set value (given on value stack) */
 
#define DUK_DEFPROP_HAVE_GETTER   (1U << 7) /* set getter (given on value stack) */
 
#define DUK_DEFPROP_HAVE_SETTER   (1U << 8) /* set setter (given on value stack) */
 
#define DUK_DEFPROP_FORCE   (1U << 9) /* force change if possible, may still fail for e.g. virtual properties */
 
#define DUK_DEFPROP_SET_WRITABLE   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_WRITABLE)
 
#define DUK_DEFPROP_CLEAR_WRITABLE   DUK_DEFPROP_HAVE_WRITABLE
 
#define DUK_DEFPROP_SET_ENUMERABLE   (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_ENUMERABLE)
 
#define DUK_DEFPROP_CLEAR_ENUMERABLE   DUK_DEFPROP_HAVE_ENUMERABLE
 
#define DUK_DEFPROP_SET_CONFIGURABLE   (DUK_DEFPROP_HAVE_CONFIGURABLE | DUK_DEFPROP_CONFIGURABLE)
 
#define DUK_DEFPROP_CLEAR_CONFIGURABLE   DUK_DEFPROP_HAVE_CONFIGURABLE
 
#define DUK_DEFPROP_W   DUK_DEFPROP_WRITABLE
 
#define DUK_DEFPROP_E   DUK_DEFPROP_ENUMERABLE
 
#define DUK_DEFPROP_C   DUK_DEFPROP_CONFIGURABLE
 
#define DUK_DEFPROP_WE   (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE)
 
#define DUK_DEFPROP_WC   (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_CONFIGURABLE)
 
#define DUK_DEFPROP_EC   (DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
 
#define DUK_DEFPROP_WEC   (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
 
#define DUK_DEFPROP_HAVE_W   DUK_DEFPROP_HAVE_WRITABLE
 
#define DUK_DEFPROP_HAVE_E   DUK_DEFPROP_HAVE_ENUMERABLE
 
#define DUK_DEFPROP_HAVE_C   DUK_DEFPROP_HAVE_CONFIGURABLE
 
#define DUK_DEFPROP_HAVE_WE   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE)
 
#define DUK_DEFPROP_HAVE_WC   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
 
#define DUK_DEFPROP_HAVE_EC   (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
 
#define DUK_DEFPROP_HAVE_WEC   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
 
#define DUK_DEFPROP_SET_W   DUK_DEFPROP_SET_WRITABLE
 
#define DUK_DEFPROP_SET_E   DUK_DEFPROP_SET_ENUMERABLE
 
#define DUK_DEFPROP_SET_C   DUK_DEFPROP_SET_CONFIGURABLE
 
#define DUK_DEFPROP_SET_WE   (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE)
 
#define DUK_DEFPROP_SET_WC   (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_CONFIGURABLE)
 
#define DUK_DEFPROP_SET_EC   (DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
 
#define DUK_DEFPROP_SET_WEC   (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
 
#define DUK_DEFPROP_CLEAR_W   DUK_DEFPROP_CLEAR_WRITABLE
 
#define DUK_DEFPROP_CLEAR_E   DUK_DEFPROP_CLEAR_ENUMERABLE
 
#define DUK_DEFPROP_CLEAR_C   DUK_DEFPROP_CLEAR_CONFIGURABLE
 
#define DUK_DEFPROP_CLEAR_WE   (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE)
 
#define DUK_DEFPROP_CLEAR_WC   (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
 
#define DUK_DEFPROP_CLEAR_EC   (DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
 
#define DUK_DEFPROP_CLEAR_WEC   (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
 
#define DUK_DEFPROP_ATTR_W   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_W)
 
#define DUK_DEFPROP_ATTR_E   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_E)
 
#define DUK_DEFPROP_ATTR_C   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_C)
 
#define DUK_DEFPROP_ATTR_WE   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WE)
 
#define DUK_DEFPROP_ATTR_WC   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WC)
 
#define DUK_DEFPROP_ATTR_EC   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_EC)
 
#define DUK_DEFPROP_ATTR_WEC   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WEC)
 
#define DUK_THREAD_NEW_GLOBAL_ENV   (1U << 0) /* create a new global environment */
 
#define DUK_GC_COMPACT   (1U << 0) /* compact heap objects */
 
#define DUK_ERR_NONE   0 /* no error (e.g. from duk_get_error_code()) */
 
#define DUK_ERR_ERROR   1 /* Error */
 
#define DUK_ERR_EVAL_ERROR   2 /* EvalError */
 
#define DUK_ERR_RANGE_ERROR   3 /* RangeError */
 
#define DUK_ERR_REFERENCE_ERROR   4 /* ReferenceError */
 
#define DUK_ERR_SYNTAX_ERROR   5 /* SyntaxError */
 
#define DUK_ERR_TYPE_ERROR   6 /* TypeError */
 
#define DUK_ERR_URI_ERROR   7 /* URIError */
 
#define DUK_RET_ERROR   (-DUK_ERR_ERROR)
 
#define DUK_RET_EVAL_ERROR   (-DUK_ERR_EVAL_ERROR)
 
#define DUK_RET_RANGE_ERROR   (-DUK_ERR_RANGE_ERROR)
 
#define DUK_RET_REFERENCE_ERROR   (-DUK_ERR_REFERENCE_ERROR)
 
#define DUK_RET_SYNTAX_ERROR   (-DUK_ERR_SYNTAX_ERROR)
 
#define DUK_RET_TYPE_ERROR   (-DUK_ERR_TYPE_ERROR)
 
#define DUK_RET_URI_ERROR   (-DUK_ERR_URI_ERROR)
 
#define DUK_EXEC_SUCCESS   0
 
#define DUK_EXEC_ERROR   1
 
#define DUK_LEVEL_DEBUG   0
 
#define DUK_LEVEL_DDEBUG   1
 
#define DUK_LEVEL_DDDEBUG   2
 
#define DUK_HIDDEN_SYMBOL(x)   ("\xFF" x)
 
#define DUK_GLOBAL_SYMBOL(x)   ("\x80" x)
 
#define DUK_LOCAL_SYMBOL(x, uniq)   ("\x81" x "\xff" uniq)
 
#define DUK_WELLKNOWN_SYMBOL(x)   ("\x81" x "\xff")
 
#define DUK_INTERNAL_SYMBOL(x)   ("\x82" x)
 
#define duk_create_heap_default()    duk_create_heap(NULL, NULL, NULL, NULL, NULL)
 
#define duk_throw(ctx)    (duk_throw_raw((ctx)), (duk_ret_t) 0)
 
#define duk_fatal(ctx, err_msg)    (duk_fatal_raw((ctx), (err_msg)), (duk_ret_t) 0)
 
#define duk_error
 
#define duk_generic_error
 
#define duk_eval_error
 
#define duk_range_error
 
#define duk_reference_error
 
#define duk_syntax_error
 
#define duk_type_error
 
#define duk_uri_error
 
#define duk_error_va(ctx, err_code, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_generic_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_eval_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_EVAL_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_range_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_RANGE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_reference_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_REFERENCE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_syntax_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_SYNTAX_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_type_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_TYPE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_uri_error_va(ctx, fmt, ap)    (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_URI_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)
 
#define duk_xmove_top(to_ctx, from_ctx, count)    duk_xcopymove_raw((to_ctx), (from_ctx), (count), 0 /*is_copy*/)
 
#define duk_xcopy_top(to_ctx, from_ctx, count)    duk_xcopymove_raw((to_ctx), (from_ctx), (count), 1 /*is_copy*/)
 
#define duk_push_literal(ctx, cstring)   duk_push_literal_raw((ctx), (cstring), sizeof((cstring)) - 1U)
 
#define duk_push_thread(ctx)    duk_push_thread_raw((ctx), 0 /*flags*/)
 
#define duk_push_thread_new_globalenv(ctx)    duk_push_thread_raw((ctx), DUK_THREAD_NEW_GLOBAL_ENV /*flags*/)
 
#define duk_push_error_object
 
#define duk_push_error_object_va(ctx, err_code, fmt, ap)    duk_push_error_object_va_raw((ctx), (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap))
 
#define DUK_BUF_FLAG_DYNAMIC   (1 << 0) /* internal flag: dynamic buffer */
 
#define DUK_BUF_FLAG_EXTERNAL   (1 << 1) /* internal flag: external buffer */
 
#define DUK_BUF_FLAG_NOZERO   (1 << 2) /* internal flag: don't zero allocated buffer */
 
#define duk_push_buffer(ctx, size, dynamic)    duk_push_buffer_raw((ctx), (size), (dynamic) ? DUK_BUF_FLAG_DYNAMIC : 0)
 
#define duk_push_fixed_buffer(ctx, size)    duk_push_buffer_raw((ctx), (size), 0 /*flags*/)
 
#define duk_push_dynamic_buffer(ctx, size)    duk_push_buffer_raw((ctx), (size), DUK_BUF_FLAG_DYNAMIC /*flags*/)
 
#define duk_push_external_buffer(ctx)    ((void) duk_push_buffer_raw((ctx), 0, DUK_BUF_FLAG_DYNAMIC | DUK_BUF_FLAG_EXTERNAL))
 
#define DUK_BUFOBJ_ARRAYBUFFER   0
 
#define DUK_BUFOBJ_NODEJS_BUFFER   1
 
#define DUK_BUFOBJ_DATAVIEW   2
 
#define DUK_BUFOBJ_INT8ARRAY   3
 
#define DUK_BUFOBJ_UINT8ARRAY   4
 
#define DUK_BUFOBJ_UINT8CLAMPEDARRAY   5
 
#define DUK_BUFOBJ_INT16ARRAY   6
 
#define DUK_BUFOBJ_UINT16ARRAY   7
 
#define DUK_BUFOBJ_INT32ARRAY   8
 
#define DUK_BUFOBJ_UINT32ARRAY   9
 
#define DUK_BUFOBJ_FLOAT32ARRAY   10
 
#define DUK_BUFOBJ_FLOAT64ARRAY   11
 
#define duk_is_null_or_undefined(ctx, idx)    ((duk_get_type_mask((ctx), (idx)) & (DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_UNDEFINED)) ? 1 : 0)
 
#define duk_is_callable(ctx, idx)    duk_is_function((ctx), (idx))
 
#define duk_is_primitive(ctx, idx)
 
#define duk_is_object_coercible(ctx, idx)
 
#define duk_is_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) != 0)
 
#define duk_is_eval_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) == DUK_ERR_EVAL_ERROR)
 
#define duk_is_range_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) == DUK_ERR_RANGE_ERROR)
 
#define duk_is_reference_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) == DUK_ERR_REFERENCE_ERROR)
 
#define duk_is_syntax_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) == DUK_ERR_SYNTAX_ERROR)
 
#define duk_is_type_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) == DUK_ERR_TYPE_ERROR)
 
#define duk_is_uri_error(ctx, idx)    (duk_get_error_code((ctx), (idx)) == DUK_ERR_URI_ERROR)
 
#define duk_require_type_mask(ctx, idx, mask)    ((void) duk_check_type_mask((ctx), (idx), (mask) | DUK_TYPE_MASK_THROW))
 
#define duk_require_callable(ctx, idx)    duk_require_function((ctx), (idx))
 
#define duk_require_object_coercible(ctx, idx)
 
#define DUK_BUF_MODE_FIXED   0 /* internal: request fixed buffer result */
 
#define DUK_BUF_MODE_DYNAMIC   1 /* internal: request dynamic buffer result */
 
#define DUK_BUF_MODE_DONTCARE   2 /* internal: don't care about fixed/dynamic nature */
 
#define duk_to_buffer(ctx, idx, out_size)    duk_to_buffer_raw((ctx), (idx), (out_size), DUK_BUF_MODE_DONTCARE)
 
#define duk_to_fixed_buffer(ctx, idx, out_size)    duk_to_buffer_raw((ctx), (idx), (out_size), DUK_BUF_MODE_FIXED)
 
#define duk_to_dynamic_buffer(ctx, idx, out_size)    duk_to_buffer_raw((ctx), (idx), (out_size), DUK_BUF_MODE_DYNAMIC)
 
#define duk_safe_to_string(ctx, idx)    duk_safe_to_lstring((ctx), (idx), NULL)
 
#define duk_get_prop_literal(ctx, obj_idx, key)   duk_get_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)
 
#define duk_put_prop_literal(ctx, obj_idx, key)   duk_put_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)
 
#define duk_del_prop_literal(ctx, obj_idx, key)   duk_del_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)
 
#define duk_has_prop_literal(ctx, obj_idx, key)   duk_has_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)
 
#define duk_get_global_literal(ctx, key)   duk_get_global_literal_raw((ctx), (key), sizeof((key)) - 1U)
 
#define duk_put_global_literal(ctx, key)   duk_put_global_literal_raw((ctx), (key), sizeof((key)) - 1U)
 
#define duk_eval(ctx)    ((void) duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOFILENAME))
 
#define duk_eval_noresult(ctx)    ((void) duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))
 
#define duk_peval(ctx)    (duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOFILENAME))
 
#define duk_peval_noresult(ctx)    (duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))
 
#define duk_compile(ctx, flags)    ((void) duk_compile_raw((ctx), NULL, 0, 2 /*args*/ | (flags)))
 
#define duk_pcompile(ctx, flags)    (duk_compile_raw((ctx), NULL, 0, 2 /*args*/ | (flags) | DUK_COMPILE_SAFE))
 
#define duk_eval_string(ctx, src)    ((void) duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))
 
#define duk_eval_string_noresult(ctx, src)    ((void) duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))
 
#define duk_peval_string(ctx, src)    (duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))
 
#define duk_peval_string_noresult(ctx, src)    (duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))
 
#define duk_compile_string(ctx, flags, src)    ((void) duk_compile_raw((ctx), (src), 0, 0 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))
 
#define duk_compile_string_filename(ctx, flags, src)    ((void) duk_compile_raw((ctx), (src), 0, 1 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN))
 
#define duk_pcompile_string(ctx, flags, src)    (duk_compile_raw((ctx), (src), 0, 0 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))
 
#define duk_pcompile_string_filename(ctx, flags, src)    (duk_compile_raw((ctx), (src), 0, 1 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN))
 
#define duk_eval_lstring(ctx, buf, len)    ((void) duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NOFILENAME))
 
#define duk_eval_lstring_noresult(ctx, buf, len)    ((void) duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))
 
#define duk_peval_lstring(ctx, buf, len)    (duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_SAFE | DUK_COMPILE_NOFILENAME))
 
#define duk_peval_lstring_noresult(ctx, buf, len)    (duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))
 
#define duk_compile_lstring(ctx, flags, buf, len)    ((void) duk_compile_raw((ctx), buf, len, 0 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NOFILENAME))
 
#define duk_compile_lstring_filename(ctx, flags, buf, len)    ((void) duk_compile_raw((ctx), buf, len, 1 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE))
 
#define duk_pcompile_lstring(ctx, flags, buf, len)    (duk_compile_raw((ctx), buf, len, 0 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NOFILENAME))
 
#define duk_pcompile_lstring_filename(ctx, flags, buf, len)    (duk_compile_raw((ctx), buf, len, 1 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE))
 
#define DUK_DATE_MSEC_SECOND   1000L
 
#define DUK_DATE_MSEC_MINUTE   (60L * 1000L)
 
#define DUK_DATE_MSEC_HOUR   (60L * 60L * 1000L)
 
#define DUK_DATE_MSEC_DAY   (24L * 60L * 60L * 1000L)
 
#define DUK_DATE_MSEC_100M_DAYS   (8.64e15)
 
#define DUK_DATE_MSEC_100M_DAYS_LEEWAY   (8.64e15 + 24 * 3600e3)
 
#define DUK_DATE_MIN_ECMA_YEAR   (-271821L)
 
#define DUK_DATE_MAX_ECMA_YEAR   275760L
 
#define DUK_DATE_IDX_YEAR   0 /* year */
 
#define DUK_DATE_IDX_MONTH   1 /* month: 0 to 11 */
 
#define DUK_DATE_IDX_DAY   2 /* day within month: 0 to 30 */
 
#define DUK_DATE_IDX_HOUR   3
 
#define DUK_DATE_IDX_MINUTE   4
 
#define DUK_DATE_IDX_SECOND   5
 
#define DUK_DATE_IDX_MILLISECOND   6
 
#define DUK_DATE_IDX_WEEKDAY   7 /* weekday: 0 to 6, 0=sunday, 1=monday, etc */
 
#define DUK_DATE_IDX_NUM_PARTS   8
 
#define DUK_DATE_FLAG_NAN_TO_ZERO   (1 << 0) /* timeval breakdown: internal time value NaN -> zero */
 
#define DUK_DATE_FLAG_NAN_TO_RANGE_ERROR   (1 << 1) /* timeval breakdown: internal time value NaN -> RangeError (toISOString) */
 
#define DUK_DATE_FLAG_ONEBASED   (1 << 2) /* timeval breakdown: convert month and day-of-month parts to one-based (default is zero-based) */
 
#define DUK_DATE_FLAG_EQUIVYEAR   (1 << 3) /* timeval breakdown: replace year with equivalent year in the [1971,2037] range for DST calculations */
 
#define DUK_DATE_FLAG_LOCALTIME   (1 << 4) /* convert time value to local time */
 
#define DUK_DATE_FLAG_SUB1900   (1 << 5) /* getter: subtract 1900 from year when getting year part */
 
#define DUK_DATE_FLAG_TOSTRING_DATE   (1 << 6) /* include date part in string conversion result */
 
#define DUK_DATE_FLAG_TOSTRING_TIME   (1 << 7) /* include time part in string conversion result */
 
#define DUK_DATE_FLAG_TOSTRING_LOCALE   (1 << 8) /* use locale specific formatting if available */
 
#define DUK_DATE_FLAG_TIMESETTER   (1 << 9) /* setter: call is a time setter (affects hour, min, sec, ms); otherwise date setter (affects year, month, day-in-month) */
 
#define DUK_DATE_FLAG_YEAR_FIXUP   (1 << 10) /* setter: perform 2-digit year fixup (00...99 -> 1900...1999) */
 
#define DUK_DATE_FLAG_SEP_T   (1 << 11) /* string conversion: use 'T' instead of ' ' as a separator */
 
#define DUK_DATE_FLAG_VALUE_SHIFT   12 /* additional values begin at bit 12 */
 

Typedefs

typedef struct duk_thread_state duk_thread_state
 
typedef struct duk_memory_functions duk_memory_functions
 
typedef struct duk_function_list_entry duk_function_list_entry
 
typedef struct duk_number_list_entry duk_number_list_entry
 
typedef struct duk_time_components duk_time_components
 
typedef duk_ret_t(* duk_c_function) (duk_context *ctx)
 
typedef void *(* duk_alloc_function) (void *udata, duk_size_t size)
 
typedef void *(* duk_realloc_function) (void *udata, void *ptr, duk_size_t size)
 
typedef void(* duk_free_function) (void *udata, void *ptr)
 
typedef void(* duk_fatal_function) (void *udata, const char *msg)
 
typedef void(* duk_decode_char_function) (void *udata, duk_codepoint_t codepoint)
 
typedef duk_codepoint_t(* duk_map_char_function) (void *udata, duk_codepoint_t codepoint)
 
typedef duk_ret_t(* duk_safe_call_function) (duk_context *ctx, void *udata)
 
typedef duk_size_t(* duk_debug_read_function) (void *udata, char *buffer, duk_size_t length)
 
typedef duk_size_t(* duk_debug_write_function) (void *udata, const char *buffer, duk_size_t length)
 
typedef duk_size_t(* duk_debug_peek_function) (void *udata)
 
typedef void(* duk_debug_read_flush_function) (void *udata)
 
typedef void(* duk_debug_write_flush_function) (void *udata)
 
typedef duk_idx_t(* duk_debug_request_function) (duk_context *ctx, void *udata, duk_idx_t nvalues)
 
typedef void(* duk_debug_detached_function) (duk_context *ctx, void *udata)
 

Functions

DUK_EXTERNAL_DECL duk_contextduk_create_heap (duk_alloc_function alloc_func, duk_realloc_function realloc_func, duk_free_function free_func, void *heap_udata, duk_fatal_function fatal_handler)
 
DUK_EXTERNAL_DECL void duk_destroy_heap (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_suspend (duk_context *ctx, duk_thread_state *state)
 
DUK_EXTERNAL_DECL void duk_resume (duk_context *ctx, const duk_thread_state *state)
 
DUK_EXTERNAL_DECL void * duk_alloc_raw (duk_context *ctx, duk_size_t size)
 
DUK_EXTERNAL_DECL void duk_free_raw (duk_context *ctx, void *ptr)
 
DUK_EXTERNAL_DECL void * duk_realloc_raw (duk_context *ctx, void *ptr, duk_size_t size)
 
DUK_EXTERNAL_DECL void * duk_alloc (duk_context *ctx, duk_size_t size)
 
DUK_EXTERNAL_DECL void duk_free (duk_context *ctx, void *ptr)
 
DUK_EXTERNAL_DECL void * duk_realloc (duk_context *ctx, void *ptr, duk_size_t size)
 
DUK_EXTERNAL_DECL void duk_get_memory_functions (duk_context *ctx, duk_memory_functions *out_funcs)
 
DUK_EXTERNAL_DECL void duk_gc (duk_context *ctx, duk_uint_t flags)
 
 DUK_API_NORETURN (DUK_EXTERNAL_DECL void duk_throw_raw(duk_context *ctx))
 
 DUK_API_NORETURN (DUK_EXTERNAL_DECL void duk_fatal_raw(duk_context *ctx, const char *err_msg))
 
 DUK_API_NORETURN (DUK_EXTERNAL_DECL void duk_error_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt,...))
 
 DUK_API_NORETURN (DUK_EXTERNAL_DECL duk_ret_t duk_error_stash(duk_context *ctx, duk_errcode_t err_code, const char *fmt,...))
 
 DUK_API_NORETURN (DUK_EXTERNAL_DECL duk_ret_t duk_generic_error_stash(duk_context *ctx, const char *fmt,...))
 
 DUK_API_NORETURN (DUK_EXTERNAL_DECL void duk_error_va_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap))
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_strict_call (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_constructor_call (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_normalize_index (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_require_normalize_index (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_valid_index (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_require_valid_index (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_get_top (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_set_top (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_get_top_index (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_require_top_index (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_check_stack (duk_context *ctx, duk_idx_t extra)
 
DUK_EXTERNAL_DECL void duk_require_stack (duk_context *ctx, duk_idx_t extra)
 
DUK_EXTERNAL_DECL duk_bool_t duk_check_stack_top (duk_context *ctx, duk_idx_t top)
 
DUK_EXTERNAL_DECL void duk_require_stack_top (duk_context *ctx, duk_idx_t top)
 
DUK_EXTERNAL_DECL void duk_swap (duk_context *ctx, duk_idx_t idx1, duk_idx_t idx2)
 
DUK_EXTERNAL_DECL void duk_swap_top (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_dup (duk_context *ctx, duk_idx_t from_idx)
 
DUK_EXTERNAL_DECL void duk_dup_top (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_insert (duk_context *ctx, duk_idx_t to_idx)
 
DUK_EXTERNAL_DECL void duk_pull (duk_context *ctx, duk_idx_t from_idx)
 
DUK_EXTERNAL_DECL void duk_replace (duk_context *ctx, duk_idx_t to_idx)
 
DUK_EXTERNAL_DECL void duk_copy (duk_context *ctx, duk_idx_t from_idx, duk_idx_t to_idx)
 
DUK_EXTERNAL_DECL void duk_remove (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_xcopymove_raw (duk_context *to_ctx, duk_context *from_ctx, duk_idx_t count, duk_bool_t is_copy)
 
DUK_EXTERNAL_DECL void duk_push_undefined (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_null (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_boolean (duk_context *ctx, duk_bool_t val)
 
DUK_EXTERNAL_DECL void duk_push_true (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_false (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_number (duk_context *ctx, duk_double_t val)
 
DUK_EXTERNAL_DECL void duk_push_nan (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_int (duk_context *ctx, duk_int_t val)
 
DUK_EXTERNAL_DECL void duk_push_uint (duk_context *ctx, duk_uint_t val)
 
DUK_EXTERNAL_DECL const char * duk_push_string (duk_context *ctx, const char *str)
 
DUK_EXTERNAL_DECL const char * duk_push_lstring (duk_context *ctx, const char *str, duk_size_t len)
 
DUK_EXTERNAL_DECL void duk_push_pointer (duk_context *ctx, void *p)
 
DUK_EXTERNAL_DECL const char * duk_push_sprintf (duk_context *ctx, const char *fmt,...)
 
DUK_EXTERNAL_DECL const char * duk_push_vsprintf (duk_context *ctx, const char *fmt, va_list ap)
 
DUK_EXTERNAL_DECL const char * duk_push_literal_raw (duk_context *ctx, const char *str, duk_size_t len)
 
DUK_EXTERNAL_DECL void duk_push_this (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_new_target (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_current_function (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_current_thread (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_global_object (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_heap_stash (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_global_stash (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_thread_stash (duk_context *ctx, duk_context *target_ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_object (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_object (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_array (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_array (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_c_function (duk_context *ctx, duk_c_function func, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_c_lightfunc (duk_context *ctx, duk_c_function func, duk_idx_t nargs, duk_idx_t length, duk_int_t magic)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_thread_raw (duk_context *ctx, duk_uint_t flags)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_proxy (duk_context *ctx, duk_uint_t proxy_flags)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_raw (duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt,...)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_stash (duk_context *ctx, duk_errcode_t err_code, const char *fmt,...)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_va_raw (duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap)
 
DUK_EXTERNAL_DECL void * duk_push_buffer_raw (duk_context *ctx, duk_size_t size, duk_small_uint_t flags)
 
DUK_EXTERNAL_DECL void duk_push_buffer_object (duk_context *ctx, duk_idx_t idx_buffer, duk_size_t byte_offset, duk_size_t byte_length, duk_uint_t flags)
 
DUK_EXTERNAL_DECL duk_idx_t duk_push_heapptr (duk_context *ctx, void *ptr)
 
DUK_EXTERNAL_DECL void duk_pop (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_pop_n (duk_context *ctx, duk_idx_t count)
 
DUK_EXTERNAL_DECL void duk_pop_2 (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_pop_3 (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_int_t duk_get_type (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_check_type (duk_context *ctx, duk_idx_t idx, duk_int_t type)
 
DUK_EXTERNAL_DECL duk_uint_t duk_get_type_mask (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_check_type_mask (duk_context *ctx, duk_idx_t idx, duk_uint_t mask)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_undefined (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_null (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_boolean (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_number (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_nan (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_string (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_object (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_buffer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_buffer_data (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_pointer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_lightfunc (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_symbol (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_array (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_c_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_ecmascript_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_bound_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_thread (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_constructable (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_dynamic_buffer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_fixed_buffer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_is_external_buffer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_errcode_t duk_get_error_code (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_boolean (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_double_t duk_get_number (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_int_t duk_get_int (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_uint_t duk_get_uint (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_get_string (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_get_lstring (duk_context *ctx, duk_idx_t idx, duk_size_t *out_len)
 
DUK_EXTERNAL_DECL void * duk_get_buffer (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size)
 
DUK_EXTERNAL_DECL void * duk_get_buffer_data (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size)
 
DUK_EXTERNAL_DECL void * duk_get_pointer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_c_function duk_get_c_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_contextduk_get_context (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void * duk_get_heapptr (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_boolean_default (duk_context *ctx, duk_idx_t idx, duk_bool_t def_value)
 
DUK_EXTERNAL_DECL duk_double_t duk_get_number_default (duk_context *ctx, duk_idx_t idx, duk_double_t def_value)
 
DUK_EXTERNAL_DECL duk_int_t duk_get_int_default (duk_context *ctx, duk_idx_t idx, duk_int_t def_value)
 
DUK_EXTERNAL_DECL duk_uint_t duk_get_uint_default (duk_context *ctx, duk_idx_t idx, duk_uint_t def_value)
 
DUK_EXTERNAL_DECL const char * duk_get_string_default (duk_context *ctx, duk_idx_t idx, const char *def_value)
 
DUK_EXTERNAL_DECL const char * duk_get_lstring_default (duk_context *ctx, duk_idx_t idx, duk_size_t *out_len, const char *def_ptr, duk_size_t def_len)
 
DUK_EXTERNAL_DECL void * duk_get_buffer_default (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_len)
 
DUK_EXTERNAL_DECL void * duk_get_buffer_data_default (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_len)
 
DUK_EXTERNAL_DECL void * duk_get_pointer_default (duk_context *ctx, duk_idx_t idx, void *def_value)
 
DUK_EXTERNAL_DECL duk_c_function duk_get_c_function_default (duk_context *ctx, duk_idx_t idx, duk_c_function def_value)
 
DUK_EXTERNAL_DECL duk_contextduk_get_context_default (duk_context *ctx, duk_idx_t idx, duk_context *def_value)
 
DUK_EXTERNAL_DECL void * duk_get_heapptr_default (duk_context *ctx, duk_idx_t idx, void *def_value)
 
DUK_EXTERNAL_DECL duk_bool_t duk_opt_boolean (duk_context *ctx, duk_idx_t idx, duk_bool_t def_value)
 
DUK_EXTERNAL_DECL duk_double_t duk_opt_number (duk_context *ctx, duk_idx_t idx, duk_double_t def_value)
 
DUK_EXTERNAL_DECL duk_int_t duk_opt_int (duk_context *ctx, duk_idx_t idx, duk_int_t def_value)
 
DUK_EXTERNAL_DECL duk_uint_t duk_opt_uint (duk_context *ctx, duk_idx_t idx, duk_uint_t def_value)
 
DUK_EXTERNAL_DECL const char * duk_opt_string (duk_context *ctx, duk_idx_t idx, const char *def_ptr)
 
DUK_EXTERNAL_DECL const char * duk_opt_lstring (duk_context *ctx, duk_idx_t idx, duk_size_t *out_len, const char *def_ptr, duk_size_t def_len)
 
DUK_EXTERNAL_DECL void * duk_opt_buffer (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_size)
 
DUK_EXTERNAL_DECL void * duk_opt_buffer_data (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_size)
 
DUK_EXTERNAL_DECL void * duk_opt_pointer (duk_context *ctx, duk_idx_t idx, void *def_value)
 
DUK_EXTERNAL_DECL duk_c_function duk_opt_c_function (duk_context *ctx, duk_idx_t idx, duk_c_function def_value)
 
DUK_EXTERNAL_DECL duk_contextduk_opt_context (duk_context *ctx, duk_idx_t idx, duk_context *def_value)
 
DUK_EXTERNAL_DECL void * duk_opt_heapptr (duk_context *ctx, duk_idx_t idx, void *def_value)
 
DUK_EXTERNAL_DECL void duk_require_undefined (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_require_null (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_require_boolean (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_double_t duk_require_number (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_int_t duk_require_int (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_uint_t duk_require_uint (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_require_string (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_require_lstring (duk_context *ctx, duk_idx_t idx, duk_size_t *out_len)
 
DUK_EXTERNAL_DECL void duk_require_object (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void * duk_require_buffer (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size)
 
DUK_EXTERNAL_DECL void * duk_require_buffer_data (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size)
 
DUK_EXTERNAL_DECL void * duk_require_pointer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_c_function duk_require_c_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_contextduk_require_context (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_require_function (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_require_constructor_call (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_require_constructable (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void * duk_require_heapptr (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_to_undefined (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_to_null (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_to_boolean (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_double_t duk_to_number (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_int_t duk_to_int (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_uint_t duk_to_uint (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_int32_t duk_to_int32 (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_uint32_t duk_to_uint32 (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_uint16_t duk_to_uint16 (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_to_string (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_to_lstring (duk_context *ctx, duk_idx_t idx, duk_size_t *out_len)
 
DUK_EXTERNAL_DECL void * duk_to_buffer_raw (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size, duk_uint_t flags)
 
DUK_EXTERNAL_DECL void * duk_to_pointer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_to_object (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_to_primitive (duk_context *ctx, duk_idx_t idx, duk_int_t hint)
 
DUK_EXTERNAL_DECL const char * duk_safe_to_lstring (duk_context *ctx, duk_idx_t idx, duk_size_t *out_len)
 
DUK_EXTERNAL_DECL const char * duk_to_stacktrace (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_safe_to_stacktrace (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_size_t duk_get_length (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_set_length (duk_context *ctx, duk_idx_t idx, duk_size_t len)
 
DUK_EXTERNAL_DECL const char * duk_base64_encode (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_base64_decode (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_hex_encode (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_hex_decode (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL const char * duk_json_encode (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_json_decode (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_cbor_encode (duk_context *ctx, duk_idx_t idx, duk_uint_t encode_flags)
 
DUK_EXTERNAL_DECL void duk_cbor_decode (duk_context *ctx, duk_idx_t idx, duk_uint_t decode_flags)
 
DUK_EXTERNAL_DECL const char * duk_buffer_to_string (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void * duk_resize_buffer (duk_context *ctx, duk_idx_t idx, duk_size_t new_size)
 
DUK_EXTERNAL_DECL void * duk_steal_buffer (duk_context *ctx, duk_idx_t idx, duk_size_t *out_size)
 
DUK_EXTERNAL_DECL void duk_config_buffer (duk_context *ctx, duk_idx_t idx, void *ptr, duk_size_t len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_string (duk_context *ctx, duk_idx_t obj_idx, const char *key)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_lstring (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_literal_raw (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_index (duk_context *ctx, duk_idx_t obj_idx, duk_uarridx_t arr_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_heapptr (duk_context *ctx, duk_idx_t obj_idx, void *ptr)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_string (duk_context *ctx, duk_idx_t obj_idx, const char *key)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_lstring (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_literal_raw (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_index (duk_context *ctx, duk_idx_t obj_idx, duk_uarridx_t arr_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_heapptr (duk_context *ctx, duk_idx_t obj_idx, void *ptr)
 
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_string (duk_context *ctx, duk_idx_t obj_idx, const char *key)
 
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_lstring (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_literal_raw (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_index (duk_context *ctx, duk_idx_t obj_idx, duk_uarridx_t arr_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_heapptr (duk_context *ctx, duk_idx_t obj_idx, void *ptr)
 
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_string (duk_context *ctx, duk_idx_t obj_idx, const char *key)
 
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_lstring (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_literal_raw (duk_context *ctx, duk_idx_t obj_idx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_index (duk_context *ctx, duk_idx_t obj_idx, duk_uarridx_t arr_idx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_heapptr (duk_context *ctx, duk_idx_t obj_idx, void *ptr)
 
DUK_EXTERNAL_DECL void duk_get_prop_desc (duk_context *ctx, duk_idx_t obj_idx, duk_uint_t flags)
 
DUK_EXTERNAL_DECL void duk_def_prop (duk_context *ctx, duk_idx_t obj_idx, duk_uint_t flags)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_global_string (duk_context *ctx, const char *key)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_global_lstring (duk_context *ctx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_global_literal_raw (duk_context *ctx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_get_global_heapptr (duk_context *ctx, void *ptr)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_global_string (duk_context *ctx, const char *key)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_global_lstring (duk_context *ctx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_global_literal_raw (duk_context *ctx, const char *key, duk_size_t key_len)
 
DUK_EXTERNAL_DECL duk_bool_t duk_put_global_heapptr (duk_context *ctx, void *ptr)
 
DUK_EXTERNAL_DECL void duk_inspect_value (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_inspect_callstack_entry (duk_context *ctx, duk_int_t level)
 
DUK_EXTERNAL_DECL void duk_get_prototype (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_set_prototype (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_get_finalizer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_set_finalizer (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_set_global_object (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_int_t duk_get_magic (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL void duk_set_magic (duk_context *ctx, duk_idx_t idx, duk_int_t magic)
 
DUK_EXTERNAL_DECL duk_int_t duk_get_current_magic (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_put_function_list (duk_context *ctx, duk_idx_t obj_idx, const duk_function_list_entry *funcs)
 
DUK_EXTERNAL_DECL void duk_put_number_list (duk_context *ctx, duk_idx_t obj_idx, const duk_number_list_entry *numbers)
 
DUK_EXTERNAL_DECL void duk_compact (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL void duk_enum (duk_context *ctx, duk_idx_t obj_idx, duk_uint_t enum_flags)
 
DUK_EXTERNAL_DECL duk_bool_t duk_next (duk_context *ctx, duk_idx_t enum_idx, duk_bool_t get_value)
 
DUK_EXTERNAL_DECL void duk_seal (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL void duk_freeze (duk_context *ctx, duk_idx_t obj_idx)
 
DUK_EXTERNAL_DECL void duk_concat (duk_context *ctx, duk_idx_t count)
 
DUK_EXTERNAL_DECL void duk_join (duk_context *ctx, duk_idx_t count)
 
DUK_EXTERNAL_DECL void duk_decode_string (duk_context *ctx, duk_idx_t idx, duk_decode_char_function callback, void *udata)
 
DUK_EXTERNAL_DECL void duk_map_string (duk_context *ctx, duk_idx_t idx, duk_map_char_function callback, void *udata)
 
DUK_EXTERNAL_DECL void duk_substring (duk_context *ctx, duk_idx_t idx, duk_size_t start_char_offset, duk_size_t end_char_offset)
 
DUK_EXTERNAL_DECL void duk_trim (duk_context *ctx, duk_idx_t idx)
 
DUK_EXTERNAL_DECL duk_codepoint_t duk_char_code_at (duk_context *ctx, duk_idx_t idx, duk_size_t char_offset)
 
DUK_EXTERNAL_DECL duk_bool_t duk_equals (duk_context *ctx, duk_idx_t idx1, duk_idx_t idx2)
 
DUK_EXTERNAL_DECL duk_bool_t duk_strict_equals (duk_context *ctx, duk_idx_t idx1, duk_idx_t idx2)
 
DUK_EXTERNAL_DECL duk_bool_t duk_samevalue (duk_context *ctx, duk_idx_t idx1, duk_idx_t idx2)
 
DUK_EXTERNAL_DECL duk_bool_t duk_instanceof (duk_context *ctx, duk_idx_t idx1, duk_idx_t idx2)
 
DUK_EXTERNAL_DECL duk_double_t duk_random (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_call (duk_context *ctx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL void duk_call_method (duk_context *ctx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL void duk_call_prop (duk_context *ctx, duk_idx_t obj_idx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL duk_int_t duk_pcall (duk_context *ctx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL duk_int_t duk_pcall_method (duk_context *ctx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL duk_int_t duk_pcall_prop (duk_context *ctx, duk_idx_t obj_idx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL void duk_new (duk_context *ctx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL duk_int_t duk_pnew (duk_context *ctx, duk_idx_t nargs)
 
DUK_EXTERNAL_DECL duk_int_t duk_safe_call (duk_context *ctx, duk_safe_call_function func, void *udata, duk_idx_t nargs, duk_idx_t nrets)
 
DUK_EXTERNAL_DECL duk_int_t duk_eval_raw (duk_context *ctx, const char *src_buffer, duk_size_t src_length, duk_uint_t flags)
 
DUK_EXTERNAL_DECL duk_int_t duk_compile_raw (duk_context *ctx, const char *src_buffer, duk_size_t src_length, duk_uint_t flags)
 
DUK_EXTERNAL_DECL void duk_dump_function (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_load_function (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_push_context_dump (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_debugger_attach (duk_context *ctx, duk_debug_read_function read_cb, duk_debug_write_function write_cb, duk_debug_peek_function peek_cb, duk_debug_read_flush_function read_flush_cb, duk_debug_write_flush_function write_flush_cb, duk_debug_request_function request_cb, duk_debug_detached_function detached_cb, void *udata)
 
DUK_EXTERNAL_DECL void duk_debugger_detach (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_debugger_cooperate (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_bool_t duk_debugger_notify (duk_context *ctx, duk_idx_t nvalues)
 
DUK_EXTERNAL_DECL void duk_debugger_pause (duk_context *ctx)
 
DUK_EXTERNAL_DECL duk_double_t duk_get_now (duk_context *ctx)
 
DUK_EXTERNAL_DECL void duk_time_to_components (duk_context *ctx, duk_double_t timeval, duk_time_components *comp)
 
DUK_EXTERNAL_DECL duk_double_t duk_components_to_time (duk_context *ctx, duk_time_components *comp)
 

Variables

DUK_EXTERNAL_DECL const char * duk_api_global_filename
 
DUK_EXTERNAL_DECL duk_int_t duk_api_global_line
 

Macro Definition Documentation

◆ DUK_API_ENTRY_STACK

#define DUK_API_ENTRY_STACK   64U

Definition at line 320 of file duktape.h.

◆ DUK_API_NORETURN

#define DUK_API_NORETURN (   decl )    DUK_NORETURN(decl)

Definition at line 221 of file duktape.h.

◆ DUK_BUF_FLAG_DYNAMIC

#define DUK_BUF_FLAG_DYNAMIC   (1 << 0) /* internal flag: dynamic buffer */

Definition at line 764 of file duktape.h.

◆ DUK_BUF_FLAG_EXTERNAL

#define DUK_BUF_FLAG_EXTERNAL   (1 << 1) /* internal flag: external buffer */

Definition at line 765 of file duktape.h.

◆ DUK_BUF_FLAG_NOZERO

#define DUK_BUF_FLAG_NOZERO   (1 << 2) /* internal flag: don't zero allocated buffer */

Definition at line 766 of file duktape.h.

◆ DUK_BUF_MODE_DONTCARE

#define DUK_BUF_MODE_DONTCARE   2 /* internal: don't care about fixed/dynamic nature */

Definition at line 1009 of file duktape.h.

◆ DUK_BUF_MODE_DYNAMIC

#define DUK_BUF_MODE_DYNAMIC   1 /* internal: request dynamic buffer result */

Definition at line 1008 of file duktape.h.

◆ DUK_BUF_MODE_FIXED

#define DUK_BUF_MODE_FIXED   0 /* internal: request fixed buffer result */

Definition at line 1007 of file duktape.h.

◆ DUK_BUFOBJ_ARRAYBUFFER

#define DUK_BUFOBJ_ARRAYBUFFER   0

Definition at line 779 of file duktape.h.

◆ DUK_BUFOBJ_DATAVIEW

#define DUK_BUFOBJ_DATAVIEW   2

Definition at line 781 of file duktape.h.

◆ DUK_BUFOBJ_FLOAT32ARRAY

#define DUK_BUFOBJ_FLOAT32ARRAY   10

Definition at line 789 of file duktape.h.

◆ DUK_BUFOBJ_FLOAT64ARRAY

#define DUK_BUFOBJ_FLOAT64ARRAY   11

Definition at line 790 of file duktape.h.

◆ DUK_BUFOBJ_INT16ARRAY

#define DUK_BUFOBJ_INT16ARRAY   6

Definition at line 785 of file duktape.h.

◆ DUK_BUFOBJ_INT32ARRAY

#define DUK_BUFOBJ_INT32ARRAY   8

Definition at line 787 of file duktape.h.

◆ DUK_BUFOBJ_INT8ARRAY

#define DUK_BUFOBJ_INT8ARRAY   3

Definition at line 782 of file duktape.h.

◆ DUK_BUFOBJ_NODEJS_BUFFER

#define DUK_BUFOBJ_NODEJS_BUFFER   1

Definition at line 780 of file duktape.h.

◆ DUK_BUFOBJ_UINT16ARRAY

#define DUK_BUFOBJ_UINT16ARRAY   7

Definition at line 786 of file duktape.h.

◆ DUK_BUFOBJ_UINT32ARRAY

#define DUK_BUFOBJ_UINT32ARRAY   9

Definition at line 788 of file duktape.h.

◆ DUK_BUFOBJ_UINT8ARRAY

#define DUK_BUFOBJ_UINT8ARRAY   4

Definition at line 783 of file duktape.h.

◆ DUK_BUFOBJ_UINT8CLAMPEDARRAY

#define DUK_BUFOBJ_UINT8CLAMPEDARRAY   5

Definition at line 784 of file duktape.h.

◆ duk_compile

#define duk_compile (   ctx,
  flags 
)     ((void) duk_compile_raw((ctx), NULL, 0, 2 /*args*/ | (flags)))

Definition at line 1257 of file duktape.h.

◆ DUK_COMPILE_EVAL

#define DUK_COMPILE_EVAL   (1U << 3) /* compile eval code (instead of global code) */

Definition at line 369 of file duktape.h.

◆ DUK_COMPILE_FUNCEXPR

#define DUK_COMPILE_FUNCEXPR   (1U << 12) /* (internal) source is a function expression (used for Function constructor) */

Definition at line 378 of file duktape.h.

◆ DUK_COMPILE_FUNCTION

#define DUK_COMPILE_FUNCTION   (1U << 4) /* compile function code (instead of global code) */

Definition at line 370 of file duktape.h.

◆ duk_compile_lstring

#define duk_compile_lstring (   ctx,
  flags,
  buf,
  len 
)     ((void) duk_compile_raw((ctx), buf, len, 0 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NOFILENAME))

Definition at line 1301 of file duktape.h.

◆ duk_compile_lstring_filename

#define duk_compile_lstring_filename (   ctx,
  flags,
  buf,
  len 
)     ((void) duk_compile_raw((ctx), buf, len, 1 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE))

Definition at line 1304 of file duktape.h.

◆ DUK_COMPILE_NOFILENAME

#define DUK_COMPILE_NOFILENAME   (1U << 11) /* (internal) no filename on stack */

Definition at line 377 of file duktape.h.

◆ DUK_COMPILE_NORESULT

#define DUK_COMPILE_NORESULT   (1U << 8) /* (internal) omit eval result */

Definition at line 374 of file duktape.h.

◆ DUK_COMPILE_NOSOURCE

#define DUK_COMPILE_NOSOURCE   (1U << 9) /* (internal) no source string on stack */

Definition at line 375 of file duktape.h.

◆ DUK_COMPILE_SAFE

#define DUK_COMPILE_SAFE   (1U << 7) /* (internal) catch compilation errors */

Definition at line 373 of file duktape.h.

◆ DUK_COMPILE_SHEBANG

#define DUK_COMPILE_SHEBANG   (1U << 6) /* allow shebang ('#! ...') comment on first line of source */

Definition at line 372 of file duktape.h.

◆ DUK_COMPILE_STRICT

#define DUK_COMPILE_STRICT   (1U << 5) /* use strict (outer) context for global, eval, or function code */

Definition at line 371 of file duktape.h.

◆ duk_compile_string

#define duk_compile_string (   ctx,
  flags,
  src 
)     ((void) duk_compile_raw((ctx), (src), 0, 0 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))

Definition at line 1276 of file duktape.h.

◆ duk_compile_string_filename

#define duk_compile_string_filename (   ctx,
  flags,
  src 
)     ((void) duk_compile_raw((ctx), (src), 0, 1 /*args*/ | (flags) | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN))

Definition at line 1279 of file duktape.h.

◆ DUK_COMPILE_STRLEN

#define DUK_COMPILE_STRLEN   (1U << 10) /* (internal) take strlen() of src_buffer (avoids double evaluation in macro) */

Definition at line 376 of file duktape.h.

◆ duk_create_heap_default

#define duk_create_heap_default ( )     duk_create_heap(NULL, NULL, NULL, NULL, NULL)

Definition at line 515 of file duktape.h.

◆ DUK_DATE_FLAG_EQUIVYEAR

#define DUK_DATE_FLAG_EQUIVYEAR   (1 << 3) /* timeval breakdown: replace year with equivalent year in the [1971,2037] range for DST calculations */

Definition at line 1419 of file duktape.h.

◆ DUK_DATE_FLAG_LOCALTIME

#define DUK_DATE_FLAG_LOCALTIME   (1 << 4) /* convert time value to local time */

Definition at line 1420 of file duktape.h.

◆ DUK_DATE_FLAG_NAN_TO_RANGE_ERROR

#define DUK_DATE_FLAG_NAN_TO_RANGE_ERROR   (1 << 1) /* timeval breakdown: internal time value NaN -> RangeError (toISOString) */

Definition at line 1417 of file duktape.h.

◆ DUK_DATE_FLAG_NAN_TO_ZERO

#define DUK_DATE_FLAG_NAN_TO_ZERO   (1 << 0) /* timeval breakdown: internal time value NaN -> zero */

Definition at line 1416 of file duktape.h.

◆ DUK_DATE_FLAG_ONEBASED

#define DUK_DATE_FLAG_ONEBASED   (1 << 2) /* timeval breakdown: convert month and day-of-month parts to one-based (default is zero-based) */

Definition at line 1418 of file duktape.h.

◆ DUK_DATE_FLAG_SEP_T

#define DUK_DATE_FLAG_SEP_T   (1 << 11) /* string conversion: use 'T' instead of ' ' as a separator */

Definition at line 1427 of file duktape.h.

◆ DUK_DATE_FLAG_SUB1900

#define DUK_DATE_FLAG_SUB1900   (1 << 5) /* getter: subtract 1900 from year when getting year part */

Definition at line 1421 of file duktape.h.

◆ DUK_DATE_FLAG_TIMESETTER

#define DUK_DATE_FLAG_TIMESETTER   (1 << 9) /* setter: call is a time setter (affects hour, min, sec, ms); otherwise date setter (affects year, month, day-in-month) */

Definition at line 1425 of file duktape.h.

◆ DUK_DATE_FLAG_TOSTRING_DATE

#define DUK_DATE_FLAG_TOSTRING_DATE   (1 << 6) /* include date part in string conversion result */

Definition at line 1422 of file duktape.h.

◆ DUK_DATE_FLAG_TOSTRING_LOCALE

#define DUK_DATE_FLAG_TOSTRING_LOCALE   (1 << 8) /* use locale specific formatting if available */

Definition at line 1424 of file duktape.h.

◆ DUK_DATE_FLAG_TOSTRING_TIME

#define DUK_DATE_FLAG_TOSTRING_TIME   (1 << 7) /* include time part in string conversion result */

Definition at line 1423 of file duktape.h.

◆ DUK_DATE_FLAG_VALUE_SHIFT

#define DUK_DATE_FLAG_VALUE_SHIFT   12 /* additional values begin at bit 12 */

Definition at line 1428 of file duktape.h.

◆ DUK_DATE_FLAG_YEAR_FIXUP

#define DUK_DATE_FLAG_YEAR_FIXUP   (1 << 10) /* setter: perform 2-digit year fixup (00...99 -> 1900...1999) */

Definition at line 1426 of file duktape.h.

◆ DUK_DATE_IDX_DAY

#define DUK_DATE_IDX_DAY   2 /* day within month: 0 to 30 */

Definition at line 1392 of file duktape.h.

◆ DUK_DATE_IDX_HOUR

#define DUK_DATE_IDX_HOUR   3

Definition at line 1393 of file duktape.h.

◆ DUK_DATE_IDX_MILLISECOND

#define DUK_DATE_IDX_MILLISECOND   6

Definition at line 1396 of file duktape.h.

◆ DUK_DATE_IDX_MINUTE

#define DUK_DATE_IDX_MINUTE   4

Definition at line 1394 of file duktape.h.

◆ DUK_DATE_IDX_MONTH

#define DUK_DATE_IDX_MONTH   1 /* month: 0 to 11 */

Definition at line 1391 of file duktape.h.

◆ DUK_DATE_IDX_NUM_PARTS

#define DUK_DATE_IDX_NUM_PARTS   8

Definition at line 1398 of file duktape.h.

◆ DUK_DATE_IDX_SECOND

#define DUK_DATE_IDX_SECOND   5

Definition at line 1395 of file duktape.h.

◆ DUK_DATE_IDX_WEEKDAY

#define DUK_DATE_IDX_WEEKDAY   7 /* weekday: 0 to 6, 0=sunday, 1=monday, etc */

Definition at line 1397 of file duktape.h.

◆ DUK_DATE_IDX_YEAR

#define DUK_DATE_IDX_YEAR   0 /* year */

Definition at line 1390 of file duktape.h.

◆ DUK_DATE_MAX_ECMA_YEAR

#define DUK_DATE_MAX_ECMA_YEAR   275760L

Definition at line 1380 of file duktape.h.

◆ DUK_DATE_MIN_ECMA_YEAR

#define DUK_DATE_MIN_ECMA_YEAR   (-271821L)

Definition at line 1379 of file duktape.h.

◆ DUK_DATE_MSEC_100M_DAYS

#define DUK_DATE_MSEC_100M_DAYS   (8.64e15)

Definition at line 1370 of file duktape.h.

◆ DUK_DATE_MSEC_100M_DAYS_LEEWAY

#define DUK_DATE_MSEC_100M_DAYS_LEEWAY   (8.64e15 + 24 * 3600e3)

Definition at line 1371 of file duktape.h.

◆ DUK_DATE_MSEC_DAY

#define DUK_DATE_MSEC_DAY   (24L * 60L * 60L * 1000L)

Definition at line 1363 of file duktape.h.

◆ DUK_DATE_MSEC_HOUR

#define DUK_DATE_MSEC_HOUR   (60L * 60L * 1000L)

Definition at line 1362 of file duktape.h.

◆ DUK_DATE_MSEC_MINUTE

#define DUK_DATE_MSEC_MINUTE   (60L * 1000L)

Definition at line 1361 of file duktape.h.

◆ DUK_DATE_MSEC_SECOND

#define DUK_DATE_MSEC_SECOND   1000L

Definition at line 1360 of file duktape.h.

◆ DUK_DEBUG_PROTOCOL_VERSION

#define DUK_DEBUG_PROTOCOL_VERSION   2

Definition at line 304 of file duktape.h.

◆ DUK_DEFPROP_ATTR_C

#define DUK_DEFPROP_ATTR_C   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_C)

Definition at line 427 of file duktape.h.

◆ DUK_DEFPROP_ATTR_E

#define DUK_DEFPROP_ATTR_E   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_E)

Definition at line 426 of file duktape.h.

◆ DUK_DEFPROP_ATTR_EC

#define DUK_DEFPROP_ATTR_EC   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_EC)

Definition at line 430 of file duktape.h.

◆ DUK_DEFPROP_ATTR_W

#define DUK_DEFPROP_ATTR_W   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_W)

Definition at line 425 of file duktape.h.

◆ DUK_DEFPROP_ATTR_WC

#define DUK_DEFPROP_ATTR_WC   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WC)

Definition at line 429 of file duktape.h.

◆ DUK_DEFPROP_ATTR_WE

#define DUK_DEFPROP_ATTR_WE   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WE)

Definition at line 428 of file duktape.h.

◆ DUK_DEFPROP_ATTR_WEC

#define DUK_DEFPROP_ATTR_WEC   (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WEC)

Definition at line 431 of file duktape.h.

◆ DUK_DEFPROP_C

#define DUK_DEFPROP_C   DUK_DEFPROP_CONFIGURABLE

Definition at line 399 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_C

#define DUK_DEFPROP_CLEAR_C   DUK_DEFPROP_CLEAR_CONFIGURABLE

Definition at line 420 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_CONFIGURABLE

#define DUK_DEFPROP_CLEAR_CONFIGURABLE   DUK_DEFPROP_HAVE_CONFIGURABLE

Definition at line 396 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_E

#define DUK_DEFPROP_CLEAR_E   DUK_DEFPROP_CLEAR_ENUMERABLE

Definition at line 419 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_EC

#define DUK_DEFPROP_CLEAR_EC   (DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)

Definition at line 423 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_ENUMERABLE

#define DUK_DEFPROP_CLEAR_ENUMERABLE   DUK_DEFPROP_HAVE_ENUMERABLE

Definition at line 394 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_W

#define DUK_DEFPROP_CLEAR_W   DUK_DEFPROP_CLEAR_WRITABLE

Definition at line 418 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_WC

#define DUK_DEFPROP_CLEAR_WC   (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)

Definition at line 422 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_WE

#define DUK_DEFPROP_CLEAR_WE   (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE)

Definition at line 421 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_WEC

Definition at line 424 of file duktape.h.

◆ DUK_DEFPROP_CLEAR_WRITABLE

#define DUK_DEFPROP_CLEAR_WRITABLE   DUK_DEFPROP_HAVE_WRITABLE

Definition at line 392 of file duktape.h.

◆ DUK_DEFPROP_CONFIGURABLE

#define DUK_DEFPROP_CONFIGURABLE   (1U << 2) /* set configurable (effective if DUK_DEFPROP_HAVE_CONFIGURABLE set) */

Definition at line 383 of file duktape.h.

◆ DUK_DEFPROP_E

#define DUK_DEFPROP_E   DUK_DEFPROP_ENUMERABLE

Definition at line 398 of file duktape.h.

◆ DUK_DEFPROP_EC

#define DUK_DEFPROP_EC   (DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)

Definition at line 402 of file duktape.h.

◆ DUK_DEFPROP_ENUMERABLE

#define DUK_DEFPROP_ENUMERABLE   (1U << 1) /* set enumerable (effective if DUK_DEFPROP_HAVE_ENUMERABLE set) */

Definition at line 382 of file duktape.h.

◆ DUK_DEFPROP_FORCE

#define DUK_DEFPROP_FORCE   (1U << 9) /* force change if possible, may still fail for e.g. virtual properties */

Definition at line 390 of file duktape.h.

◆ DUK_DEFPROP_HAVE_C

#define DUK_DEFPROP_HAVE_C   DUK_DEFPROP_HAVE_CONFIGURABLE

Definition at line 406 of file duktape.h.

◆ DUK_DEFPROP_HAVE_CONFIGURABLE

#define DUK_DEFPROP_HAVE_CONFIGURABLE   (1U << 5) /* set/clear configurable */

Definition at line 386 of file duktape.h.

◆ DUK_DEFPROP_HAVE_E

#define DUK_DEFPROP_HAVE_E   DUK_DEFPROP_HAVE_ENUMERABLE

Definition at line 405 of file duktape.h.

◆ DUK_DEFPROP_HAVE_EC

#define DUK_DEFPROP_HAVE_EC   (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)

Definition at line 409 of file duktape.h.

◆ DUK_DEFPROP_HAVE_ENUMERABLE

#define DUK_DEFPROP_HAVE_ENUMERABLE   (1U << 4) /* set/clear enumerable */

Definition at line 385 of file duktape.h.

◆ DUK_DEFPROP_HAVE_GETTER

#define DUK_DEFPROP_HAVE_GETTER   (1U << 7) /* set getter (given on value stack) */

Definition at line 388 of file duktape.h.

◆ DUK_DEFPROP_HAVE_SETTER

#define DUK_DEFPROP_HAVE_SETTER   (1U << 8) /* set setter (given on value stack) */

Definition at line 389 of file duktape.h.

◆ DUK_DEFPROP_HAVE_VALUE

#define DUK_DEFPROP_HAVE_VALUE   (1U << 6) /* set value (given on value stack) */

Definition at line 387 of file duktape.h.

◆ DUK_DEFPROP_HAVE_W

#define DUK_DEFPROP_HAVE_W   DUK_DEFPROP_HAVE_WRITABLE

Definition at line 404 of file duktape.h.

◆ DUK_DEFPROP_HAVE_WC

#define DUK_DEFPROP_HAVE_WC   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)

Definition at line 408 of file duktape.h.

◆ DUK_DEFPROP_HAVE_WE

#define DUK_DEFPROP_HAVE_WE   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE)

Definition at line 407 of file duktape.h.

◆ DUK_DEFPROP_HAVE_WEC

Definition at line 410 of file duktape.h.

◆ DUK_DEFPROP_HAVE_WRITABLE

#define DUK_DEFPROP_HAVE_WRITABLE   (1U << 3) /* set/clear writable */

Definition at line 384 of file duktape.h.

◆ DUK_DEFPROP_SET_C

#define DUK_DEFPROP_SET_C   DUK_DEFPROP_SET_CONFIGURABLE

Definition at line 413 of file duktape.h.

◆ DUK_DEFPROP_SET_CONFIGURABLE

#define DUK_DEFPROP_SET_CONFIGURABLE   (DUK_DEFPROP_HAVE_CONFIGURABLE | DUK_DEFPROP_CONFIGURABLE)

Definition at line 395 of file duktape.h.

◆ DUK_DEFPROP_SET_E

#define DUK_DEFPROP_SET_E   DUK_DEFPROP_SET_ENUMERABLE

Definition at line 412 of file duktape.h.

◆ DUK_DEFPROP_SET_EC

#define DUK_DEFPROP_SET_EC   (DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)

Definition at line 416 of file duktape.h.

◆ DUK_DEFPROP_SET_ENUMERABLE

#define DUK_DEFPROP_SET_ENUMERABLE   (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_ENUMERABLE)

Definition at line 393 of file duktape.h.

◆ DUK_DEFPROP_SET_W

#define DUK_DEFPROP_SET_W   DUK_DEFPROP_SET_WRITABLE

Definition at line 411 of file duktape.h.

◆ DUK_DEFPROP_SET_WC

#define DUK_DEFPROP_SET_WC   (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_CONFIGURABLE)

Definition at line 415 of file duktape.h.

◆ DUK_DEFPROP_SET_WE

#define DUK_DEFPROP_SET_WE   (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE)

Definition at line 414 of file duktape.h.

◆ DUK_DEFPROP_SET_WEC

Definition at line 417 of file duktape.h.

◆ DUK_DEFPROP_SET_WRITABLE

#define DUK_DEFPROP_SET_WRITABLE   (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_WRITABLE)

Definition at line 391 of file duktape.h.

◆ DUK_DEFPROP_W

#define DUK_DEFPROP_W   DUK_DEFPROP_WRITABLE

Definition at line 397 of file duktape.h.

◆ DUK_DEFPROP_WC

#define DUK_DEFPROP_WC   (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_CONFIGURABLE)

Definition at line 401 of file duktape.h.

◆ DUK_DEFPROP_WE

#define DUK_DEFPROP_WE   (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE)

Definition at line 400 of file duktape.h.

◆ DUK_DEFPROP_WEC

Definition at line 403 of file duktape.h.

◆ DUK_DEFPROP_WRITABLE

#define DUK_DEFPROP_WRITABLE   (1U << 0) /* set writable (effective if DUK_DEFPROP_HAVE_WRITABLE set) */

Definition at line 381 of file duktape.h.

◆ duk_del_prop_literal

#define duk_del_prop_literal (   ctx,
  obj_idx,
  key 
)    duk_del_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)

Definition at line 1098 of file duktape.h.

◆ DUK_ENUM_ARRAY_INDICES_ONLY

#define DUK_ENUM_ARRAY_INDICES_ONLY   (1U << 5) /* only enumerate array indices */

Definition at line 361 of file duktape.h.

◆ DUK_ENUM_EXCLUDE_STRINGS

#define DUK_ENUM_EXCLUDE_STRINGS   (1U << 3) /* exclude strings */

Definition at line 359 of file duktape.h.

◆ DUK_ENUM_INCLUDE_HIDDEN

#define DUK_ENUM_INCLUDE_HIDDEN   (1U << 1) /* enumerate hidden symbols too (in Duktape 1.x called internal properties) */

Definition at line 357 of file duktape.h.

◆ DUK_ENUM_INCLUDE_NONENUMERABLE

#define DUK_ENUM_INCLUDE_NONENUMERABLE   (1U << 0) /* enumerate non-numerable properties in addition to enumerable */

Definition at line 356 of file duktape.h.

◆ DUK_ENUM_INCLUDE_SYMBOLS

#define DUK_ENUM_INCLUDE_SYMBOLS   (1U << 2) /* enumerate symbols */

Definition at line 358 of file duktape.h.

◆ DUK_ENUM_NO_PROXY_BEHAVIOR

#define DUK_ENUM_NO_PROXY_BEHAVIOR   (1U << 7) /* enumerate a proxy object itself without invoking proxy behavior */

Definition at line 364 of file duktape.h.

◆ DUK_ENUM_OWN_PROPERTIES_ONLY

#define DUK_ENUM_OWN_PROPERTIES_ONLY   (1U << 4) /* don't walk prototype chain, only check own properties */

Definition at line 360 of file duktape.h.

◆ DUK_ENUM_SORT_ARRAY_INDICES

#define DUK_ENUM_SORT_ARRAY_INDICES   (1U << 6) /* sort array indices (applied to full enumeration result, including inherited array indices); XXX: misleading name */

Definition at line 363 of file duktape.h.

◆ DUK_ERR_ERROR

#define DUK_ERR_ERROR   1 /* Error */

Definition at line 441 of file duktape.h.

◆ DUK_ERR_EVAL_ERROR

#define DUK_ERR_EVAL_ERROR   2 /* EvalError */

Definition at line 442 of file duktape.h.

◆ DUK_ERR_NONE

#define DUK_ERR_NONE   0 /* no error (e.g. from duk_get_error_code()) */

Definition at line 440 of file duktape.h.

◆ DUK_ERR_RANGE_ERROR

#define DUK_ERR_RANGE_ERROR   3 /* RangeError */

Definition at line 443 of file duktape.h.

◆ DUK_ERR_REFERENCE_ERROR

#define DUK_ERR_REFERENCE_ERROR   4 /* ReferenceError */

Definition at line 444 of file duktape.h.

◆ DUK_ERR_SYNTAX_ERROR

#define DUK_ERR_SYNTAX_ERROR   5 /* SyntaxError */

Definition at line 445 of file duktape.h.

◆ DUK_ERR_TYPE_ERROR

#define DUK_ERR_TYPE_ERROR   6 /* TypeError */

Definition at line 446 of file duktape.h.

◆ DUK_ERR_URI_ERROR

#define DUK_ERR_URI_ERROR   7 /* URIError */

Definition at line 447 of file duktape.h.

◆ duk_error

#define duk_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_error_stash) /* last value is func pointer, arguments follow in parens */
#define DUK_LINE_MACRO
Definition: duk_config.h:2757
duk_int_fast32_t duk_int_t
Definition: duk_config.h:2011
#define DUK_FILE_MACRO
Definition: duk_config.h:2754
DUK_EXTERNAL_DECL const char * duk_api_global_filename
Definition: duktape.h:496

Definition at line 579 of file duktape.h.

◆ duk_error_va

#define duk_error_va (   ctx,
  err_code,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 615 of file duktape.h.

◆ duk_eval

#define duk_eval (   ctx)     ((void) duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOFILENAME))

Definition at line 1245 of file duktape.h.

◆ duk_eval_error

#define duk_eval_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_eval_error_stash)

Definition at line 587 of file duktape.h.

◆ duk_eval_error_va

#define duk_eval_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_EVAL_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 619 of file duktape.h.

◆ duk_eval_lstring

#define duk_eval_lstring (   ctx,
  buf,
  len 
)     ((void) duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NOFILENAME))

Definition at line 1289 of file duktape.h.

◆ duk_eval_lstring_noresult

#define duk_eval_lstring_noresult (   ctx,
  buf,
  len 
)     ((void) duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))

Definition at line 1292 of file duktape.h.

◆ duk_eval_noresult

#define duk_eval_noresult (   ctx)     ((void) duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))

Definition at line 1248 of file duktape.h.

◆ duk_eval_string

#define duk_eval_string (   ctx,
  src 
)     ((void) duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))

Definition at line 1264 of file duktape.h.

◆ duk_eval_string_noresult

#define duk_eval_string_noresult (   ctx,
  src 
)     ((void) duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))

Definition at line 1267 of file duktape.h.

◆ DUK_EXEC_ERROR

#define DUK_EXEC_ERROR   1

Definition at line 460 of file duktape.h.

◆ DUK_EXEC_SUCCESS

#define DUK_EXEC_SUCCESS   0

Definition at line 459 of file duktape.h.

◆ duk_fatal

#define duk_fatal (   ctx,
  err_msg 
)     (duk_fatal_raw((ctx), (err_msg)), (duk_ret_t) 0)

Definition at line 541 of file duktape.h.

◆ DUK_GC_COMPACT

#define DUK_GC_COMPACT   (1U << 0) /* compact heap objects */

Definition at line 437 of file duktape.h.

◆ duk_generic_error

#define duk_generic_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_generic_error_stash)

Definition at line 583 of file duktape.h.

◆ duk_generic_error_va

#define duk_generic_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 617 of file duktape.h.

◆ duk_get_global_literal

#define duk_get_global_literal (   ctx,
  key 
)    duk_get_global_literal_raw((ctx), (key), sizeof((key)) - 1U)

Definition at line 1123 of file duktape.h.

◆ duk_get_prop_literal

#define duk_get_prop_literal (   ctx,
  obj_idx,
  key 
)    duk_get_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)

Definition at line 1076 of file duktape.h.

◆ DUK_GIT_BRANCH

#define DUK_GIT_BRANCH   "external"

Definition at line 194 of file duktape.h.

◆ DUK_GIT_COMMIT

#define DUK_GIT_COMMIT   "external"

Definition at line 192 of file duktape.h.

◆ DUK_GIT_DESCRIBE

#define DUK_GIT_DESCRIBE   "external"

Definition at line 193 of file duktape.h.

◆ DUK_GLOBAL_SYMBOL

#define DUK_GLOBAL_SYMBOL (   x)    ("\x80" x)

Definition at line 485 of file duktape.h.

◆ duk_has_prop_literal

#define duk_has_prop_literal (   ctx,
  obj_idx,
  key 
)    duk_has_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)

Definition at line 1109 of file duktape.h.

◆ DUK_HIDDEN_SYMBOL

#define DUK_HIDDEN_SYMBOL (   x)    ("\xFF" x)

Definition at line 484 of file duktape.h.

◆ DUK_HINT_NONE

#define DUK_HINT_NONE
Value:
0 /* prefer number, unless input is a Date, in which
* case prefer string (E5 Section 8.12.8)
*/

Definition at line 351 of file duktape.h.

◆ DUK_HINT_NUMBER

#define DUK_HINT_NUMBER   2 /* prefer number */

Definition at line 353 of file duktape.h.

◆ DUK_HINT_STRING

#define DUK_HINT_STRING   1 /* prefer string */

Definition at line 352 of file duktape.h.

◆ DUK_INTERNAL_SYMBOL

#define DUK_INTERNAL_SYMBOL (   x)    ("\x82" x)

Definition at line 488 of file duktape.h.

◆ DUK_INVALID_INDEX

#define DUK_INVALID_INDEX   DUK_IDX_MIN

Definition at line 310 of file duktape.h.

◆ duk_is_callable

#define duk_is_callable (   ctx,
  idx 
)     duk_is_function((ctx), (idx))

Definition at line 840 of file duktape.h.

◆ duk_is_error

#define duk_is_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) != 0)

Definition at line 871 of file duktape.h.

◆ duk_is_eval_error

#define duk_is_eval_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) == DUK_ERR_EVAL_ERROR)

Definition at line 873 of file duktape.h.

◆ duk_is_null_or_undefined

#define duk_is_null_or_undefined (   ctx,
  idx 
)     ((duk_get_type_mask((ctx), (idx)) & (DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_UNDEFINED)) ? 1 : 0)

Definition at line 819 of file duktape.h.

◆ duk_is_object_coercible

#define duk_is_object_coercible (   ctx,
  idx 
)
Value:
#define DUK_TYPE_MASK_STRING
Definition: duktape.h:342
#define DUK_TYPE_MASK_OBJECT
Definition: duktape.h:343
#define DUK_TYPE_MASK_BUFFER
Definition: duktape.h:344
#define DUK_TYPE_MASK_LIGHTFUNC
Definition: duktape.h:346
DUK_EXTERNAL_DECL duk_bool_t duk_check_type_mask(duk_context *ctx, duk_idx_t idx, duk_uint_t mask)
Definition: duktape.c:22647
#define DUK_TYPE_MASK_NUMBER
Definition: duktape.h:341
#define DUK_TYPE_MASK_BOOLEAN
Definition: duktape.h:340
#define DUK_TYPE_MASK_POINTER
Definition: duktape.h:345

Definition at line 861 of file duktape.h.

◆ duk_is_primitive

#define duk_is_primitive (   ctx,
  idx 
)
Value:

Definition at line 852 of file duktape.h.

◆ duk_is_range_error

#define duk_is_range_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) == DUK_ERR_RANGE_ERROR)

Definition at line 875 of file duktape.h.

◆ duk_is_reference_error

#define duk_is_reference_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) == DUK_ERR_REFERENCE_ERROR)

Definition at line 877 of file duktape.h.

◆ duk_is_syntax_error

#define duk_is_syntax_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) == DUK_ERR_SYNTAX_ERROR)

Definition at line 879 of file duktape.h.

◆ duk_is_type_error

#define duk_is_type_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) == DUK_ERR_TYPE_ERROR)

Definition at line 881 of file duktape.h.

◆ duk_is_uri_error

#define duk_is_uri_error (   ctx,
  idx 
)     (duk_get_error_code((ctx), (idx)) == DUK_ERR_URI_ERROR)

Definition at line 883 of file duktape.h.

◆ DUK_LEVEL_DDDEBUG

#define DUK_LEVEL_DDDEBUG   2

Definition at line 465 of file duktape.h.

◆ DUK_LEVEL_DDEBUG

#define DUK_LEVEL_DDEBUG   1

Definition at line 464 of file duktape.h.

◆ DUK_LEVEL_DEBUG

#define DUK_LEVEL_DEBUG   0

Definition at line 463 of file duktape.h.

◆ DUK_LOCAL_SYMBOL

#define DUK_LOCAL_SYMBOL (   x,
  uniq 
)    ("\x81" x "\xff" uniq)

Definition at line 486 of file duktape.h.

◆ duk_pcompile

#define duk_pcompile (   ctx,
  flags 
)     (duk_compile_raw((ctx), NULL, 0, 2 /*args*/ | (flags) | DUK_COMPILE_SAFE))

Definition at line 1260 of file duktape.h.

◆ duk_pcompile_lstring

#define duk_pcompile_lstring (   ctx,
  flags,
  buf,
  len 
)     (duk_compile_raw((ctx), buf, len, 0 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NOFILENAME))

Definition at line 1307 of file duktape.h.

◆ duk_pcompile_lstring_filename

#define duk_pcompile_lstring_filename (   ctx,
  flags,
  buf,
  len 
)     (duk_compile_raw((ctx), buf, len, 1 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE))

Definition at line 1310 of file duktape.h.

◆ duk_pcompile_string

#define duk_pcompile_string (   ctx,
  flags,
  src 
)     (duk_compile_raw((ctx), (src), 0, 0 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))

Definition at line 1282 of file duktape.h.

◆ duk_pcompile_string_filename

#define duk_pcompile_string_filename (   ctx,
  flags,
  src 
)     (duk_compile_raw((ctx), (src), 0, 1 /*args*/ | (flags) | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN))

Definition at line 1285 of file duktape.h.

◆ duk_peval

#define duk_peval (   ctx)     (duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOFILENAME))

Definition at line 1251 of file duktape.h.

◆ duk_peval_lstring

#define duk_peval_lstring (   ctx,
  buf,
  len 
)     (duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_SAFE | DUK_COMPILE_NOFILENAME))

Definition at line 1295 of file duktape.h.

◆ duk_peval_lstring_noresult

#define duk_peval_lstring_noresult (   ctx,
  buf,
  len 
)     (duk_eval_raw((ctx), buf, len, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))

Definition at line 1298 of file duktape.h.

◆ duk_peval_noresult

#define duk_peval_noresult (   ctx)     (duk_eval_raw((ctx), NULL, 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))

Definition at line 1254 of file duktape.h.

◆ duk_peval_string

#define duk_peval_string (   ctx,
  src 
)     (duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))

Definition at line 1270 of file duktape.h.

◆ duk_peval_string_noresult

#define duk_peval_string_noresult (   ctx,
  src 
)     (duk_eval_raw((ctx), (src), 0, 0 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_SAFE | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NORESULT | DUK_COMPILE_NOFILENAME))

Definition at line 1273 of file duktape.h.

◆ duk_push_buffer

#define duk_push_buffer (   ctx,
  size,
  dynamic 
)     duk_push_buffer_raw((ctx), (size), (dynamic) ? DUK_BUF_FLAG_DYNAMIC : 0)

Definition at line 770 of file duktape.h.

◆ duk_push_dynamic_buffer

#define duk_push_dynamic_buffer (   ctx,
  size 
)     duk_push_buffer_raw((ctx), (size), DUK_BUF_FLAG_DYNAMIC /*flags*/)

Definition at line 774 of file duktape.h.

◆ duk_push_error_object

#define duk_push_error_object
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_push_error_object_stash) /* last value is func pointer, arguments follow in parens */

Definition at line 754 of file duktape.h.

◆ duk_push_error_object_va

#define duk_push_error_object_va (   ctx,
  err_code,
  fmt,
  ap 
)     duk_push_error_object_va_raw((ctx), (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap))

Definition at line 761 of file duktape.h.

◆ duk_push_external_buffer

#define duk_push_external_buffer (   ctx)     ((void) duk_push_buffer_raw((ctx), 0, DUK_BUF_FLAG_DYNAMIC | DUK_BUF_FLAG_EXTERNAL))

Definition at line 776 of file duktape.h.

◆ duk_push_fixed_buffer

#define duk_push_fixed_buffer (   ctx,
  size 
)     duk_push_buffer_raw((ctx), (size), 0 /*flags*/)

Definition at line 772 of file duktape.h.

◆ duk_push_literal

#define duk_push_literal (   ctx,
  cstring 
)    duk_push_literal_raw((ctx), (cstring), sizeof((cstring)) - 1U)

Definition at line 719 of file duktape.h.

◆ duk_push_thread

#define duk_push_thread (   ctx)     duk_push_thread_raw((ctx), 0 /*flags*/)

Definition at line 740 of file duktape.h.

◆ duk_push_thread_new_globalenv

#define duk_push_thread_new_globalenv (   ctx)     duk_push_thread_raw((ctx), DUK_THREAD_NEW_GLOBAL_ENV /*flags*/)

Definition at line 743 of file duktape.h.

◆ duk_put_global_literal

#define duk_put_global_literal (   ctx,
  key 
)    duk_put_global_literal_raw((ctx), (key), sizeof((key)) - 1U)

Definition at line 1132 of file duktape.h.

◆ duk_put_prop_literal

#define duk_put_prop_literal (   ctx,
  obj_idx,
  key 
)    duk_put_prop_literal_raw((ctx), (obj_idx), (key), sizeof((key)) - 1U)

Definition at line 1087 of file duktape.h.

◆ duk_range_error

#define duk_range_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_range_error_stash)

Definition at line 591 of file duktape.h.

◆ duk_range_error_va

#define duk_range_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_RANGE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 621 of file duktape.h.

◆ duk_reference_error

#define duk_reference_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_reference_error_stash)

Definition at line 595 of file duktape.h.

◆ duk_reference_error_va

#define duk_reference_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_REFERENCE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 623 of file duktape.h.

◆ duk_require_callable

#define duk_require_callable (   ctx,
  idx 
)     duk_require_function((ctx), (idx))

Definition at line 967 of file duktape.h.

◆ duk_require_object_coercible

#define duk_require_object_coercible (   ctx,
  idx 
)

◆ duk_require_type_mask

#define duk_require_type_mask (   ctx,
  idx,
  mask 
)     ((void) duk_check_type_mask((ctx), (idx), (mask) | DUK_TYPE_MASK_THROW))

Definition at line 949 of file duktape.h.

◆ DUK_RET_ERROR

#define DUK_RET_ERROR   (-DUK_ERR_ERROR)

Definition at line 450 of file duktape.h.

◆ DUK_RET_EVAL_ERROR

#define DUK_RET_EVAL_ERROR   (-DUK_ERR_EVAL_ERROR)

Definition at line 451 of file duktape.h.

◆ DUK_RET_RANGE_ERROR

#define DUK_RET_RANGE_ERROR   (-DUK_ERR_RANGE_ERROR)

Definition at line 452 of file duktape.h.

◆ DUK_RET_REFERENCE_ERROR

#define DUK_RET_REFERENCE_ERROR   (-DUK_ERR_REFERENCE_ERROR)

Definition at line 453 of file duktape.h.

◆ DUK_RET_SYNTAX_ERROR

#define DUK_RET_SYNTAX_ERROR   (-DUK_ERR_SYNTAX_ERROR)

Definition at line 454 of file duktape.h.

◆ DUK_RET_TYPE_ERROR

#define DUK_RET_TYPE_ERROR   (-DUK_ERR_TYPE_ERROR)

Definition at line 455 of file duktape.h.

◆ DUK_RET_URI_ERROR

#define DUK_RET_URI_ERROR   (-DUK_ERR_URI_ERROR)

Definition at line 456 of file duktape.h.

◆ duk_safe_to_string

#define duk_safe_to_string (   ctx,
  idx 
)     duk_safe_to_lstring((ctx), (idx), NULL)

Definition at line 1022 of file duktape.h.

◆ DUK_SINGLE_FILE

#define DUK_SINGLE_FILE

Definition at line 169 of file duktape.h.

◆ duk_syntax_error

#define duk_syntax_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_syntax_error_stash)

Definition at line 599 of file duktape.h.

◆ duk_syntax_error_va

#define duk_syntax_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_SYNTAX_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 625 of file duktape.h.

◆ DUK_THREAD_NEW_GLOBAL_ENV

#define DUK_THREAD_NEW_GLOBAL_ENV   (1U << 0) /* create a new global environment */

Definition at line 434 of file duktape.h.

◆ duk_throw

#define duk_throw (   ctx)     (duk_throw_raw((ctx)), (duk_ret_t) 0)

Definition at line 538 of file duktape.h.

◆ duk_to_buffer

#define duk_to_buffer (   ctx,
  idx,
  out_size 
)     duk_to_buffer_raw((ctx), (idx), (out_size), DUK_BUF_MODE_DONTCARE)

Definition at line 1011 of file duktape.h.

◆ duk_to_dynamic_buffer

#define duk_to_dynamic_buffer (   ctx,
  idx,
  out_size 
)     duk_to_buffer_raw((ctx), (idx), (out_size), DUK_BUF_MODE_DYNAMIC)

Definition at line 1015 of file duktape.h.

◆ duk_to_fixed_buffer

#define duk_to_fixed_buffer (   ctx,
  idx,
  out_size 
)     duk_to_buffer_raw((ctx), (idx), (out_size), DUK_BUF_MODE_FIXED)

Definition at line 1013 of file duktape.h.

◆ DUK_TYPE_BOOLEAN

#define DUK_TYPE_BOOLEAN   3U /* ECMAScript boolean: 0 or 1 */

Definition at line 327 of file duktape.h.

◆ DUK_TYPE_BUFFER

#define DUK_TYPE_BUFFER   7U /* fixed or dynamic, garbage collected byte buffer */

Definition at line 331 of file duktape.h.

◆ duk_type_error

#define duk_type_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_type_error_stash)

Definition at line 603 of file duktape.h.

◆ duk_type_error_va

#define duk_type_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_TYPE_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 627 of file duktape.h.

◆ DUK_TYPE_LIGHTFUNC

#define DUK_TYPE_LIGHTFUNC   9U /* lightweight function pointer */

Definition at line 333 of file duktape.h.

◆ DUK_TYPE_MASK_BOOLEAN

#define DUK_TYPE_MASK_BOOLEAN   (1U << DUK_TYPE_BOOLEAN)

Definition at line 340 of file duktape.h.

◆ DUK_TYPE_MASK_BUFFER

#define DUK_TYPE_MASK_BUFFER   (1U << DUK_TYPE_BUFFER)

Definition at line 344 of file duktape.h.

◆ DUK_TYPE_MASK_LIGHTFUNC

#define DUK_TYPE_MASK_LIGHTFUNC   (1U << DUK_TYPE_LIGHTFUNC)

Definition at line 346 of file duktape.h.

◆ DUK_TYPE_MASK_NONE

#define DUK_TYPE_MASK_NONE   (1U << DUK_TYPE_NONE)

Definition at line 337 of file duktape.h.

◆ DUK_TYPE_MASK_NULL

#define DUK_TYPE_MASK_NULL   (1U << DUK_TYPE_NULL)

Definition at line 339 of file duktape.h.

◆ DUK_TYPE_MASK_NUMBER

#define DUK_TYPE_MASK_NUMBER   (1U << DUK_TYPE_NUMBER)

Definition at line 341 of file duktape.h.

◆ DUK_TYPE_MASK_OBJECT

#define DUK_TYPE_MASK_OBJECT   (1U << DUK_TYPE_OBJECT)

Definition at line 343 of file duktape.h.

◆ DUK_TYPE_MASK_POINTER

#define DUK_TYPE_MASK_POINTER   (1U << DUK_TYPE_POINTER)

Definition at line 345 of file duktape.h.

◆ DUK_TYPE_MASK_PROMOTE

#define DUK_TYPE_MASK_PROMOTE   (1U << 11) /* internal flag value: promote to object if mask matches */

Definition at line 348 of file duktape.h.

◆ DUK_TYPE_MASK_STRING

#define DUK_TYPE_MASK_STRING   (1U << DUK_TYPE_STRING)

Definition at line 342 of file duktape.h.

◆ DUK_TYPE_MASK_THROW

#define DUK_TYPE_MASK_THROW   (1U << 10) /* internal flag value: throw if mask doesn't match */

Definition at line 347 of file duktape.h.

◆ DUK_TYPE_MASK_UNDEFINED

#define DUK_TYPE_MASK_UNDEFINED   (1U << DUK_TYPE_UNDEFINED)

Definition at line 338 of file duktape.h.

◆ DUK_TYPE_MAX

#define DUK_TYPE_MAX   9U

Definition at line 334 of file duktape.h.

◆ DUK_TYPE_MIN

#define DUK_TYPE_MIN   0U

Definition at line 323 of file duktape.h.

◆ DUK_TYPE_NONE

#define DUK_TYPE_NONE   0U /* no value, e.g. invalid index */

Definition at line 324 of file duktape.h.

◆ DUK_TYPE_NULL

#define DUK_TYPE_NULL   2U /* ECMAScript null */

Definition at line 326 of file duktape.h.

◆ DUK_TYPE_NUMBER

#define DUK_TYPE_NUMBER   4U /* ECMAScript number: double */

Definition at line 328 of file duktape.h.

◆ DUK_TYPE_OBJECT

#define DUK_TYPE_OBJECT   6U /* ECMAScript object: includes objects, arrays, functions, threads */

Definition at line 330 of file duktape.h.

◆ DUK_TYPE_POINTER

#define DUK_TYPE_POINTER   8U /* raw void pointer */

Definition at line 332 of file duktape.h.

◆ DUK_TYPE_STRING

#define DUK_TYPE_STRING   5U /* ECMAScript string: CESU-8 / extended UTF-8 encoded */

Definition at line 329 of file duktape.h.

◆ DUK_TYPE_UNDEFINED

#define DUK_TYPE_UNDEFINED   1U /* ECMAScript undefined */

Definition at line 325 of file duktape.h.

◆ duk_uri_error

#define duk_uri_error
Value:
(duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
duk_uri_error_stash)

Definition at line 607 of file duktape.h.

◆ duk_uri_error_va

#define duk_uri_error_va (   ctx,
  fmt,
  ap 
)     (duk_error_va_raw((ctx), (duk_errcode_t) DUK_ERR_URI_ERROR, (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)), (duk_ret_t) 0)

Definition at line 629 of file duktape.h.

◆ DUK_VARARGS

#define DUK_VARARGS   ((duk_int_t) (-1))

Definition at line 315 of file duktape.h.

◆ DUK_VERSION

#define DUK_VERSION   20700L

Definition at line 185 of file duktape.h.

◆ DUK_WELLKNOWN_SYMBOL

#define DUK_WELLKNOWN_SYMBOL (   x)    ("\x81" x "\xff")

Definition at line 487 of file duktape.h.

◆ duk_xcopy_top

#define duk_xcopy_top (   to_ctx,
  from_ctx,
  count 
)     duk_xcopymove_raw((to_ctx), (from_ctx), (count), 1 /*is_copy*/)

Definition at line 682 of file duktape.h.

◆ duk_xmove_top

#define duk_xmove_top (   to_ctx,
  from_ctx,
  count 
)     duk_xcopymove_raw((to_ctx), (from_ctx), (count), 0 /*is_copy*/)

Definition at line 680 of file duktape.h.

Typedef Documentation

◆ duk_alloc_function

typedef void *(* duk_alloc_function) (void *udata, duk_size_t size)

Definition at line 247 of file duktape.h.

◆ duk_c_function

typedef duk_ret_t(* duk_c_function) (duk_context *ctx)

Definition at line 246 of file duktape.h.

◆ duk_debug_detached_function

typedef void(* duk_debug_detached_function) (duk_context *ctx, void *udata)

Definition at line 260 of file duktape.h.

◆ duk_debug_peek_function

typedef duk_size_t(* duk_debug_peek_function) (void *udata)

Definition at line 256 of file duktape.h.

◆ duk_debug_read_flush_function

typedef void(* duk_debug_read_flush_function) (void *udata)

Definition at line 257 of file duktape.h.

◆ duk_debug_read_function

typedef duk_size_t(* duk_debug_read_function) (void *udata, char *buffer, duk_size_t length)

Definition at line 254 of file duktape.h.

◆ duk_debug_request_function

typedef duk_idx_t(* duk_debug_request_function) (duk_context *ctx, void *udata, duk_idx_t nvalues)

Definition at line 259 of file duktape.h.

◆ duk_debug_write_flush_function

typedef void(* duk_debug_write_flush_function) (void *udata)

Definition at line 258 of file duktape.h.

◆ duk_debug_write_function

typedef duk_size_t(* duk_debug_write_function) (void *udata, const char *buffer, duk_size_t length)

Definition at line 255 of file duktape.h.

◆ duk_decode_char_function

typedef void(* duk_decode_char_function) (void *udata, duk_codepoint_t codepoint)

Definition at line 251 of file duktape.h.

◆ duk_fatal_function

typedef void(* duk_fatal_function) (void *udata, const char *msg)

Definition at line 250 of file duktape.h.

◆ duk_free_function

typedef void(* duk_free_function) (void *udata, void *ptr)

Definition at line 249 of file duktape.h.

◆ duk_function_list_entry

Definition at line 242 of file duktape.h.

◆ duk_map_char_function

typedef duk_codepoint_t(* duk_map_char_function) (void *udata, duk_codepoint_t codepoint)

Definition at line 252 of file duktape.h.

◆ duk_memory_functions

Definition at line 241 of file duktape.h.

◆ duk_number_list_entry

Definition at line 243 of file duktape.h.

◆ duk_realloc_function

typedef void *(* duk_realloc_function) (void *udata, void *ptr, duk_size_t size)

Definition at line 248 of file duktape.h.

◆ duk_safe_call_function

typedef duk_ret_t(* duk_safe_call_function) (duk_context *ctx, void *udata)

Definition at line 253 of file duktape.h.

◆ duk_thread_state

Definition at line 240 of file duktape.h.

◆ duk_time_components

Definition at line 244 of file duktape.h.

Function Documentation

◆ duk_alloc()

DUK_EXTERNAL_DECL void * duk_alloc ( duk_context ctx,
duk_size_t  size 
)

Definition at line 17582 of file duktape.c.

References DUK_ASSERT_API_ENTRY, DUK_FREE_RAW, and duk_hthread::heap.

◆ duk_alloc_raw()

DUK_EXTERNAL_DECL void * duk_alloc_raw ( duk_context ctx,
duk_size_t  size 
)

Definition at line 17564 of file duktape.c.

◆ DUK_API_NORETURN() [1/6]

DUK_API_NORETURN ( DUK_EXTERNAL_DECL duk_ret_t   duk_error_stashduk_context *ctx, duk_errcode_t err_code, const char *fmt,...)

◆ DUK_API_NORETURN() [2/6]

DUK_API_NORETURN ( DUK_EXTERNAL_DECL duk_ret_t   duk_generic_error_stashduk_context *ctx, const char *fmt,...)

◆ DUK_API_NORETURN() [3/6]

DUK_API_NORETURN ( DUK_EXTERNAL_DECL void   duk_error_rawduk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt,...)

◆ DUK_API_NORETURN() [4/6]

DUK_API_NORETURN ( DUK_EXTERNAL_DECL void   duk_error_va_rawduk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap)

◆ DUK_API_NORETURN() [5/6]

DUK_API_NORETURN ( DUK_EXTERNAL_DECL void   duk_fatal_rawduk_context *ctx, const char *err_msg)

◆ DUK_API_NORETURN() [6/6]

DUK_API_NORETURN ( DUK_EXTERNAL_DECL void   duk_throw_rawduk_context *ctx)

◆ duk_base64_decode()

DUK_EXTERNAL_DECL void duk_base64_decode ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 16373 of file duktape.c.

◆ duk_base64_encode()

DUK_EXTERNAL_DECL const char * duk_base64_encode ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 16337 of file duktape.c.

◆ duk_buffer_to_string()

DUK_EXTERNAL_DECL const char * duk_buffer_to_string ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22192 of file duktape.c.

◆ duk_call()

DUK_EXTERNAL_DECL void duk_call ( duk_context ctx,
duk_idx_t  nargs 
)

Definition at line 15320 of file duktape.c.

Referenced by duk_bi_string_prototype_replace(), and dukky_populate_object().

Here is the caller graph for this function:

◆ duk_call_method()

DUK_EXTERNAL_DECL void duk_call_method ( duk_context ctx,
duk_idx_t  nargs 
)

Definition at line 15335 of file duktape.c.

Referenced by duk_bi_array_prototype_iter_shared(), duk_bi_array_prototype_join_shared(), and duk_hobject_putprop().

Here is the caller graph for this function:

◆ duk_call_prop()

DUK_EXTERNAL_DECL void duk_call_prop ( duk_context ctx,
duk_idx_t  obj_idx,
duk_idx_t  nargs 
)

Definition at line 15348 of file duktape.c.

◆ duk_cbor_decode()

DUK_EXTERNAL_DECL void duk_cbor_decode ( duk_context ctx,
duk_idx_t  idx,
duk_uint_t  decode_flags 
)

Definition at line 32617 of file duktape.c.

◆ duk_cbor_encode()

DUK_EXTERNAL_DECL void duk_cbor_encode ( duk_context ctx,
duk_idx_t  idx,
duk_uint_t  encode_flags 
)

Definition at line 32613 of file duktape.c.

References DUK_ERROR_UNSUPPORTED, and DUK_UNREF.

◆ duk_char_code_at()

DUK_EXTERNAL_DECL duk_codepoint_t duk_char_code_at ( duk_context ctx,
duk_idx_t  idx,
duk_size_t  char_offset 
)

Definition at line 25950 of file duktape.c.

◆ duk_check_stack()

DUK_EXTERNAL_DECL duk_bool_t duk_check_stack ( duk_context ctx,
duk_idx_t  extra 
)

Definition at line 19657 of file duktape.c.

Referenced by duk_hobject_realloc_props().

Here is the caller graph for this function:

◆ duk_check_stack_top()

DUK_EXTERNAL_DECL duk_bool_t duk_check_stack_top ( duk_context ctx,
duk_idx_t  top 
)

Definition at line 19703 of file duktape.c.

◆ duk_check_type()

DUK_EXTERNAL_DECL duk_bool_t duk_check_type ( duk_context ctx,
duk_idx_t  idx,
duk_int_t  type 
)

Definition at line 22591 of file duktape.c.

Referenced by duk__error_getter_helper().

Here is the caller graph for this function:

◆ duk_check_type_mask()

DUK_EXTERNAL_DECL duk_bool_t duk_check_type_mask ( duk_context ctx,
duk_idx_t  idx,
duk_uint_t  mask 
)

Definition at line 22647 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, duk_get_tval_or_unused(), and duk_get_type_mask_tval().

Referenced by duk_get_buffer_default(), duk_opt_string(), and duk_require_buffer_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_compact()

DUK_EXTERNAL_DECL void duk_compact ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 18248 of file duktape.c.

◆ duk_compile_raw()

DUK_EXTERNAL_DECL duk_int_t duk_compile_raw ( duk_context ctx,
const char *  src_buffer,
duk_size_t  src_length,
duk_uint_t  flags 
)

Definition at line 16776 of file duktape.c.

◆ duk_components_to_time()

DUK_EXTERNAL_DECL duk_double_t duk_components_to_time ( duk_context ctx,
duk_time_components comp 
)

Definition at line 26049 of file duktape.c.

◆ duk_concat()

DUK_EXTERNAL_DECL void duk_concat ( duk_context ctx,
duk_idx_t  count 
)

Definition at line 25701 of file duktape.c.

Referenced by duk_bi_regexp_prototype_flags(), and dukky_get_current_value_of_event_handler().

Here is the caller graph for this function:

◆ duk_config_buffer()

DUK_EXTERNAL_DECL void duk_config_buffer ( duk_context ctx,
duk_idx_t  idx,
void *  ptr,
duk_size_t  len 
)

Definition at line 14398 of file duktape.c.

◆ duk_copy()

DUK_EXTERNAL_DECL void duk_copy ( duk_context ctx,
duk_idx_t  from_idx,
duk_idx_t  to_idx 
)

Definition at line 19959 of file duktape.c.

◆ duk_create_heap()

DUK_EXTERNAL_DECL duk_context * duk_create_heap ( duk_alloc_function  alloc_func,
duk_realloc_function  realloc_func,
duk_free_function  free_func,
void *  heap_udata,
duk_fatal_function  fatal_handler 
)

Definition at line 17094 of file duktape.c.

Referenced by js_newheap().

Here is the caller graph for this function:

◆ duk_debugger_attach()

DUK_EXTERNAL_DECL void duk_debugger_attach ( duk_context ctx,
duk_debug_read_function  read_cb,
duk_debug_write_function  write_cb,
duk_debug_peek_function  peek_cb,
duk_debug_read_flush_function  read_flush_cb,
duk_debug_write_flush_function  write_flush_cb,
duk_debug_request_function  request_cb,
duk_debug_detached_function  detached_cb,
void *  udata 
)

Definition at line 17021 of file duktape.c.

◆ duk_debugger_cooperate()

DUK_EXTERNAL_DECL void duk_debugger_cooperate ( duk_context ctx)

Definition at line 17049 of file duktape.c.

◆ duk_debugger_detach()

DUK_EXTERNAL_DECL void duk_debugger_detach ( duk_context ctx)

Definition at line 17043 of file duktape.c.

◆ duk_debugger_notify()

DUK_EXTERNAL_DECL duk_bool_t duk_debugger_notify ( duk_context ctx,
duk_idx_t  nvalues 
)

Definition at line 17055 of file duktape.c.

References DUK_ASSERT_API_ENTRY, DUK_ERROR_TYPE, and DUK_WO_NORETURN.

◆ duk_debugger_pause()

DUK_EXTERNAL_DECL void duk_debugger_pause ( duk_context ctx)

Definition at line 17071 of file duktape.c.

◆ duk_decode_string()

DUK_EXTERNAL_DECL void duk_decode_string ( duk_context ctx,
duk_idx_t  idx,
duk_decode_char_function  callback,
void *  udata 
)

Definition at line 25762 of file duktape.c.

References count(), duk__concat_and_join_helper(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_def_prop()

DUK_EXTERNAL_DECL void duk_def_prop ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uint_t  flags 
)

Definition at line 18169 of file duktape.c.

Referenced by duk_proxy_ownkeys_postprocess().

Here is the caller graph for this function:

◆ duk_del_prop()

DUK_EXTERNAL_DECL duk_bool_t duk_del_prop ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 17899 of file duktape.c.

Referenced by js_event_cleanup().

Here is the caller graph for this function:

◆ duk_del_prop_heapptr()

DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_heapptr ( duk_context ctx,
duk_idx_t  obj_idx,
void *  ptr 
)

Definition at line 17960 of file duktape.c.

◆ duk_del_prop_index()

DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_index ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uarridx_t  arr_idx 
)

Definition at line 17952 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, duk_push_literal_raw(), and duk_require_normalize_index().

Referenced by duk_bi_array_prototype_splice(), dukky_destroythread(), and dukky_shuffle_array().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_del_prop_literal_raw()

DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_literal_raw ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 17941 of file duktape.c.

◆ duk_del_prop_lstring()

DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_lstring ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 17931 of file duktape.c.

◆ duk_del_prop_string()

DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_string ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key 
)

Definition at line 17922 of file duktape.c.

Referenced by js_newthread().

Here is the caller graph for this function:

◆ duk_destroy_heap()

DUK_EXTERNAL_DECL void duk_destroy_heap ( duk_context ctx)

Definition at line 17145 of file duktape.c.

Referenced by dukky_destroyheap().

Here is the caller graph for this function:

◆ duk_dump_function()

DUK_EXTERNAL_DECL void duk_dump_function ( duk_context ctx)

Definition at line 15102 of file duktape.c.

◆ duk_dup()

DUK_EXTERNAL_DECL void duk_dup ( duk_context ctx,
duk_idx_t  from_idx 
)

Definition at line 19777 of file duktape.c.

Referenced by duk__load_func(), duk_bi_array_prototype_splice(), duk_dup_m2(), duk_dup_m3(), duk_dup_m4(), duk_lexer_parse_js_input_element(), dukky_event_target_push_listeners(), dukky_generic_event_handler(), dukky_populate_object(), dukky_push_event(), dukky_push_node(), and dukky_push_node_stacked().

Here is the caller graph for this function:

◆ duk_dup_top()

DUK_EXTERNAL_DECL void duk_dup_top ( duk_context ctx)

Definition at line 19792 of file duktape.c.

Referenced by duk__init_varmap_and_prologue_for_pass2(), duk__parse_var_decl(), duk_bi_array_prototype_iter_shared(), duk_get_prop_desc(), and dukky_dump_error().

Here is the caller graph for this function:

◆ duk_enum()

DUK_EXTERNAL_DECL void duk_enum ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uint_t  enum_flags 
)

Definition at line 18268 of file duktape.c.

◆ duk_equals()

DUK_EXTERNAL_DECL duk_bool_t duk_equals ( duk_context ctx,
duk_idx_t  idx1,
duk_idx_t  idx2 
)

Definition at line 25194 of file duktape.c.

◆ duk_eval_raw()

DUK_EXTERNAL_DECL duk_int_t duk_eval_raw ( duk_context ctx,
const char *  src_buffer,
duk_size_t  src_length,
duk_uint_t  flags 
)

Definition at line 16657 of file duktape.c.

◆ duk_free()

DUK_EXTERNAL_DECL void duk_free ( duk_context ctx,
void *  ptr 
)

Definition at line 17588 of file duktape.c.

References DUK_ASSERT_API_ENTRY, DUK_REALLOC_RAW, and duk_hthread::heap.

◆ duk_free_raw()

DUK_EXTERNAL_DECL void duk_free_raw ( duk_context ctx,
void *  ptr 
)

Definition at line 17570 of file duktape.c.

◆ duk_freeze()

DUK_EXTERNAL_DECL void duk_freeze ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 18345 of file duktape.c.

◆ duk_gc()

DUK_EXTERNAL_DECL void duk_gc ( duk_context ctx,
duk_uint_t  flags 
)

Definition at line 17625 of file duktape.c.

Referenced by dukky_destroythread().

Here is the caller graph for this function:

◆ duk_get_boolean()

DUK_EXTERNAL_DECL duk_bool_t duk_get_boolean ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20231 of file duktape.c.

Referenced by js_exec().

Here is the caller graph for this function:

◆ duk_get_boolean_default()

DUK_EXTERNAL_DECL duk_bool_t duk_get_boolean_default ( duk_context ctx,
duk_idx_t  idx,
duk_bool_t  def_value 
)

Definition at line 20237 of file duktape.c.

◆ duk_get_buffer()

DUK_EXTERNAL_DECL void * duk_get_buffer ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size 
)

Definition at line 20675 of file duktape.c.

◆ duk_get_buffer_data()

DUK_EXTERNAL_DECL void * duk_get_buffer_data ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size 
)

Definition at line 20781 of file duktape.c.

◆ duk_get_buffer_data_default()

DUK_EXTERNAL_DECL void * duk_get_buffer_data_default ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size,
void *  def_ptr,
duk_size_t  def_len 
)

Definition at line 20786 of file duktape.c.

References DUK_ERROR_REQUIRE_TYPE_INDEX, DUK_STR_NOT_BUFFER, and DUK_WO_NORETURN.

◆ duk_get_buffer_default()

DUK_EXTERNAL_DECL void * duk_get_buffer_default ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size,
void *  def_ptr,
duk_size_t  def_len 
)

Definition at line 20693 of file duktape.c.

References DUK_ASSERT_API_ENTRY, duk_check_type_mask(), duk_require_buffer(), DUK_TYPE_MASK_NONE, and DUK_TYPE_MASK_UNDEFINED.

Here is the call graph for this function:

◆ duk_get_c_function()

DUK_EXTERNAL_DECL duk_c_function duk_get_c_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20988 of file duktape.c.

◆ duk_get_c_function_default()

DUK_EXTERNAL_DECL duk_c_function duk_get_c_function_default ( duk_context ctx,
duk_idx_t  idx,
duk_c_function  def_value 
)

Definition at line 21021 of file duktape.c.

◆ duk_get_context()

DUK_EXTERNAL_DECL duk_context * duk_get_context ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21068 of file duktape.c.

◆ duk_get_context_default()

DUK_EXTERNAL_DECL duk_context * duk_get_context_default ( duk_context ctx,
duk_idx_t  idx,
duk_context def_value 
)

Definition at line 21089 of file duktape.c.

◆ duk_get_current_magic()

DUK_EXTERNAL_DECL duk_int_t duk_get_current_magic ( duk_context ctx)

◆ duk_get_error_code()

DUK_EXTERNAL_DECL duk_errcode_t duk_get_error_code ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22923 of file duktape.c.

◆ duk_get_finalizer()

DUK_EXTERNAL_DECL void duk_get_finalizer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 18618 of file duktape.c.

◆ duk_get_global_heapptr()

DUK_EXTERNAL_DECL duk_bool_t duk_get_global_heapptr ( duk_context ctx,
void *  ptr 
)

Definition at line 18437 of file duktape.c.

◆ duk_get_global_literal_raw()

DUK_EXTERNAL_DECL duk_bool_t duk_get_global_literal_raw ( duk_context ctx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 18421 of file duktape.c.

◆ duk_get_global_lstring()

DUK_EXTERNAL_DECL duk_bool_t duk_get_global_lstring ( duk_context ctx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 18406 of file duktape.c.

◆ duk_get_global_string()

DUK_EXTERNAL_DECL duk_bool_t duk_get_global_string ( duk_context ctx,
const char *  key 
)

Definition at line 18392 of file duktape.c.

Referenced by dukky_destroythread(), dukky_populate_object(), dukky_push_event(), dukky_push_generics(), dukky_push_node(), dukky_push_node_stacked(), js_closethread(), js_event_cleanup(), js_fire_event(), and js_newthread().

Here is the caller graph for this function:

◆ duk_get_heapptr()

DUK_EXTERNAL_DECL void * duk_get_heapptr ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21102 of file duktape.c.

◆ duk_get_heapptr_default()

DUK_EXTERNAL_DECL void * duk_get_heapptr_default ( duk_context ctx,
duk_idx_t  idx,
void *  def_value 
)

Definition at line 21128 of file duktape.c.

◆ duk_get_int()

DUK_EXTERNAL_DECL duk_int_t duk_get_int ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20341 of file duktape.c.

Referenced by duk_bi_buffer_readfield(), duk_bi_global_object_eval(), dukky_generic_event_handler(), and dukky_populate_object().

Here is the caller graph for this function:

◆ duk_get_int_default()

DUK_EXTERNAL_DECL duk_int_t duk_get_int_default ( duk_context ctx,
duk_idx_t  idx,
duk_int_t  def_value 
)

Definition at line 20353 of file duktape.c.

References duk__api_coerce_d2i(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_get_length()

DUK_EXTERNAL_DECL duk_size_t duk_get_length ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21251 of file duktape.c.

References DUK_ERROR_REQUIRE_TYPE_INDEX, DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX, DUK_HSTRING_GET_DATA, DUK_HTHREAD_GET_STRING, DUK_STR_UNEXPECTED_TYPE, DUK_UNREF, and DUK_WO_NORETURN.

Referenced by duk__init_varmap_and_prologue_for_pass2(), duk__load_func(), duk__parse_var_decl(), duk_bi_string_prototype_replace(), duk_bi_typedarray_set(), and duk_proxy_ownkeys_postprocess().

Here is the caller graph for this function:

◆ duk_get_lstring()

DUK_EXTERNAL_DECL const char * duk_get_lstring ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_len 
)

Definition at line 20395 of file duktape.c.

◆ duk_get_lstring_default()

DUK_EXTERNAL_DECL const char * duk_get_lstring_default ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_len,
const char *  def_ptr,
duk_size_t  def_len 
)

Definition at line 20481 of file duktape.c.

◆ duk_get_magic()

DUK_EXTERNAL_DECL duk_int_t duk_get_magic ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 15638 of file duktape.c.

◆ duk_get_memory_functions()

DUK_EXTERNAL_DECL void duk_get_memory_functions ( duk_context ctx,
duk_memory_functions out_funcs 
)

Definition at line 17610 of file duktape.c.

Referenced by dukky_reset_start_time().

Here is the caller graph for this function:

◆ duk_get_now()

DUK_EXTERNAL_DECL duk_double_t duk_get_now ( duk_context ctx)

Definition at line 26003 of file duktape.c.

◆ duk_get_number()

DUK_EXTERNAL_DECL duk_double_t duk_get_number ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20298 of file duktape.c.

Referenced by duk_js_tonumber().

Here is the caller graph for this function:

◆ duk_get_number_default()

DUK_EXTERNAL_DECL duk_double_t duk_get_number_default ( duk_context ctx,
duk_idx_t  idx,
duk_double_t  def_value 
)

Definition at line 20303 of file duktape.c.

◆ duk_get_pointer()

DUK_EXTERNAL_DECL void * duk_get_pointer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20578 of file duktape.c.

◆ duk_get_pointer_default()

DUK_EXTERNAL_DECL void * duk_get_pointer_default ( duk_context ctx,
duk_idx_t  idx,
void *  def_value 
)

Definition at line 20592 of file duktape.c.

◆ duk_get_prop()

DUK_EXTERNAL_DECL duk_bool_t duk_get_prop ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 17652 of file duktape.c.

References DUK_ASSERT_API_ENTRY.

Referenced by duk__init_varmap_and_prologue_for_pass2(), duk_hobject_get_enumerated_keys(), dukky_event_target_push_listeners(), dukky_get_current_value_of_event_handler(), dukky_populate_object(), dukky_push_event(), dukky_push_node(), dukky_push_node_stacked(), and js_fire_event().

Here is the caller graph for this function:

◆ duk_get_prop_desc()

DUK_EXTERNAL_DECL void duk_get_prop_desc ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uint_t  flags 
)

Definition at line 18161 of file duktape.c.

References DUK_ASSERT_API_ENTRY, DUK_BIDX_TYPE_ERROR_THROWER, duk_dup_top(), duk_push_hobject_bidx(), duk_push_hstring_stridx(), and duk_require_normalize_index().

Here is the call graph for this function:

◆ duk_get_prop_heapptr()

DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_heapptr ( duk_context ctx,
duk_idx_t  obj_idx,
void *  ptr 
)

Definition at line 17713 of file duktape.c.

◆ duk_get_prop_index()

DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_index ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uarridx_t  arr_idx 
)

Definition at line 17705 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, duk_push_literal_raw(), and duk_require_normalize_index().

Referenced by duk__error_getter_helper(), duk__init_varmap_and_prologue_for_pass2(), duk_bi_array_prototype_iter_shared(), duk_bi_array_prototype_join_shared(), duk_bi_array_prototype_splice(), duk_bi_string_prototype_replace(), duk_bi_typedarray_set(), duk_proxy_ownkeys_postprocess(), dukky_generic_event_handler(), and dukky_shuffle_array().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_get_prop_literal_raw()

DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_literal_raw ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 17694 of file duktape.c.

◆ duk_get_prop_lstring()

DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_lstring ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 17684 of file duktape.c.

◆ duk_get_prop_string()

DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_string ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key 
)

Definition at line 17675 of file duktape.c.

Referenced by duk__safe_to_stacktrace_raw(), dukky_event_target_push_listeners(), dukky_generic_event_handler(), dukky_get_current_value_of_event_handler(), dukky_populate_object(), dukky_push_generics(), dukky_register_event_listener_for(), js_fire_event(), and js_newthread().

Here is the caller graph for this function:

◆ duk_get_prototype()

DUK_EXTERNAL_DECL void duk_get_prototype ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 18535 of file duktape.c.

◆ duk_get_string()

DUK_EXTERNAL_DECL const char * duk_get_string ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20443 of file duktape.c.

Referenced by duk__error_getter_helper(), and dukky_populate_object().

Here is the caller graph for this function:

◆ duk_get_string_default()

DUK_EXTERNAL_DECL const char * duk_get_string_default ( duk_context ctx,
duk_idx_t  idx,
const char *  def_value 
)

Definition at line 20507 of file duktape.c.

◆ duk_get_top()

DUK_EXTERNAL_DECL duk_idx_t duk_get_top ( duk_context ctx)

◆ duk_get_top_index()

DUK_EXTERNAL_DECL duk_idx_t duk_get_top_index ( duk_context ctx)

Definition at line 19281 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, duk_set_top_unsafe(), and duk_hthread::valstack_bottom.

Referenced by duk__error_getter_helper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_get_type()

DUK_EXTERNAL_DECL duk_int_t duk_get_type ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22537 of file duktape.c.

Referenced by duk__error_getter_helper().

Here is the caller graph for this function:

◆ duk_get_type_mask()

DUK_EXTERNAL_DECL duk_uint_t duk_get_type_mask ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22636 of file duktape.c.

◆ duk_get_uint()

DUK_EXTERNAL_DECL duk_uint_t duk_get_uint ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20347 of file duktape.c.

Referenced by duk_bi_string_prototype_replace().

Here is the caller graph for this function:

◆ duk_get_uint_default()

DUK_EXTERNAL_DECL duk_uint_t duk_get_uint_default ( duk_context ctx,
duk_idx_t  idx,
duk_uint_t  def_value 
)

Definition at line 20359 of file duktape.c.

References duk__api_coerce_d2ui(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_has_prop()

DUK_EXTERNAL_DECL duk_bool_t duk_has_prop ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 17984 of file duktape.c.

Referenced by duk__init_varmap_and_prologue_for_pass2(), and dukky_register_event_listener_for().

Here is the caller graph for this function:

◆ duk_has_prop_heapptr()

DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_heapptr ( duk_context ctx,
duk_idx_t  obj_idx,
void *  ptr 
)

Definition at line 18043 of file duktape.c.

◆ duk_has_prop_index()

DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_index ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uarridx_t  arr_idx 
)

Definition at line 18035 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, duk_push_literal_raw(), and duk_require_normalize_index().

Here is the call graph for this function:

◆ duk_has_prop_literal_raw()

DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_literal_raw ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 18024 of file duktape.c.

◆ duk_has_prop_lstring()

DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_lstring ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 18014 of file duktape.c.

◆ duk_has_prop_string()

DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_string ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key 
)

Definition at line 18005 of file duktape.c.

◆ duk_hex_decode()

DUK_EXTERNAL_DECL void duk_hex_decode ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 16485 of file duktape.c.

◆ duk_hex_encode()

DUK_EXTERNAL_DECL const char * duk_hex_encode ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 16429 of file duktape.c.

References DUK_ERROR_UNSUPPORTED, DUK_UNREF, and DUK_WO_NORETURN.

◆ duk_insert()

DUK_EXTERNAL_DECL void duk_insert ( duk_context ctx,
duk_idx_t  to_idx 
)

◆ duk_inspect_callstack_entry()

DUK_EXTERNAL_DECL void duk_inspect_callstack_entry ( duk_context ctx,
duk_int_t  level 
)

Definition at line 17498 of file duktape.c.

◆ duk_inspect_value()

DUK_EXTERNAL_DECL void duk_inspect_value ( duk_context ctx,
duk_idx_t  idx 
)

◆ duk_instanceof()

DUK_EXTERNAL_DECL duk_bool_t duk_instanceof ( duk_context ctx,
duk_idx_t  idx1,
duk_idx_t  idx2 
)

Definition at line 25245 of file duktape.c.

◆ duk_is_array()

DUK_EXTERNAL_DECL duk_bool_t duk_is_array ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22786 of file duktape.c.

Referenced by duk_bi_array_prototype_iter_shared().

Here is the caller graph for this function:

◆ duk_is_boolean()

DUK_EXTERNAL_DECL duk_bool_t duk_is_boolean ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22670 of file duktape.c.

Referenced by duk_bi_boolean_prototype_tostring_shared(), and dukky_generic_event_handler().

Here is the caller graph for this function:

◆ duk_is_bound_function()

DUK_EXTERNAL_DECL duk_bool_t duk_is_bound_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22861 of file duktape.c.

◆ duk_is_buffer()

DUK_EXTERNAL_DECL duk_bool_t duk_is_buffer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22728 of file duktape.c.

◆ duk_is_buffer_data()

DUK_EXTERNAL_DECL duk_bool_t duk_is_buffer_data ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22734 of file duktape.c.

References duk__tag_check(), DUK_ASSERT_API_ENTRY, and DUK_TAG_OBJECT.

Here is the call graph for this function:

◆ duk_is_c_function()

DUK_EXTERNAL_DECL duk_bool_t duk_is_c_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22851 of file duktape.c.

References DUK_ASSERT, DUK_HOBJECT_HAS_CONSTRUCTABLE, and DUK_TVAL_GET_OBJECT.

◆ duk_is_constructable()

DUK_EXTERNAL_DECL duk_bool_t duk_is_constructable ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22833 of file duktape.c.

References DUK_ASSERT, DUK_HOBJECT_HAS_CALLABLE, and DUK_TVAL_GET_OBJECT.

Referenced by duk__update_default_instance_proto().

Here is the caller graph for this function:

◆ duk_is_constructor_call()

DUK_EXTERNAL_DECL duk_bool_t duk_is_constructor_call ( duk_context ctx)

Definition at line 15565 of file duktape.c.

References DUK_ERROR_TYPE_INVALID_ARGS, DUK_EXEC_ERROR, and DUK_WO_NORETURN.

Referenced by duk_bi_pointer_constructor().

Here is the caller graph for this function:

◆ duk_is_dynamic_buffer()

DUK_EXTERNAL_DECL duk_bool_t duk_is_dynamic_buffer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22893 of file duktape.c.

◆ duk_is_ecmascript_function()

DUK_EXTERNAL_DECL duk_bool_t duk_is_ecmascript_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22856 of file duktape.c.

◆ duk_is_external_buffer()

DUK_EXTERNAL_DECL duk_bool_t duk_is_external_buffer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22908 of file duktape.c.

◆ duk_is_fixed_buffer()

DUK_EXTERNAL_DECL duk_bool_t duk_is_fixed_buffer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22878 of file duktape.c.

References DUK_ASSERT_API_ENTRY, duk_get_hobject(), DUK_HOBJECT_CLASS_THREAD, and DUK_HOBJECT_GET_CLASS_NUMBER.

Here is the call graph for this function:

◆ duk_is_function()

DUK_EXTERNAL_DECL duk_bool_t duk_is_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22798 of file duktape.c.

References DUK_ASSERT_API_ENTRY, duk_get_tval(), and duk_js_isarray().

Referenced by duk_bi_string_prototype_replace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_is_lightfunc()

DUK_EXTERNAL_DECL duk_bool_t duk_is_lightfunc ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22766 of file duktape.c.

◆ duk_is_nan()

DUK_EXTERNAL_DECL duk_bool_t duk_is_nan ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22692 of file duktape.c.

◆ duk_is_null()

DUK_EXTERNAL_DECL duk_bool_t duk_is_null ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22665 of file duktape.c.

References DUK_ERROR_TYPE, DUK_STR_UNEXPECTED_TYPE, and DUK_WO_NORETURN.

◆ duk_is_number()

DUK_EXTERNAL_DECL duk_bool_t duk_is_number ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22675 of file duktape.c.

Referenced by duk_bi_global_object_eval(), and duk_bi_string_prototype_replace().

Here is the caller graph for this function:

◆ duk_is_object()

DUK_EXTERNAL_DECL duk_bool_t duk_is_object ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22723 of file duktape.c.

Referenced by duk_bi_string_prototype_replace().

Here is the caller graph for this function:

◆ duk_is_pointer()

DUK_EXTERNAL_DECL duk_bool_t duk_is_pointer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22761 of file duktape.c.

Referenced by duk_bi_pointer_constructor().

Here is the caller graph for this function:

◆ duk_is_strict_call()

DUK_EXTERNAL_DECL duk_bool_t duk_is_strict_call ( duk_context ctx)

Definition at line 15586 of file duktape.c.

◆ duk_is_string()

DUK_EXTERNAL_DECL duk_bool_t duk_is_string ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22713 of file duktape.c.

Referenced by duk__safe_to_stacktrace_raw(), duk_bi_string_prototype_replace(), duk_js_tonumber(), and duk_push_class_string_tval().

Here is the caller graph for this function:

◆ duk_is_symbol()

DUK_EXTERNAL_DECL duk_bool_t duk_is_symbol ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22771 of file duktape.c.

References duk__tag_check(), DUK_ASSERT_API_ENTRY, and DUK_TAG_POINTER.

Here is the call graph for this function:

◆ duk_is_thread()

DUK_EXTERNAL_DECL duk_bool_t duk_is_thread ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22866 of file duktape.c.

◆ duk_is_undefined()

DUK_EXTERNAL_DECL duk_bool_t duk_is_undefined ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22660 of file duktape.c.

Referenced by duk_bi_array_prototype_join_shared(), duk_bi_symbol_constructor_shared(), dukky_event_target_push_listeners(), dukky_get_current_value_of_event_handler(), dukky_populate_object(), dukky_push_event(), dukky_push_node(), dukky_push_node_stacked(), and js_fire_event().

Here is the caller graph for this function:

◆ duk_is_valid_index()

DUK_EXTERNAL_DECL duk_bool_t duk_is_valid_index ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 19050 of file duktape.c.

Referenced by duk__handle_call_raw(), and duk__prep_codec_arg().

Here is the caller graph for this function:

◆ duk_join()

DUK_EXTERNAL_DECL void duk_join ( duk_context ctx,
duk_idx_t  count 
)

Definition at line 25752 of file duktape.c.

Referenced by duk_bi_array_prototype_join_shared().

Here is the caller graph for this function:

◆ duk_json_decode()

DUK_EXTERNAL_DECL void duk_json_decode ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 16612 of file duktape.c.

◆ duk_json_encode()

DUK_EXTERNAL_DECL const char * duk_json_encode ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 16586 of file duktape.c.

References DUK_ERROR_UNSUPPORTED, DUK_UNREF, and DUK_WO_NORETURN.

◆ duk_load_function()

DUK_EXTERNAL_DECL void duk_load_function ( duk_context ctx)

Definition at line 15133 of file duktape.c.

◆ duk_map_string()

DUK_EXTERNAL_DECL void duk_map_string ( duk_context ctx,
duk_idx_t  idx,
duk_map_char_function  callback,
void *  udata 
)

Definition at line 25785 of file duktape.c.

◆ duk_new()

DUK_EXTERNAL_DECL void duk_new ( duk_context ctx,
duk_idx_t  nargs 
)

Definition at line 15522 of file duktape.c.

◆ duk_next()

DUK_EXTERNAL_DECL duk_bool_t duk_next ( duk_context ctx,
duk_idx_t  enum_idx,
duk_bool_t  get_value 
)

Definition at line 18276 of file duktape.c.

◆ duk_normalize_index()

DUK_EXTERNAL_DECL duk_idx_t duk_normalize_index ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 18910 of file duktape.c.

Referenced by duk_put_prop_index().

Here is the caller graph for this function:

◆ duk_opt_boolean()

DUK_EXTERNAL_DECL duk_bool_t duk_opt_boolean ( duk_context ctx,
duk_idx_t  idx,
duk_bool_t  def_value 
)

Definition at line 20261 of file duktape.c.

◆ duk_opt_buffer()

DUK_EXTERNAL_DECL void * duk_opt_buffer ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size,
void *  def_ptr,
duk_size_t  def_size 
)

Definition at line 20681 of file duktape.c.

◆ duk_opt_buffer_data()

DUK_EXTERNAL_DECL void * duk_opt_buffer_data ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size,
void *  def_ptr,
duk_size_t  def_size 
)

Definition at line 20795 of file duktape.c.

◆ duk_opt_c_function()

DUK_EXTERNAL_DECL duk_c_function duk_opt_c_function ( duk_context ctx,
duk_idx_t  idx,
duk_c_function  def_value 
)

Definition at line 21012 of file duktape.c.

◆ duk_opt_context()

DUK_EXTERNAL_DECL duk_context * duk_opt_context ( duk_context ctx,
duk_idx_t  idx,
duk_context def_value 
)

Definition at line 21080 of file duktape.c.

References DUK_ASSERT_API_ENTRY, and duk_get_hthread().

Here is the call graph for this function:

◆ duk_opt_heapptr()

DUK_EXTERNAL_DECL void * duk_opt_heapptr ( duk_context ctx,
duk_idx_t  idx,
void *  def_value 
)

Definition at line 21119 of file duktape.c.

◆ duk_opt_int()

DUK_EXTERNAL_DECL duk_int_t duk_opt_int ( duk_context ctx,
duk_idx_t  idx,
duk_int_t  def_value 
)

Definition at line 20377 of file duktape.c.

References duk__api_coerce_d2i(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_opt_lstring()

DUK_EXTERNAL_DECL const char * duk_opt_lstring ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_len,
const char *  def_ptr,
duk_size_t  def_len 
)

Definition at line 20456 of file duktape.c.

◆ duk_opt_number()

DUK_EXTERNAL_DECL duk_double_t duk_opt_number ( duk_context ctx,
duk_idx_t  idx,
duk_double_t  def_value 
)

Definition at line 20331 of file duktape.c.

◆ duk_opt_pointer()

DUK_EXTERNAL_DECL void * duk_opt_pointer ( duk_context ctx,
duk_idx_t  idx,
void *  def_value 
)

Definition at line 20583 of file duktape.c.

◆ duk_opt_string()

DUK_EXTERNAL_DECL const char * duk_opt_string ( duk_context ctx,
duk_idx_t  idx,
const char *  def_ptr 
)

Definition at line 20472 of file duktape.c.

References DUK_ASSERT_API_ENTRY, duk_check_type_mask(), DUK_TYPE_MASK_NONE, and DUK_TYPE_MASK_UNDEFINED.

Here is the call graph for this function:

◆ duk_opt_uint()

DUK_EXTERNAL_DECL duk_uint_t duk_opt_uint ( duk_context ctx,
duk_idx_t  idx,
duk_uint_t  def_value 
)

Definition at line 20386 of file duktape.c.

◆ duk_pcall()

DUK_EXTERNAL_DECL duk_int_t duk_pcall ( duk_context ctx,
duk_idx_t  nargs 
)

Definition at line 15390 of file duktape.c.

Referenced by dukky_pcall(), and js_exec().

Here is the caller graph for this function:

◆ duk_pcall_method()

DUK_EXTERNAL_DECL duk_int_t duk_pcall_method ( duk_context ctx,
duk_idx_t  nargs 
)

Definition at line 15440 of file duktape.c.

Referenced by duk__err_augment_user(), dukky_generic_event_handler(), and js_fire_event().

Here is the caller graph for this function:

◆ duk_pcall_prop()

DUK_EXTERNAL_DECL duk_int_t duk_pcall_prop ( duk_context ctx,
duk_idx_t  obj_idx,
duk_idx_t  nargs 
)

Definition at line 15465 of file duktape.c.

◆ duk_pnew()

DUK_EXTERNAL_DECL duk_int_t duk_pnew ( duk_context ctx,
duk_idx_t  nargs 
)

Definition at line 15546 of file duktape.c.

◆ duk_pop()

DUK_EXTERNAL_DECL void duk_pop ( duk_context ctx)

◆ duk_pop_2()

DUK_EXTERNAL_DECL void duk_pop_2 ( duk_context ctx)

Definition at line 24804 of file duktape.c.

Referenced by duk__error_getter_helper(), dukky_event_target_push_listeners(), dukky_generic_event_handler(), dukky_get_current_value_of_event_handler(), dukky_populate_object(), dukky_push_node(), and dukky_register_event_listener_for().

Here is the caller graph for this function:

◆ duk_pop_3()

DUK_EXTERNAL_DECL void duk_pop_3 ( duk_context ctx)

Definition at line 24833 of file duktape.c.

Referenced by duk__error_getter_helper(), dukky_event_target_push_listeners(), and dukky_push_node_stacked().

Here is the caller graph for this function:

◆ duk_pop_n()

DUK_EXTERNAL_DECL void duk_pop_n ( duk_context ctx,
duk_idx_t  count 
)

Definition at line 24627 of file duktape.c.

References count(), DUK_ASSERT, DUK_TVAL_SET_UNDEFINED, and duk_hthread::valstack_bottom.

Referenced by duk__concat_and_join_helper(), duk_pop_3_nodecref_unsafe(), dukky_generic_event_handler(), and js_fire_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_pull()

DUK_EXTERNAL_DECL void duk_pull ( duk_context ctx,
duk_idx_t  from_idx 
)

Definition at line 19900 of file duktape.c.

◆ duk_push_array()

DUK_EXTERNAL_DECL duk_idx_t duk_push_array ( duk_context ctx)

Definition at line 23555 of file duktape.c.

Referenced by duk_bi_array_prototype_iter_shared(), duk_bi_array_prototype_splice(), duk_proxy_ownkeys_postprocess(), dukky_event_target_push_listeners(), and dukky_generic_event_handler().

Here is the caller graph for this function:

◆ duk_push_bare_array()

DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_array ( duk_context ctx)

Definition at line 23581 of file duktape.c.

Referenced by duk__load_func().

Here is the caller graph for this function:

◆ duk_push_bare_object()

DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_object ( duk_context ctx)

Definition at line 24530 of file duktape.c.

Referenced by duk__load_func(), and duk_inspect_value().

Here is the caller graph for this function:

◆ duk_push_boolean()

DUK_EXTERNAL_DECL void duk_push_boolean ( duk_context ctx,
duk_bool_t  val 
)

Definition at line 23004 of file duktape.c.

Referenced by duk_bi_array_prototype_to_string(), duk_bi_global_object_decode_uri(), duk_bi_global_object_is_finite(), dukky_register_event_listener_for(), js_exec(), and js_newheap().

Here is the caller graph for this function:

◆ duk_push_buffer_object()

DUK_EXTERNAL_DECL void duk_push_buffer_object ( duk_context ctx,
duk_idx_t  idx_buffer,
duk_size_t  byte_offset,
duk_size_t  byte_length,
duk_uint_t  flags 
)

Definition at line 23982 of file duktape.c.

◆ duk_push_buffer_raw()

DUK_EXTERNAL_DECL void * duk_push_buffer_raw ( duk_context ctx,
duk_size_t  size,
duk_small_uint_t  flags 
)

Definition at line 24194 of file duktape.c.

◆ duk_push_c_function()

DUK_EXTERNAL_DECL duk_idx_t duk_push_c_function ( duk_context ctx,
duk_c_function  func,
duk_idx_t  nargs 
)

Definition at line 23806 of file duktape.c.

Referenced by dukky_inject_not_ctr().

Here is the caller graph for this function:

◆ duk_push_c_lightfunc()

DUK_EXTERNAL_DECL duk_idx_t duk_push_c_lightfunc ( duk_context ctx,
duk_c_function  func,
duk_idx_t  nargs,
duk_idx_t  length,
duk_int_t  magic 
)

Definition at line 23848 of file duktape.c.

◆ duk_push_context_dump()

DUK_EXTERNAL_DECL void duk_push_context_dump ( duk_context ctx)

Definition at line 16824 of file duktape.c.

Referenced by dukky_push_context_dump().

Here is the caller graph for this function:

◆ duk_push_current_function()

DUK_EXTERNAL_DECL void duk_push_current_function ( duk_context ctx)

Definition at line 23334 of file duktape.c.

◆ duk_push_current_thread()

DUK_EXTERNAL_DECL void duk_push_current_thread ( duk_context ctx)

Definition at line 23347 of file duktape.c.

Referenced by duk_bi_type_error_thrower().

Here is the caller graph for this function:

◆ duk_push_error_object_raw()

DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_raw ( duk_context ctx,
duk_errcode_t  err_code,
const char *  filename,
duk_int_t  line,
const char *  fmt,
  ... 
)

Definition at line 24164 of file duktape.c.

Referenced by duk_err_create_and_throw().

Here is the caller graph for this function:

◆ duk_push_error_object_stash()

DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_stash ( duk_context ctx,
duk_errcode_t  err_code,
const char *  fmt,
  ... 
)

Definition at line 24177 of file duktape.c.

◆ duk_push_error_object_va_raw()

DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_va_raw ( duk_context ctx,
duk_errcode_t  err_code,
const char *  filename,
duk_int_t  line,
const char *  fmt,
va_list  ap 
)

Definition at line 24105 of file duktape.c.

References DUK_ASSERT_API_ENTRY, DUK_ERROR_UNSUPPORTED, DUK_UNREF, and DUK_WO_NORETURN.

Referenced by duk_error_raw().

Here is the caller graph for this function:

◆ duk_push_false()

DUK_EXTERNAL_DECL void duk_push_false ( duk_context ctx)

Definition at line 23024 of file duktape.c.

Referenced by duk_bi_array_prototype_iter_shared().

Here is the caller graph for this function:

◆ duk_push_global_object()

DUK_EXTERNAL_DECL void duk_push_global_object ( duk_context ctx)

Definition at line 23357 of file duktape.c.

Referenced by dukky_register_event_listener_for(), js_fire_event(), js_newheap(), and js_newthread().

Here is the caller graph for this function:

◆ duk_push_global_stash()

DUK_EXTERNAL_DECL void duk_push_global_stash ( duk_context ctx)

Definition at line 23387 of file duktape.c.

◆ duk_push_heap_stash()

DUK_EXTERNAL_DECL void duk_push_heap_stash ( duk_context ctx)

Definition at line 23378 of file duktape.c.

◆ duk_push_heapptr()

DUK_EXTERNAL_DECL duk_idx_t duk_push_heapptr ( duk_context ctx,
void *  ptr 
)

Definition at line 24438 of file duktape.c.

◆ duk_push_int()

DUK_EXTERNAL_DECL void duk_push_int ( duk_context ctx,
duk_int_t  val 
)

◆ duk_push_literal_raw()

DUK_EXTERNAL_DECL const char * duk_push_literal_raw ( duk_context ctx,
const char *  str,
duk_size_t  len 
)

Definition at line 23164 of file duktape.c.

Referenced by duk_del_prop_index(), duk_get_prop_index(), duk_has_prop_index(), and duk_put_prop_index().

Here is the caller graph for this function:

◆ duk_push_lstring()

DUK_EXTERNAL_DECL const char * duk_push_lstring ( duk_context ctx,
const char *  str,
duk_size_t  len 
)

◆ duk_push_nan()

DUK_EXTERNAL_DECL void duk_push_nan ( duk_context ctx)

Definition at line 23105 of file duktape.c.

Referenced by duk__parse_string(), and duk_bi_date_constructor_now().

Here is the caller graph for this function:

◆ duk_push_new_target()

DUK_EXTERNAL_DECL void duk_push_new_target ( duk_context ctx)

◆ duk_push_null()

DUK_EXTERNAL_DECL void duk_push_null ( duk_context ctx)

Definition at line 22995 of file duktape.c.

References DUK__CHECK_SPACE, DUK_ASSERT_API_ENTRY, and duk_hthread::valstack_top.

Referenced by duk__init_varmap_and_prologue_for_pass2(), and js_newthread().

Here is the caller graph for this function:

◆ duk_push_number()

DUK_EXTERNAL_DECL void duk_push_number ( duk_context ctx,
duk_double_t  val 
)

Definition at line 23034 of file duktape.c.

Referenced by duk__cbor_decode_skip_aival_int(), duk_bi_buffer_readfield(), and duk_bi_date_prototype_to_json().

Here is the caller graph for this function:

◆ duk_push_object()

DUK_EXTERNAL_DECL duk_idx_t duk_push_object ( duk_context ctx)

Definition at line 23545 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, DUK_HOBJECT_SET_PROTOTYPE_INIT_INCREF, and duk_push_object_helper().

Referenced by duk__load_func(), dukky_create_object(), dukky_event_target_push_listeners(), dukky_push_event(), dukky_push_node_stacked(), js_newheap(), and js_newthread().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_push_pointer()

DUK_EXTERNAL_DECL void duk_push_pointer ( duk_context ctx,
void *  p 
)

Definition at line 23198 of file duktape.c.

Referenced by duk_bi_pointer_constructor(), duk_inspect_value(), dukky_push_event(), dukky_push_node(), js_event_cleanup(), and js_newthread().

Here is the caller graph for this function:

◆ duk_push_proxy()

DUK_EXTERNAL_DECL duk_idx_t duk_push_proxy ( duk_context ctx,
duk_uint_t  proxy_flags 
)

Definition at line 24245 of file duktape.c.

◆ duk_push_sprintf()

DUK_EXTERNAL_DECL const char * duk_push_sprintf ( duk_context ctx,
const char *  fmt,
  ... 
)

Definition at line 23487 of file duktape.c.

Referenced by duk__error_getter_helper().

Here is the caller graph for this function:

◆ duk_push_string()

DUK_EXTERNAL_DECL const char * duk_push_string ( duk_context ctx,
const char *  str 
)

Definition at line 23151 of file duktape.c.

Referenced by dukky_create_object(), dukky_get_current_value_of_event_handler(), dukky_log_stack_frame(), dukky_populate_object(), dukky_push_node_klass(), js_exec(), and js_newthread().

Here is the caller graph for this function:

◆ duk_push_this()

DUK_EXTERNAL_DECL void duk_push_this ( duk_context ctx)

Definition at line 23253 of file duktape.c.

Referenced by duk__error_getter_helper(), duk_bi_boolean_prototype_tostring_shared(), duk_bi_regexp_constructor(), duk_bi_regexp_prototype_flags(), and duk_bi_typedarray_set().

Here is the caller graph for this function:

◆ duk_push_thread_raw()

DUK_EXTERNAL_DECL duk_idx_t duk_push_thread_raw ( duk_context ctx,
duk_uint_t  flags 
)

Definition at line 23643 of file duktape.c.

◆ duk_push_thread_stash()

DUK_EXTERNAL_DECL void duk_push_thread_stash ( duk_context ctx,
duk_context target_ctx 
)

Definition at line 23393 of file duktape.c.

◆ duk_push_true()

DUK_EXTERNAL_DECL void duk_push_true ( duk_context ctx)

Definition at line 23015 of file duktape.c.

References DUK__CHECK_SPACE, DUK_ASSERT_API_ENTRY, and duk_hthread::valstack_top.

Referenced by duk_bi_array_prototype_iter_shared(), duk_bi_object_prototype_defineaccessor(), and duk_hobject_enumerator_create().

Here is the caller graph for this function:

◆ duk_push_uint()

DUK_EXTERNAL_DECL void duk_push_uint ( duk_context ctx,
duk_uint_t  val 
)

Definition at line 23075 of file duktape.c.

Referenced by duk__error_getter_helper(), duk__get_own_propdesc_raw(), duk__push_this_helper(), duk_bi_buffer_readfield(), duk_bi_string_prototype_replace(), and duk_inspect_value().

Here is the caller graph for this function:

◆ duk_push_undefined()

DUK_EXTERNAL_DECL void duk_push_undefined ( duk_context ctx)

Definition at line 22983 of file duktape.c.

References DUK__CHECK_SPACE, DUK_ASSERT, DUK_ASSERT_API_ENTRY, DUK_TVAL_INCREF, DUK_TVAL_SET_TVAL, and duk_hthread::valstack_top.

Referenced by duk__err_augment_user(), duk__get_own_propdesc_raw(), duk_bi_array_prototype_iter_shared(), duk_js_getvar_envrec(), and dukky_event_target_push_listeners().

Here is the caller graph for this function:

◆ duk_push_vsprintf()

DUK_EXTERNAL_DECL const char * duk_push_vsprintf ( duk_context ctx,
const char *  fmt,
va_list  ap 
)

Definition at line 23421 of file duktape.c.

◆ duk_put_function_list()

DUK_EXTERNAL_DECL void duk_put_function_list ( duk_context ctx,
duk_idx_t  obj_idx,
const duk_function_list_entry funcs 
)

Definition at line 18355 of file duktape.c.

◆ duk_put_global_heapptr()

DUK_EXTERNAL_DECL duk_bool_t duk_put_global_heapptr ( duk_context ctx,
void *  ptr 
)

Definition at line 18499 of file duktape.c.

◆ duk_put_global_literal_raw()

DUK_EXTERNAL_DECL duk_bool_t duk_put_global_literal_raw ( duk_context ctx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 18482 of file duktape.c.

◆ duk_put_global_lstring()

DUK_EXTERNAL_DECL duk_bool_t duk_put_global_lstring ( duk_context ctx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 18466 of file duktape.c.

◆ duk_put_global_string()

DUK_EXTERNAL_DECL duk_bool_t duk_put_global_string ( duk_context ctx,
const char *  key 
)

Definition at line 18451 of file duktape.c.

Referenced by js_newheap(), and js_newthread().

Here is the caller graph for this function:

◆ duk_put_number_list()

DUK_EXTERNAL_DECL void duk_put_number_list ( duk_context ctx,
duk_idx_t  obj_idx,
const duk_number_list_entry numbers 
)

Definition at line 18370 of file duktape.c.

◆ duk_put_prop()

DUK_EXTERNAL_DECL duk_bool_t duk_put_prop ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 17831 of file duktape.c.

Referenced by duk__init_varmap_and_prologue_for_pass2(), duk__load_func(), duk_hobject_enumerator_create(), dukky_event_target_push_listeners(), dukky_push_event(), dukky_push_node_stacked(), dukky_register_event_listener_for(), and js_newthread().

Here is the caller graph for this function:

◆ duk_put_prop_heapptr()

DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_heapptr ( duk_context ctx,
duk_idx_t  obj_idx,
void *  ptr 
)

Definition at line 17878 of file duktape.c.

◆ duk_put_prop_index()

DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_index ( duk_context ctx,
duk_idx_t  obj_idx,
duk_uarridx_t  arr_idx 
)

Definition at line 17870 of file duktape.c.

References DUK_ASSERT, DUK_ASSERT_API_ENTRY, duk_normalize_index(), and duk_push_literal_raw().

Referenced by duk__load_func(), duk__parse_var_decl(), duk_bi_array_prototype_splice(), duk_bi_typedarray_set(), dukky_generic_event_handler(), dukky_shuffle_array(), and js_newthread().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_put_prop_literal_raw()

DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_literal_raw ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 17859 of file duktape.c.

◆ duk_put_prop_lstring()

DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_lstring ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key,
duk_size_t  key_len 
)

Definition at line 17849 of file duktape.c.

◆ duk_put_prop_string()

DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_string ( duk_context ctx,
duk_idx_t  obj_idx,
const char *  key 
)

Definition at line 17836 of file duktape.c.

Referenced by dukky_create_object(), dukky_event_target_push_listeners(), dukky_inject_not_ctr(), dukky_push_node_stacked(), js_newheap(), and js_newthread().

Here is the caller graph for this function:

◆ duk_random()

Definition at line 18682 of file duktape.c.

◆ duk_realloc()

DUK_EXTERNAL_DECL void * duk_realloc ( duk_context ctx,
void *  ptr,
duk_size_t  size 
)

Definition at line 17594 of file duktape.c.

References DUK_ALLOC, DUK_ASSERT_API_ENTRY, and duk_hthread::heap.

◆ duk_realloc_raw()

DUK_EXTERNAL_DECL void * duk_realloc_raw ( duk_context ctx,
void *  ptr,
duk_size_t  size 
)

Definition at line 17576 of file duktape.c.

References DUK_ALLOC_RAW, DUK_ASSERT_API_ENTRY, and duk_hthread::heap.

◆ duk_remove()

DUK_EXTERNAL_DECL void duk_remove ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 19974 of file duktape.c.

Referenced by duk_hobject_get_enumerated_keys(), duk_remove_n(), dukky_populate_object(), and dukky_push_generics().

Here is the caller graph for this function:

◆ duk_replace()

DUK_EXTERNAL_DECL void duk_replace ( duk_context ctx,
duk_idx_t  to_idx 
)

Definition at line 19937 of file duktape.c.

Referenced by duk__concat_and_join_helper(), duk__error_getter_helper(), duk__safe_to_stacktrace_raw(), duk_hobject_define_property_helper(), duk_lexer_parse_js_input_element(), duk_lexer_setpoint(), and dukky_push_event().

Here is the caller graph for this function:

◆ duk_require_boolean()

DUK_EXTERNAL_DECL duk_bool_t duk_require_boolean ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20243 of file duktape.c.

References duk__get_boolean_raw(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_require_buffer()

DUK_EXTERNAL_DECL void * duk_require_buffer ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size 
)

Definition at line 20703 of file duktape.c.

Referenced by duk_get_buffer_default().

Here is the caller graph for this function:

◆ duk_require_buffer_data()

DUK_EXTERNAL_DECL void * duk_require_buffer_data ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size 
)

Definition at line 20807 of file duktape.c.

References DUK_ASSERT_API_ENTRY, duk_check_type_mask(), duk_require_buffer_data(), DUK_TYPE_MASK_NONE, and DUK_TYPE_MASK_UNDEFINED.

Referenced by duk_require_buffer_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_require_c_function()

DUK_EXTERNAL_DECL duk_c_function duk_require_c_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21034 of file duktape.c.

◆ duk_require_constructable()

DUK_EXTERNAL_DECL void duk_require_constructable ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21055 of file duktape.c.

◆ duk_require_constructor_call()

DUK_EXTERNAL_DECL void duk_require_constructor_call ( duk_context ctx)

◆ duk_require_context()

DUK_EXTERNAL_DECL duk_context * duk_require_context ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21074 of file duktape.c.

Referenced by js_newthread().

Here is the caller graph for this function:

◆ duk_require_function()

DUK_EXTERNAL_DECL void duk_require_function ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21047 of file duktape.c.

◆ duk_require_heapptr()

DUK_EXTERNAL_DECL void * duk_require_heapptr ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21141 of file duktape.c.

◆ duk_require_int()

DUK_EXTERNAL_DECL duk_int_t duk_require_int ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20365 of file duktape.c.

References duk__api_coerce_d2i(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_require_lstring()

DUK_EXTERNAL_DECL const char * duk_require_lstring ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_len 
)

Definition at line 20417 of file duktape.c.

◆ duk_require_normalize_index()

DUK_EXTERNAL_DECL duk_idx_t duk_require_normalize_index ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 18945 of file duktape.c.

Referenced by duk_del_prop_index(), duk_get_prop_desc(), duk_get_prop_index(), and duk_has_prop_index().

Here is the caller graph for this function:

◆ duk_require_null()

DUK_EXTERNAL_DECL void duk_require_null ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20199 of file duktape.c.

◆ duk_require_number()

DUK_EXTERNAL_DECL duk_double_t duk_require_number ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20308 of file duktape.c.

◆ duk_require_object()

DUK_EXTERNAL_DECL void duk_require_object ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20549 of file duktape.c.

◆ duk_require_pointer()

DUK_EXTERNAL_DECL void * duk_require_pointer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20597 of file duktape.c.

◆ duk_require_stack()

DUK_EXTERNAL_DECL void duk_require_stack ( duk_context ctx,
duk_idx_t  extra 
)

Definition at line 19680 of file duktape.c.

Referenced by duk__error_getter_helper(), duk__handle_call_raw(), duk__load_func(), duk__parse_func_body(), duk_bi_array_prototype_join_shared(), duk_bi_string_prototype_replace(), and duk_err_create_and_throw().

Here is the caller graph for this function:

◆ duk_require_stack_top()

DUK_EXTERNAL_DECL void duk_require_stack_top ( duk_context ctx,
duk_idx_t  top 
)

Definition at line 19726 of file duktape.c.

◆ duk_require_string()

DUK_EXTERNAL_DECL const char * duk_require_string ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20533 of file duktape.c.

◆ duk_require_top_index()

DUK_EXTERNAL_DECL duk_idx_t duk_require_top_index ( duk_context ctx)

◆ duk_require_uint()

DUK_EXTERNAL_DECL duk_uint_t duk_require_uint ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20371 of file duktape.c.

References duk__api_coerce_d2ui(), and DUK_ASSERT_API_ENTRY.

Here is the call graph for this function:

◆ duk_require_undefined()

DUK_EXTERNAL_DECL void duk_require_undefined ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 20186 of file duktape.c.

◆ duk_require_valid_index()

DUK_EXTERNAL_DECL void duk_require_valid_index ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 19058 of file duktape.c.

◆ duk_resize_buffer()

DUK_EXTERNAL_DECL void * duk_resize_buffer ( duk_context ctx,
duk_idx_t  idx,
duk_size_t  new_size 
)

Definition at line 14348 of file duktape.c.

References DUK_ANSI_FREE, DUK_DDD, DUK_DDDPRINT, and DUK_UNREF.

◆ duk_resume()

DUK_EXTERNAL_DECL void duk_resume ( duk_context ctx,
const duk_thread_state state 
)

Definition at line 17203 of file duktape.c.

◆ duk_safe_call()

DUK_EXTERNAL_DECL duk_int_t duk_safe_call ( duk_context ctx,
duk_safe_call_function  func,
void *  udata,
duk_idx_t  nargs,
duk_idx_t  nrets 
)

Definition at line 15481 of file duktape.c.

References DUK_ERROR_TYPE_INVALID_ARGS, DUK_EXEC_ERROR, and DUK_WO_NORETURN.

Referenced by dukky_create_object(), dukky_log_stack_frame(), and dukky_push_node_stacked().

Here is the caller graph for this function:

◆ duk_safe_to_lstring()

DUK_EXTERNAL_DECL const char * duk_safe_to_lstring ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_len 
)

Definition at line 21781 of file duktape.c.

◆ duk_safe_to_stacktrace()

DUK_EXTERNAL_DECL const char * duk_safe_to_stacktrace ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21844 of file duktape.c.

Referenced by dukky_dump_error().

Here is the caller graph for this function:

◆ duk_samevalue()

DUK_EXTERNAL_DECL duk_bool_t duk_samevalue ( duk_context ctx,
duk_idx_t  idx1,
duk_idx_t  idx2 
)

Definition at line 25226 of file duktape.c.

◆ duk_seal()

DUK_EXTERNAL_DECL void duk_seal ( duk_context ctx,
duk_idx_t  obj_idx 
)

Definition at line 18339 of file duktape.c.

◆ duk_set_finalizer()

DUK_EXTERNAL_DECL void duk_set_finalizer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 18628 of file duktape.c.

References DUK_ASSERT_API_ENTRY, duk_get_prop_stridx(), and DUK_STRIDX_INT_FINALIZER.

Here is the call graph for this function:

◆ duk_set_global_object()

DUK_EXTERNAL_DECL void duk_set_global_object ( duk_context ctx)

Definition at line 17230 of file duktape.c.

Referenced by js_newthread().

Here is the caller graph for this function:

◆ duk_set_length()

DUK_EXTERNAL_DECL void duk_set_length ( duk_context ctx,
duk_idx_t  idx,
duk_size_t  len 
)

Definition at line 21383 of file duktape.c.

References duk__known_heaphdr(), DUK_ASSERT, DUK_ASSERT_API_ENTRY, and duk_get_hcompfunc().

Referenced by duk__nud_array_literal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_set_magic()

DUK_EXTERNAL_DECL void duk_set_magic ( duk_context ctx,
duk_idx_t  idx,
duk_int_t  magic 
)

Definition at line 15663 of file duktape.c.

◆ duk_set_prototype()

DUK_EXTERNAL_DECL void duk_set_prototype ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 18553 of file duktape.c.

Referenced by dukky_populate_object().

Here is the caller graph for this function:

◆ duk_set_top()

DUK_EXTERNAL_DECL void duk_set_top ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 19098 of file duktape.c.

References DUK_ERROR_TYPE_INVALID_ARGS, and DUK_WO_NORETURN.

Referenced by duk__load_func(), duk_bi_array_prototype_join_shared(), duk_bi_array_prototype_splice(), duk_bi_pointer_constructor(), duk_hthread_terminate(), dukky_push_node_stacked(), js_closethread(), and js_exec().

Here is the caller graph for this function:

◆ duk_steal_buffer()

DUK_EXTERNAL_DECL void * duk_steal_buffer ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size 
)

Definition at line 14367 of file duktape.c.

References DUK_ERROR_TYPE, DUK_STR_WRONG_BUFFER_TYPE, and DUK_WO_NORETURN.

◆ duk_strict_equals()

DUK_EXTERNAL_DECL duk_bool_t duk_strict_equals ( duk_context ctx,
duk_idx_t  idx1,
duk_idx_t  idx2 
)

Definition at line 25211 of file duktape.c.

◆ duk_substring()

DUK_EXTERNAL_DECL void duk_substring ( duk_context ctx,
duk_idx_t  idx,
duk_size_t  start_char_offset,
duk_size_t  end_char_offset 
)

Definition at line 25825 of file duktape.c.

Referenced by duk__get_own_propdesc_raw().

Here is the caller graph for this function:

◆ duk_suspend()

DUK_EXTERNAL_DECL void duk_suspend ( duk_context ctx,
duk_thread_state state 
)

Definition at line 17158 of file duktape.c.

◆ duk_swap()

DUK_EXTERNAL_DECL void duk_swap ( duk_context ctx,
duk_idx_t  idx1,
duk_idx_t  idx2 
)

Definition at line 19753 of file duktape.c.

◆ duk_swap_top()

DUK_EXTERNAL_DECL void duk_swap_top ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 19771 of file duktape.c.

◆ duk_time_to_components()

DUK_EXTERNAL_DECL void duk_time_to_components ( duk_context ctx,
duk_double_t  timeval,
duk_time_components comp 
)

Definition at line 26020 of file duktape.c.

◆ duk_to_boolean()

DUK_EXTERNAL_DECL duk_bool_t duk_to_boolean ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21531 of file duktape.c.

References duk__to_primitive_helper().

Referenced by duk_bi_array_prototype_iter_shared(), duk_bi_buffer_readfield(), and dukky_generic_event_handler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duk_to_buffer_raw()

DUK_EXTERNAL_DECL void * duk_to_buffer_raw ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_size,
duk_uint_t  flags 
)

Definition at line 22209 of file duktape.c.

◆ duk_to_int()

DUK_EXTERNAL_DECL duk_int_t duk_to_int ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21660 of file duktape.c.

Referenced by duk__init_varmap_and_prologue_for_pass2(), duk_bi_buffer_readfield(), duk_bi_typedarray_set(), and dukky_generic_event_handler().

Here is the caller graph for this function:

◆ duk_to_int32()

DUK_EXTERNAL_DECL duk_int32_t duk_to_int32 ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21678 of file duktape.c.

◆ duk_to_lstring()

DUK_EXTERNAL_DECL const char * duk_to_lstring ( duk_context ctx,
duk_idx_t  idx,
duk_size_t out_len 
)

Definition at line 21765 of file duktape.c.

Referenced by duk__prep_codec_arg(), and duk_bi_symbol_constructor_shared().

Here is the caller graph for this function:

◆ duk_to_null()

DUK_EXTERNAL_DECL void duk_to_null ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21428 of file duktape.c.

◆ duk_to_number()

DUK_EXTERNAL_DECL duk_double_t duk_to_number ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21566 of file duktape.c.

Referenced by duk__math_minmax(), duk_bi_global_object_decode_uri(), and duk_bi_global_object_is_finite().

Here is the caller graph for this function:

◆ duk_to_object()

DUK_EXTERNAL_DECL void duk_to_object ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22345 of file duktape.c.

Referenced by duk_bi_array_prototype_join_shared(), and duk_bi_object_constructor_is_extensible().

Here is the caller graph for this function:

◆ duk_to_pointer()

DUK_EXTERNAL_DECL void * duk_to_pointer ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22263 of file duktape.c.

Referenced by duk_bi_pointer_constructor().

Here is the caller graph for this function:

◆ duk_to_primitive()

DUK_EXTERNAL_DECL void duk_to_primitive ( duk_context ctx,
duk_idx_t  idx,
duk_int_t  hint 
)

Definition at line 21520 of file duktape.c.

Referenced by duk_js_data_compare().

Here is the caller graph for this function:

◆ duk_to_stacktrace()

DUK_EXTERNAL_DECL const char * duk_to_stacktrace ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21814 of file duktape.c.

◆ duk_to_string()

DUK_EXTERNAL_DECL const char * duk_to_string ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 22059 of file duktape.c.

Referenced by duk_bi_array_prototype_join_shared(), and duk_bi_string_prototype_replace().

Here is the caller graph for this function:

◆ duk_to_uint()

DUK_EXTERNAL_DECL duk_uint_t duk_to_uint ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21669 of file duktape.c.

◆ duk_to_uint16()

DUK_EXTERNAL_DECL duk_uint16_t duk_to_uint16 ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21710 of file duktape.c.

◆ duk_to_uint32()

DUK_EXTERNAL_DECL duk_uint32_t duk_to_uint32 ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21694 of file duktape.c.

Referenced by duk_hobject_putprop().

Here is the caller graph for this function:

◆ duk_to_undefined()

DUK_EXTERNAL_DECL void duk_to_undefined ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 21418 of file duktape.c.

Referenced by duk_lexer_parse_js_input_element().

Here is the caller graph for this function:

◆ duk_trim()

DUK_EXTERNAL_DECL void duk_trim ( duk_context ctx,
duk_idx_t  idx 
)

Definition at line 25873 of file duktape.c.

◆ duk_xcopymove_raw()

DUK_EXTERNAL_DECL void duk_xcopymove_raw ( duk_context to_ctx,
duk_context from_ctx,
duk_idx_t  count,
duk_bool_t  is_copy 
)

Definition at line 20080 of file duktape.c.

Variable Documentation

◆ duk_api_global_filename

DUK_EXTERNAL_DECL const char* duk_api_global_filename

Definition at line 496 of file duktape.h.

◆ duk_api_global_line

DUK_EXTERNAL_DECL duk_int_t duk_api_global_line

Definition at line 497 of file duktape.h.