libgpac
Documentation of the core library of GPAC
quickjs.h File Reference
#include <stdio.h>
#include <stdint.h>
+ Include dependency graph for quickjs.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  JSRefCountHeader
 
union  JSValueUnion
 
struct  JSValue
 
struct  JSMallocState
 
struct  JSMallocFunctions
 
struct  JSMemoryUsage
 
struct  JSPropertyEnum
 
struct  JSPropertyDescriptor
 
struct  JSClassExoticMethods
 
struct  JSClassDef
 
struct  JSSharedArrayBufferFunctions
 
union  JSCFunctionType
 
struct  JSCFunctionListEntry
 
union  JSCFunctionListEntry.u
 
struct  JSCFunctionListEntry.u.func
 
struct  JSCFunctionListEntry.u.getset
 
struct  JSCFunctionListEntry.u.alias
 
struct  JSCFunctionListEntry.u.prop_list
 

Macros

#define js_likely(x)   (x)
 
#define js_unlikely(x)   (x)
 
#define js_force_inline   inline
 
#define __js_printf_like(a, b)
 
#define JS_BOOL   int
 
#define JS_PTR64
 
#define JS_PTR64_DEF(a)   a
 
#define JS_FLOAT64_NAN   NAN
 
#define JSValueConst   JSValue
 
#define JS_VALUE_GET_TAG(v)   ((int32_t)(v).tag)
 
#define JS_VALUE_GET_NORM_TAG(v)   JS_VALUE_GET_TAG(v)
 
#define JS_VALUE_GET_INT(v)   ((v).u.int32)
 
#define JS_VALUE_GET_BOOL(v)   ((v).u.int32)
 
#define JS_VALUE_GET_FLOAT64(v)   ((v).u.float64)
 
#define JS_VALUE_GET_PTR(v)   ((v).u.ptr)
 
#define JS_MKVAL(tag, val)   (JSValue){ (JSValueUnion){ .int32 = val }, tag }
 
#define JS_MKPTR(tag, p)   (JSValue){ (JSValueUnion){ .ptr = p }, tag }
 
#define JS_TAG_IS_FLOAT64(tag)   ((unsigned)(tag) == JS_TAG_FLOAT64)
 
#define JS_NAN   (JSValue){ .u.float64 = JS_FLOAT64_NAN, JS_TAG_FLOAT64 }
 
#define JS_VALUE_IS_BOTH_INT(v1, v2)   ((JS_VALUE_GET_TAG(v1) | JS_VALUE_GET_TAG(v2)) == 0)
 
#define JS_VALUE_IS_BOTH_FLOAT(v1, v2)   (JS_TAG_IS_FLOAT64(JS_VALUE_GET_TAG(v1)) && JS_TAG_IS_FLOAT64(JS_VALUE_GET_TAG(v2)))
 
#define JS_VALUE_GET_OBJ(v)   ((JSObject *)JS_VALUE_GET_PTR(v))
 
#define JS_VALUE_GET_STRING(v)   ((JSString *)JS_VALUE_GET_PTR(v))
 
#define JS_VALUE_HAS_REF_COUNT(v)   ((unsigned)JS_VALUE_GET_TAG(v) >= (unsigned)JS_TAG_FIRST)
 
#define JS_NULL   JS_MKVAL(JS_TAG_NULL, 0)
 
#define JS_UNDEFINED   JS_MKVAL(JS_TAG_UNDEFINED, 0)
 
#define JS_FALSE   JS_MKVAL(JS_TAG_BOOL, 0)
 
#define JS_TRUE   JS_MKVAL(JS_TAG_BOOL, 1)
 
#define JS_EXCEPTION   JS_MKVAL(JS_TAG_EXCEPTION, 0)
 
#define JS_UNINITIALIZED   JS_MKVAL(JS_TAG_UNINITIALIZED, 0)
 
#define JS_PROP_CONFIGURABLE   (1 << 0)
 
#define JS_PROP_WRITABLE   (1 << 1)
 
#define JS_PROP_ENUMERABLE   (1 << 2)
 
#define JS_PROP_C_W_E   (JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)
 
#define JS_PROP_LENGTH   (1 << 3) /* used internally in Arrays */
 
#define JS_PROP_TMASK   (3 << 4) /* mask for NORMAL, GETSET, VARREF, AUTOINIT */
 
#define JS_PROP_NORMAL   (0 << 4)
 
#define JS_PROP_GETSET   (1 << 4)
 
#define JS_PROP_VARREF   (2 << 4) /* used internally */
 
#define JS_PROP_AUTOINIT   (3 << 4) /* used internally */
 
#define JS_PROP_HAS_SHIFT   8
 
#define JS_PROP_HAS_CONFIGURABLE   (1 << 8)
 
#define JS_PROP_HAS_WRITABLE   (1 << 9)
 
#define JS_PROP_HAS_ENUMERABLE   (1 << 10)
 
#define JS_PROP_HAS_GET   (1 << 11)
 
#define JS_PROP_HAS_SET   (1 << 12)
 
#define JS_PROP_HAS_VALUE   (1 << 13)
 
#define JS_PROP_THROW   (1 << 14)
 
#define JS_PROP_THROW_STRICT   (1 << 15)
 
#define JS_PROP_NO_ADD   (1 << 16) /* internal use */
 
#define JS_PROP_NO_EXOTIC   (1 << 17) /* internal use */
 
#define JS_DEFAULT_STACK_SIZE   (256 * 1024)
 
#define JS_EVAL_TYPE_GLOBAL   (0 << 0) /* global code (default) */
 
#define JS_EVAL_TYPE_MODULE   (1 << 0) /* module code */
 
#define JS_EVAL_TYPE_DIRECT   (2 << 0) /* direct call (internal use) */
 
#define JS_EVAL_TYPE_INDIRECT   (3 << 0) /* indirect call (internal use) */
 
#define JS_EVAL_TYPE_MASK   (3 << 0)
 
#define JS_EVAL_FLAG_STRICT   (1 << 3) /* force 'strict' mode */
 
#define JS_EVAL_FLAG_STRIP   (1 << 4) /* force 'strip' mode */
 
#define JS_EVAL_FLAG_COMPILE_ONLY   (1 << 5)
 
#define JS_EVAL_FLAG_BACKTRACE_BARRIER   (1 << 6)
 
#define JS_ATOM_NULL   0
 
#define JS_CALL_FLAG_CONSTRUCTOR   (1 << 0)
 
#define JS_GPN_STRING_MASK   (1 << 0)
 
#define JS_GPN_SYMBOL_MASK   (1 << 1)
 
#define JS_GPN_PRIVATE_MASK   (1 << 2)
 
#define JS_GPN_ENUM_ONLY   (1 << 4)
 
#define JS_GPN_SET_ENUM   (1 << 5)
 
#define JS_PARSE_JSON_EXT   (1 << 0) /* allow extended JSON */
 
#define JS_WRITE_OBJ_BYTECODE   (1 << 0) /* allow function/module */
 
#define JS_WRITE_OBJ_BSWAP   (1 << 1) /* byte swapped output */
 
#define JS_WRITE_OBJ_SAB   (1 << 2) /* allow SharedArrayBuffer */
 
#define JS_WRITE_OBJ_REFERENCE
 
#define JS_READ_OBJ_BYTECODE   (1 << 0) /* allow function/module */
 
#define JS_READ_OBJ_ROM_DATA   (1 << 1) /* avoid duplicating 'buf' data */
 
#define JS_READ_OBJ_SAB   (1 << 2) /* allow SharedArrayBuffer */
 
#define JS_READ_OBJ_REFERENCE   (1 << 3) /* allow object references */
 
#define JS_DEF_CFUNC   0
 
#define JS_DEF_CGETSET   1
 
#define JS_DEF_CGETSET_MAGIC   2
 
#define JS_DEF_PROP_STRING   3
 
#define JS_DEF_PROP_INT32   4
 
#define JS_DEF_PROP_INT64   5
 
#define JS_DEF_PROP_DOUBLE   6
 
#define JS_DEF_PROP_UNDEFINED   7
 
#define JS_DEF_OBJECT   8
 
#define JS_DEF_ALIAS   9
 
#define JS_CFUNC_DEF(name, length, func1)   { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }
 
#define JS_CFUNC_MAGIC_DEF(name, length, func1, magic)   { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, .u = { .func = { length, JS_CFUNC_generic_magic, { .generic_magic = func1 } } } }
 
#define JS_CFUNC_SPECIAL_DEF(name, length, cproto, func1)   { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_ ## cproto, { .cproto = func1 } } } }
 
#define JS_ITERATOR_NEXT_DEF(name, length, func1, magic)   { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, .u = { .func = { length, JS_CFUNC_iterator_next, { .iterator_next = func1 } } } }
 
#define JS_CGETSET_DEF(name, fgetter, fsetter)   { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET, 0, .u = { .getset = { .get = { .getter = fgetter }, .set = { .setter = fsetter } } } }
 
#define JS_CGETSET_MAGIC_DEF(name, fgetter, fsetter, magic)   { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET_MAGIC, magic, .u = { .getset = { .get = { .getter_magic = fgetter }, .set = { .setter_magic = fsetter } } } }
 
#define JS_PROP_STRING_DEF(name, cstr, prop_flags)   { name, prop_flags, JS_DEF_PROP_STRING, 0, .u = { .str = cstr } }
 
#define JS_PROP_INT32_DEF(name, val, prop_flags)   { name, prop_flags, JS_DEF_PROP_INT32, 0, .u = { .i32 = val } }
 
#define JS_PROP_INT64_DEF(name, val, prop_flags)   { name, prop_flags, JS_DEF_PROP_INT64, 0, .u = { .i64 = val } }
 
#define JS_PROP_DOUBLE_DEF(name, val, prop_flags)   { name, prop_flags, JS_DEF_PROP_DOUBLE, 0, .u = { .f64 = val } }
 
#define JS_PROP_UNDEFINED_DEF(name, prop_flags)   { name, prop_flags, JS_DEF_PROP_UNDEFINED, 0, .u = { .i32 = 0 } }
 
#define JS_OBJECT_DEF(name, tab, len, prop_flags)   { name, prop_flags, JS_DEF_OBJECT, 0, .u = { .prop_list = { tab, len } } }
 
#define JS_ALIAS_DEF(name, from)   { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, .u = { .alias = { from, -1 } } }
 
#define JS_ALIAS_BASE_DEF(name, from, base)   { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, .u = { .alias = { from, base } } }
 

Typedefs

typedef uint32_t JSClassID
 
typedef uint32_t JSAtom
 
typedef JSValue JSCFunction(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
typedef JSValue JSCFunctionMagic(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic)
 
typedef JSValue JSCFunctionData(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic, JSValue *func_data)
 
typedef void JS_MarkFunc(JSRuntime *rt, JSGCObjectHeader *gp)
 
typedef void JSClassFinalizer(JSRuntime *rt, JSValue val)
 
typedef void JSClassGCMark(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
 
typedef JSValue JSClassCall(JSContext *ctx, JSValueConst func_obj, JSValueConst this_val, int argc, JSValueConst *argv, int flags)
 
typedef void JSFreeArrayBufferDataFunc(JSRuntime *rt, void *opaque, void *ptr)
 
typedef void JSHostPromiseRejectionTracker(JSContext *ctx, JSValueConst promise, JSValueConst reason, JS_BOOL is_handled, void *opaque)
 
typedef int JSInterruptHandler(JSRuntime *rt, void *opaque)
 
typedef char * JSModuleNormalizeFunc(JSContext *ctx, const char *module_base_name, const char *module_name, void *opaque)
 
typedef JSModuleDefJSModuleLoaderFunc(JSContext *ctx, const char *module_name, void *opaque)
 
typedef JSValue JSJobFunc(JSContext *ctx, int argc, JSValueConst *argv)
 
typedef int JSModuleInitFunc(JSContext *ctx, JSModuleDef *m)
 

Enumerations

enum  {
  JS_TAG_FIRST = -11 , JS_TAG_BIG_DECIMAL = -11 , JS_TAG_BIG_INT = -10 , JS_TAG_BIG_FLOAT = -9 ,
  JS_TAG_SYMBOL = -8 , JS_TAG_STRING = -7 , JS_TAG_MODULE = -3 , JS_TAG_FUNCTION_BYTECODE = -2 ,
  JS_TAG_OBJECT = -1 , JS_TAG_INT = 0 , JS_TAG_BOOL = 1 , JS_TAG_NULL = 2 ,
  JS_TAG_UNDEFINED = 3 , JS_TAG_UNINITIALIZED = 4 , JS_TAG_CATCH_OFFSET = 5 , JS_TAG_EXCEPTION = 6 ,
  JS_TAG_FLOAT64 = 7
}
 
enum  JSCFunctionEnum {
  JS_CFUNC_generic , JS_CFUNC_generic_magic , JS_CFUNC_constructor , JS_CFUNC_constructor_magic ,
  JS_CFUNC_constructor_or_func , JS_CFUNC_constructor_or_func_magic , JS_CFUNC_f_f , JS_CFUNC_f_f_f ,
  JS_CFUNC_getter , JS_CFUNC_setter , JS_CFUNC_getter_magic , JS_CFUNC_setter_magic ,
  JS_CFUNC_iterator_next
}
 

Functions

static JSValue __JS_NewFloat64 (JSContext *ctx, double d)
 
static JS_BOOL JS_VALUE_IS_NAN (JSValue v)
 
JSRuntimeJS_NewRuntime (void)
 
void JS_SetRuntimeInfo (JSRuntime *rt, const char *info)
 
void JS_SetMemoryLimit (JSRuntime *rt, size_t limit)
 
void JS_SetGCThreshold (JSRuntime *rt, size_t gc_threshold)
 
void JS_SetMaxStackSize (JSRuntime *rt, size_t stack_size)
 
void JS_UpdateStackTop (JSRuntime *rt)
 
JSRuntimeJS_NewRuntime2 (const JSMallocFunctions *mf, void *opaque)
 
void JS_FreeRuntime (JSRuntime *rt)
 
void * JS_GetRuntimeOpaque (JSRuntime *rt)
 
void JS_SetRuntimeOpaque (JSRuntime *rt, void *opaque)
 
void JS_MarkValue (JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
 
void JS_RunGC (JSRuntime *rt)
 
JS_BOOL JS_IsLiveObject (JSRuntime *rt, JSValueConst obj)
 
JSContextJS_NewContext (JSRuntime *rt)
 
void JS_FreeContext (JSContext *s)
 
JSContextJS_DupContext (JSContext *ctx)
 
void * JS_GetContextOpaque (JSContext *ctx)
 
void JS_SetContextOpaque (JSContext *ctx, void *opaque)
 
JSRuntimeJS_GetRuntime (JSContext *ctx)
 
void JS_SetClassProto (JSContext *ctx, JSClassID class_id, JSValue obj)
 
JSValue JS_GetClassProto (JSContext *ctx, JSClassID class_id)
 
JSContextJS_NewContextRaw (JSRuntime *rt)
 
void JS_AddIntrinsicBaseObjects (JSContext *ctx)
 
void JS_AddIntrinsicDate (JSContext *ctx)
 
void JS_AddIntrinsicEval (JSContext *ctx)
 
void JS_AddIntrinsicStringNormalize (JSContext *ctx)
 
void JS_AddIntrinsicRegExpCompiler (JSContext *ctx)
 
void JS_AddIntrinsicRegExp (JSContext *ctx)
 
void JS_AddIntrinsicJSON (JSContext *ctx)
 
void JS_AddIntrinsicProxy (JSContext *ctx)
 
void JS_AddIntrinsicMapSet (JSContext *ctx)
 
void JS_AddIntrinsicTypedArrays (JSContext *ctx)
 
void JS_AddIntrinsicPromise (JSContext *ctx)
 
void JS_AddIntrinsicBigInt (JSContext *ctx)
 
void JS_AddIntrinsicBigFloat (JSContext *ctx)
 
void JS_AddIntrinsicBigDecimal (JSContext *ctx)
 
void JS_AddIntrinsicOperators (JSContext *ctx)
 
void JS_EnableBignumExt (JSContext *ctx, JS_BOOL enable)
 
JSValue js_string_codePointRange (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
void * js_malloc_rt (JSRuntime *rt, size_t size)
 
void js_free_rt (JSRuntime *rt, void *ptr)
 
void * js_realloc_rt (JSRuntime *rt, void *ptr, size_t size)
 
size_t js_malloc_usable_size_rt (JSRuntime *rt, const void *ptr)
 
void * js_mallocz_rt (JSRuntime *rt, size_t size)
 
void * js_malloc (JSContext *ctx, size_t size)
 
void js_free (JSContext *ctx, void *ptr)
 
void * js_realloc (JSContext *ctx, void *ptr, size_t size)
 
size_t js_malloc_usable_size (JSContext *ctx, const void *ptr)
 
void * js_realloc2 (JSContext *ctx, void *ptr, size_t size, size_t *pslack)
 
void * js_mallocz (JSContext *ctx, size_t size)
 
char * js_strdup (JSContext *ctx, const char *str)
 
char * js_strndup (JSContext *ctx, const char *s, size_t n)
 
void JS_ComputeMemoryUsage (JSRuntime *rt, JSMemoryUsage *s)
 
void JS_DumpMemoryUsage (FILE *fp, const JSMemoryUsage *s, JSRuntime *rt)
 
JSAtom JS_NewAtomLen (JSContext *ctx, const char *str, size_t len)
 
JSAtom JS_NewAtom (JSContext *ctx, const char *str)
 
JSAtom JS_NewAtomUInt32 (JSContext *ctx, uint32_t n)
 
JSAtom JS_DupAtom (JSContext *ctx, JSAtom v)
 
void JS_FreeAtom (JSContext *ctx, JSAtom v)
 
void JS_FreeAtomRT (JSRuntime *rt, JSAtom v)
 
JSValue JS_AtomToValue (JSContext *ctx, JSAtom atom)
 
JSValue JS_AtomToString (JSContext *ctx, JSAtom atom)
 
const char * JS_AtomToCString (JSContext *ctx, JSAtom atom)
 
JSAtom JS_ValueToAtom (JSContext *ctx, JSValueConst val)
 
JSClassID JS_NewClassID (JSClassID *pclass_id)
 
int JS_NewClass (JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def)
 
int JS_IsRegisteredClass (JSRuntime *rt, JSClassID class_id)
 
static js_force_inline JSValue JS_NewBool (JSContext *ctx, JS_BOOL val)
 
static js_force_inline JSValue JS_NewInt32 (JSContext *ctx, int32_t val)
 
static js_force_inline JSValue JS_NewCatchOffset (JSContext *ctx, int32_t val)
 
static js_force_inline JSValue JS_NewInt64 (JSContext *ctx, int64_t val)
 
static js_force_inline JSValue JS_NewUint32 (JSContext *ctx, uint32_t val)
 
JSValue JS_NewBigInt64 (JSContext *ctx, int64_t v)
 
JSValue JS_NewBigUint64 (JSContext *ctx, uint64_t v)
 
static js_force_inline JSValue JS_NewFloat64 (JSContext *ctx, double d)
 
static JS_BOOL JS_IsNumber (JSValueConst v)
 
static JS_BOOL JS_IsInteger (JSValueConst v)
 
static JS_BOOL JS_IsBigInt (JSContext *ctx, JSValueConst v)
 
static JS_BOOL JS_IsBigFloat (JSValueConst v)
 
static JS_BOOL JS_IsBigDecimal (JSValueConst v)
 
static JS_BOOL JS_IsBool (JSValueConst v)
 
static JS_BOOL JS_IsNull (JSValueConst v)
 
static JS_BOOL JS_IsUndefined (JSValueConst v)
 
static JS_BOOL JS_IsException (JSValueConst v)
 
static JS_BOOL JS_IsUninitialized (JSValueConst v)
 
static JS_BOOL JS_IsString (JSValueConst v)
 
static JS_BOOL JS_IsSymbol (JSValueConst v)
 
static JS_BOOL JS_IsObject (JSValueConst v)
 
JSValue JS_Throw (JSContext *ctx, JSValue obj)
 
JSValue JS_GetException (JSContext *ctx)
 
JS_BOOL JS_IsError (JSContext *ctx, JSValueConst val)
 
void JS_ResetUncatchableError (JSContext *ctx)
 
JSValue JS_NewError (JSContext *ctx)
 
JSValue __js_printf_like (2, 3) JS_ThrowSyntaxError(JSContext *ctx
 
JSValue const char JSValue const char JSValue const char JSValue const char JSValue const char JSValue JS_ThrowOutOfMemory (JSContext *ctx)
 
void __JS_FreeValue (JSContext *ctx, JSValue v)
 
static void JS_FreeValue (JSContext *ctx, JSValue v)
 
void __JS_FreeValueRT (JSRuntime *rt, JSValue v)
 
static void JS_FreeValueRT (JSRuntime *rt, JSValue v)
 
static JSValue JS_DupValue (JSContext *ctx, JSValueConst v)
 
static JSValue JS_DupValueRT (JSRuntime *rt, JSValueConst v)
 
int JS_ToBool (JSContext *ctx, JSValueConst val)
 
int JS_ToInt32 (JSContext *ctx, int32_t *pres, JSValueConst val)
 
static int JS_ToUint32 (JSContext *ctx, uint32_t *pres, JSValueConst val)
 
int JS_ToInt64 (JSContext *ctx, int64_t *pres, JSValueConst val)
 
int JS_ToIndex (JSContext *ctx, uint64_t *plen, JSValueConst val)
 
int JS_ToFloat64 (JSContext *ctx, double *pres, JSValueConst val)
 
int JS_ToBigInt64 (JSContext *ctx, int64_t *pres, JSValueConst val)
 
int JS_ToInt64Ext (JSContext *ctx, int64_t *pres, JSValueConst val)
 
JSValue JS_NewStringLen (JSContext *ctx, const char *str1, size_t len1)
 
JSValue JS_NewString (JSContext *ctx, const char *str)
 
JSValue JS_NewAtomString (JSContext *ctx, const char *str)
 
JSValue JS_ToString (JSContext *ctx, JSValueConst val)
 
JSValue JS_ToPropertyKey (JSContext *ctx, JSValueConst val)
 
const char * JS_ToCStringLen2 (JSContext *ctx, size_t *plen, JSValueConst val1, JS_BOOL cesu8)
 
static const char * JS_ToCStringLen (JSContext *ctx, size_t *plen, JSValueConst val1)
 
static const char * JS_ToCString (JSContext *ctx, JSValueConst val1)
 
void JS_FreeCString (JSContext *ctx, const char *ptr)
 
JSValue JS_NewObjectProtoClass (JSContext *ctx, JSValueConst proto, JSClassID class_id)
 
JSValue JS_NewObjectClass (JSContext *ctx, int class_id)
 
JSValue JS_NewObjectProto (JSContext *ctx, JSValueConst proto)
 
JSValue JS_NewObject (JSContext *ctx)
 
JS_BOOL JS_IsFunction (JSContext *ctx, JSValueConst val)
 
JS_BOOL JS_IsConstructor (JSContext *ctx, JSValueConst val)
 
JS_BOOL JS_SetConstructorBit (JSContext *ctx, JSValueConst func_obj, JS_BOOL val)
 
JSValue JS_NewArray (JSContext *ctx)
 
int JS_IsArray (JSContext *ctx, JSValueConst val)
 
JSValue JS_GetPropertyInternal (JSContext *ctx, JSValueConst obj, JSAtom prop, JSValueConst receiver, JS_BOOL throw_ref_error)
 
static js_force_inline JSValue JS_GetProperty (JSContext *ctx, JSValueConst this_obj, JSAtom prop)
 
JSValue JS_GetPropertyStr (JSContext *ctx, JSValueConst this_obj, const char *prop)
 
JSValue JS_GetPropertyUint32 (JSContext *ctx, JSValueConst this_obj, uint32_t idx)
 
int JS_SetPropertyInternal (JSContext *ctx, JSValueConst this_obj, JSAtom prop, JSValue val, int flags)
 
static int JS_SetProperty (JSContext *ctx, JSValueConst this_obj, JSAtom prop, JSValue val)
 
int JS_SetPropertyUint32 (JSContext *ctx, JSValueConst this_obj, uint32_t idx, JSValue val)
 
int JS_SetPropertyInt64 (JSContext *ctx, JSValueConst this_obj, int64_t idx, JSValue val)
 
int JS_SetPropertyStr (JSContext *ctx, JSValueConst this_obj, const char *prop, JSValue val)
 
int JS_HasProperty (JSContext *ctx, JSValueConst this_obj, JSAtom prop)
 
int JS_IsExtensible (JSContext *ctx, JSValueConst obj)
 
int JS_PreventExtensions (JSContext *ctx, JSValueConst obj)
 
int JS_DeleteProperty (JSContext *ctx, JSValueConst obj, JSAtom prop, int flags)
 
int JS_SetPrototype (JSContext *ctx, JSValueConst obj, JSValueConst proto_val)
 
JSValue JS_GetPrototype (JSContext *ctx, JSValueConst val)
 
int JS_GetOwnPropertyNames (JSContext *ctx, JSPropertyEnum **ptab, uint32_t *plen, JSValueConst obj, int flags)
 
int JS_GetOwnProperty (JSContext *ctx, JSPropertyDescriptor *desc, JSValueConst obj, JSAtom prop)
 
JSValue JS_Call (JSContext *ctx, JSValueConst func_obj, JSValueConst this_obj, int argc, JSValueConst *argv)
 
JSValue JS_Invoke (JSContext *ctx, JSValueConst this_val, JSAtom atom, int argc, JSValueConst *argv)
 
JSValue JS_CallConstructor (JSContext *ctx, JSValueConst func_obj, int argc, JSValueConst *argv)
 
JSValue JS_CallConstructor2 (JSContext *ctx, JSValueConst func_obj, JSValueConst new_target, int argc, JSValueConst *argv)
 
JS_BOOL JS_DetectModule (const char *input, size_t input_len)
 
JSValue JS_Eval (JSContext *ctx, const char *input, size_t input_len, const char *filename, int eval_flags)
 
JSValue JS_EvalThis (JSContext *ctx, JSValueConst this_obj, const char *input, size_t input_len, const char *filename, int eval_flags)
 
JSValue JS_GetGlobalObject (JSContext *ctx)
 
int JS_IsInstanceOf (JSContext *ctx, JSValueConst val, JSValueConst obj)
 
int JS_DefineProperty (JSContext *ctx, JSValueConst this_obj, JSAtom prop, JSValueConst val, JSValueConst getter, JSValueConst setter, int flags)
 
int JS_DefinePropertyValue (JSContext *ctx, JSValueConst this_obj, JSAtom prop, JSValue val, int flags)
 
int JS_DefinePropertyValueUint32 (JSContext *ctx, JSValueConst this_obj, uint32_t idx, JSValue val, int flags)
 
int JS_DefinePropertyValueStr (JSContext *ctx, JSValueConst this_obj, const char *prop, JSValue val, int flags)
 
int JS_DefinePropertyGetSet (JSContext *ctx, JSValueConst this_obj, JSAtom prop, JSValue getter, JSValue setter, int flags)
 
void JS_SetOpaque (JSValue obj, void *opaque)
 
void * JS_GetOpaque (JSValueConst obj, JSClassID class_id)
 
void * JS_GetOpaque2 (JSContext *ctx, JSValueConst obj, JSClassID class_id)
 
JSValue JS_ParseJSON (JSContext *ctx, const char *buf, size_t buf_len, const char *filename)
 
JSValue JS_ParseJSON2 (JSContext *ctx, const char *buf, size_t buf_len, const char *filename, int flags)
 
JSValue JS_JSONStringify (JSContext *ctx, JSValueConst obj, JSValueConst replacer, JSValueConst space0)
 
JSValue JS_NewArrayBuffer (JSContext *ctx, uint8_t *buf, size_t len, JSFreeArrayBufferDataFunc *free_func, void *opaque, JS_BOOL is_shared)
 
JSValue JS_NewArrayBufferCopy (JSContext *ctx, const uint8_t *buf, size_t len)
 
void JS_DetachArrayBuffer (JSContext *ctx, JSValueConst obj)
 
uint8_tJS_GetArrayBuffer (JSContext *ctx, size_t *psize, JSValueConst obj)
 
JSValue JS_GetTypedArrayBuffer (JSContext *ctx, JSValueConst obj, size_t *pbyte_offset, size_t *pbyte_length, size_t *pbytes_per_element)
 
void JS_SetSharedArrayBufferFunctions (JSRuntime *rt, const JSSharedArrayBufferFunctions *sf)
 
JSValue JS_NewPromiseCapability (JSContext *ctx, JSValue *resolving_funcs)
 
void JS_SetHostPromiseRejectionTracker (JSRuntime *rt, JSHostPromiseRejectionTracker *cb, void *opaque)
 
void JS_SetInterruptHandler (JSRuntime *rt, JSInterruptHandler *cb, void *opaque)
 
void JS_SetCanBlock (JSRuntime *rt, JS_BOOL can_block)
 
void JS_SetIsHTMLDDA (JSContext *ctx, JSValueConst obj)
 
void JS_SetModuleLoaderFunc (JSRuntime *rt, JSModuleNormalizeFunc *module_normalize, JSModuleLoaderFunc *module_loader, void *opaque)
 
JSValue JS_GetImportMeta (JSContext *ctx, JSModuleDef *m)
 
JSAtom JS_GetModuleName (JSContext *ctx, JSModuleDef *m)
 
int JS_EnqueueJob (JSContext *ctx, JSJobFunc *job_func, int argc, JSValueConst *argv)
 
JS_BOOL JS_IsJobPending (JSRuntime *rt)
 
int JS_ExecutePendingJob (JSRuntime *rt, JSContext **pctx)
 
uint8_tJS_WriteObject (JSContext *ctx, size_t *psize, JSValueConst obj, int flags)
 
uint8_tJS_WriteObject2 (JSContext *ctx, size_t *psize, JSValueConst obj, int flags, uint8_t ***psab_tab, size_t *psab_tab_len)
 
JSValue JS_ReadObject (JSContext *ctx, const uint8_t *buf, size_t buf_len, int flags)
 
JSValue JS_EvalFunction (JSContext *ctx, JSValue fun_obj)
 
int JS_ResolveModule (JSContext *ctx, JSValueConst obj)
 
JSAtom JS_GetScriptOrModuleName (JSContext *ctx, int n_stack_levels)
 
JSModuleDefJS_RunModule (JSContext *ctx, const char *basename, const char *filename)
 
JSValue JS_NewCFunction2 (JSContext *ctx, JSCFunction *func, const char *name, int length, JSCFunctionEnum cproto, int magic)
 
JSValue JS_NewCFunctionData (JSContext *ctx, JSCFunctionData *func, int length, int magic, int data_len, JSValueConst *data)
 
static JSValue JS_NewCFunction (JSContext *ctx, JSCFunction *func, const char *name, int length)
 
static JSValue JS_NewCFunctionMagic (JSContext *ctx, JSCFunctionMagic *func, const char *name, int length, JSCFunctionEnum cproto, int magic)
 
void JS_SetConstructor (JSContext *ctx, JSValueConst func_obj, JSValueConst proto)
 
void JS_SetPropertyFunctionList (JSContext *ctx, JSValueConst obj, const JSCFunctionListEntry *tab, int len)
 
JSModuleDefJS_NewCModule (JSContext *ctx, const char *name_str, JSModuleInitFunc *func)
 
int JS_AddModuleExport (JSContext *ctx, JSModuleDef *m, const char *name_str)
 
int JS_AddModuleExportList (JSContext *ctx, JSModuleDef *m, const JSCFunctionListEntry *tab, int len)
 
int JS_SetModuleExport (JSContext *ctx, JSModuleDef *m, const char *export_name, JSValue val)
 
int JS_SetModuleExportList (JSContext *ctx, JSModuleDef *m, const JSCFunctionListEntry *tab, int len)
 
int JS_AtomIsArrayIndex (JSContext *ctx, uint32_t *pval, JSAtom atom)
 
int JS_IsArrayBuffer (JSContext *ctx, JSValueConst val)
 
int JS_SwitchClassID (JSValue obj, JSClassID class_id)
 
void * JS_GetOpaque_Nocheck (JSValueConst obj)
 

Variables

JSValue const char * fmt
 

Data Structure Documentation

◆ JSRefCountHeader

struct JSRefCountHeader
Data Fields
int ref_count

◆ JSValueUnion

union JSValueUnion
Data Fields
void * ptr
int32_t int32
double float64

◆ JSValue

struct JSValue
+ Collaboration diagram for JSValue:
Data Fields
JSValueUnion u
int64_t tag

◆ JSMallocState

struct JSMallocState
Data Fields
size_t malloc_count
size_t malloc_size
size_t malloc_limit
void * opaque

◆ JSMemoryUsage

struct JSMemoryUsage
Data Fields
int64_t malloc_size
int64_t malloc_limit
int64_t memory_used_size
int64_t malloc_count
int64_t memory_used_count
int64_t atom_count
int64_t atom_size
int64_t str_count
int64_t str_size
int64_t obj_count
int64_t obj_size
int64_t prop_count
int64_t prop_size
int64_t shape_count
int64_t shape_size
int64_t js_func_count
int64_t js_func_size
int64_t js_func_code_size
int64_t js_func_pc2line_count
int64_t js_func_pc2line_size
int64_t c_func_count
int64_t array_count
int64_t fast_array_count
int64_t fast_array_elements
int64_t binary_object_count
int64_t binary_object_size

◆ JSPropertyEnum

struct JSPropertyEnum
Data Fields
JS_BOOL is_enumerable
JSAtom atom

◆ JSPropertyDescriptor

struct JSPropertyDescriptor
+ Collaboration diagram for JSPropertyDescriptor:
Data Fields
int flags
JSValue value
JSValue getter
JSValue setter

◆ JSClassDef

struct JSClassDef
+ Collaboration diagram for JSClassDef:
Data Fields
const char * class_name
JSClassFinalizer * finalizer
JSClassGCMark * gc_mark
JSClassCall * call
JSClassExoticMethods * exotic

◆ JSCFunctionListEntry

struct JSCFunctionListEntry
Data Fields
const char * name
uint8_t prop_flags
uint8_t def_type
int16_t magic
union JSCFunctionListEntry u

◆ JSCFunctionListEntry.u

union JSCFunctionListEntry.u
Data Fields
u func
u getset
u alias
u prop_list
const char * str
int32_t i32
int64_t i64
double f64

◆ JSCFunctionListEntry.u.func

struct JSCFunctionListEntry.u.func
Data Fields
uint32_t length
uint32_t cproto
JSCFunctionType cfunc

◆ JSCFunctionListEntry.u.getset

struct JSCFunctionListEntry.u.getset
Data Fields
JSCFunctionType get
JSCFunctionType set

◆ JSCFunctionListEntry.u.alias

struct JSCFunctionListEntry.u.alias
Data Fields
const char * name
int base

◆ JSCFunctionListEntry.u.prop_list

struct JSCFunctionListEntry.u.prop_list
Data Fields
const struct JSCFunctionListEntry * tab
int len

Macro Definition Documentation

◆ js_likely

#define js_likely (   x)    (x)

◆ js_unlikely

#define js_unlikely (   x)    (x)

◆ js_force_inline

#define js_force_inline   inline

◆ __js_printf_like

#define __js_printf_like (   a,
 
)

◆ JS_BOOL

#define JS_BOOL   int

◆ JS_PTR64

#define JS_PTR64

◆ JS_PTR64_DEF

#define JS_PTR64_DEF (   a)    a

◆ JS_FLOAT64_NAN

#define JS_FLOAT64_NAN   NAN

◆ JSValueConst

#define JSValueConst   JSValue

◆ JS_VALUE_GET_TAG

#define JS_VALUE_GET_TAG (   v)    ((int32_t)(v).tag)

◆ JS_VALUE_GET_NORM_TAG

#define JS_VALUE_GET_NORM_TAG (   v)    JS_VALUE_GET_TAG(v)

◆ JS_VALUE_GET_INT

#define JS_VALUE_GET_INT (   v)    ((v).u.int32)

◆ JS_VALUE_GET_BOOL

#define JS_VALUE_GET_BOOL (   v)    ((v).u.int32)

◆ JS_VALUE_GET_FLOAT64

#define JS_VALUE_GET_FLOAT64 (   v)    ((v).u.float64)

◆ JS_VALUE_GET_PTR

#define JS_VALUE_GET_PTR (   v)    ((v).u.ptr)

◆ JS_MKVAL

#define JS_MKVAL (   tag,
  val 
)    (JSValue){ (JSValueUnion){ .int32 = val }, tag }

◆ JS_MKPTR

#define JS_MKPTR (   tag,
 
)    (JSValue){ (JSValueUnion){ .ptr = p }, tag }

◆ JS_TAG_IS_FLOAT64

#define JS_TAG_IS_FLOAT64 (   tag)    ((unsigned)(tag) == JS_TAG_FLOAT64)

◆ JS_NAN

#define JS_NAN   (JSValue){ .u.float64 = JS_FLOAT64_NAN, JS_TAG_FLOAT64 }

◆ JS_VALUE_IS_BOTH_INT

#define JS_VALUE_IS_BOTH_INT (   v1,
  v2 
)    ((JS_VALUE_GET_TAG(v1) | JS_VALUE_GET_TAG(v2)) == 0)

◆ JS_VALUE_IS_BOTH_FLOAT

#define JS_VALUE_IS_BOTH_FLOAT (   v1,
  v2 
)    (JS_TAG_IS_FLOAT64(JS_VALUE_GET_TAG(v1)) && JS_TAG_IS_FLOAT64(JS_VALUE_GET_TAG(v2)))

◆ JS_VALUE_GET_OBJ

#define JS_VALUE_GET_OBJ (   v)    ((JSObject *)JS_VALUE_GET_PTR(v))

◆ JS_VALUE_GET_STRING

#define JS_VALUE_GET_STRING (   v)    ((JSString *)JS_VALUE_GET_PTR(v))

◆ JS_VALUE_HAS_REF_COUNT

#define JS_VALUE_HAS_REF_COUNT (   v)    ((unsigned)JS_VALUE_GET_TAG(v) >= (unsigned)JS_TAG_FIRST)

◆ JS_NULL

#define JS_NULL   JS_MKVAL(JS_TAG_NULL, 0)

◆ JS_UNDEFINED

#define JS_UNDEFINED   JS_MKVAL(JS_TAG_UNDEFINED, 0)

◆ JS_FALSE

#define JS_FALSE   JS_MKVAL(JS_TAG_BOOL, 0)

◆ JS_TRUE

#define JS_TRUE   JS_MKVAL(JS_TAG_BOOL, 1)

◆ JS_EXCEPTION

#define JS_EXCEPTION   JS_MKVAL(JS_TAG_EXCEPTION, 0)

◆ JS_UNINITIALIZED

#define JS_UNINITIALIZED   JS_MKVAL(JS_TAG_UNINITIALIZED, 0)

◆ JS_PROP_CONFIGURABLE

#define JS_PROP_CONFIGURABLE   (1 << 0)

◆ JS_PROP_WRITABLE

#define JS_PROP_WRITABLE   (1 << 1)

◆ JS_PROP_ENUMERABLE

#define JS_PROP_ENUMERABLE   (1 << 2)

◆ JS_PROP_C_W_E

#define JS_PROP_C_W_E   (JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)

◆ JS_PROP_LENGTH

#define JS_PROP_LENGTH   (1 << 3) /* used internally in Arrays */

◆ JS_PROP_TMASK

#define JS_PROP_TMASK   (3 << 4) /* mask for NORMAL, GETSET, VARREF, AUTOINIT */

◆ JS_PROP_NORMAL

#define JS_PROP_NORMAL   (0 << 4)

◆ JS_PROP_GETSET

#define JS_PROP_GETSET   (1 << 4)

◆ JS_PROP_VARREF

#define JS_PROP_VARREF   (2 << 4) /* used internally */

◆ JS_PROP_AUTOINIT

#define JS_PROP_AUTOINIT   (3 << 4) /* used internally */

◆ JS_PROP_HAS_SHIFT

#define JS_PROP_HAS_SHIFT   8

◆ JS_PROP_HAS_CONFIGURABLE

#define JS_PROP_HAS_CONFIGURABLE   (1 << 8)

◆ JS_PROP_HAS_WRITABLE

#define JS_PROP_HAS_WRITABLE   (1 << 9)

◆ JS_PROP_HAS_ENUMERABLE

#define JS_PROP_HAS_ENUMERABLE   (1 << 10)

◆ JS_PROP_HAS_GET

#define JS_PROP_HAS_GET   (1 << 11)

◆ JS_PROP_HAS_SET

#define JS_PROP_HAS_SET   (1 << 12)

◆ JS_PROP_HAS_VALUE

#define JS_PROP_HAS_VALUE   (1 << 13)

◆ JS_PROP_THROW

#define JS_PROP_THROW   (1 << 14)

◆ JS_PROP_THROW_STRICT

#define JS_PROP_THROW_STRICT   (1 << 15)

◆ JS_PROP_NO_ADD

#define JS_PROP_NO_ADD   (1 << 16) /* internal use */

◆ JS_PROP_NO_EXOTIC

#define JS_PROP_NO_EXOTIC   (1 << 17) /* internal use */

◆ JS_DEFAULT_STACK_SIZE

#define JS_DEFAULT_STACK_SIZE   (256 * 1024)

◆ JS_EVAL_TYPE_GLOBAL

#define JS_EVAL_TYPE_GLOBAL   (0 << 0) /* global code (default) */

◆ JS_EVAL_TYPE_MODULE

#define JS_EVAL_TYPE_MODULE   (1 << 0) /* module code */

◆ JS_EVAL_TYPE_DIRECT

#define JS_EVAL_TYPE_DIRECT   (2 << 0) /* direct call (internal use) */

◆ JS_EVAL_TYPE_INDIRECT

#define JS_EVAL_TYPE_INDIRECT   (3 << 0) /* indirect call (internal use) */

◆ JS_EVAL_TYPE_MASK

#define JS_EVAL_TYPE_MASK   (3 << 0)

◆ JS_EVAL_FLAG_STRICT

#define JS_EVAL_FLAG_STRICT   (1 << 3) /* force 'strict' mode */

◆ JS_EVAL_FLAG_STRIP

#define JS_EVAL_FLAG_STRIP   (1 << 4) /* force 'strip' mode */

◆ JS_EVAL_FLAG_COMPILE_ONLY

#define JS_EVAL_FLAG_COMPILE_ONLY   (1 << 5)

◆ JS_EVAL_FLAG_BACKTRACE_BARRIER

#define JS_EVAL_FLAG_BACKTRACE_BARRIER   (1 << 6)

◆ JS_ATOM_NULL

#define JS_ATOM_NULL   0

◆ JS_CALL_FLAG_CONSTRUCTOR

#define JS_CALL_FLAG_CONSTRUCTOR   (1 << 0)

◆ JS_GPN_STRING_MASK

#define JS_GPN_STRING_MASK   (1 << 0)

◆ JS_GPN_SYMBOL_MASK

#define JS_GPN_SYMBOL_MASK   (1 << 1)

◆ JS_GPN_PRIVATE_MASK

#define JS_GPN_PRIVATE_MASK   (1 << 2)

◆ JS_GPN_ENUM_ONLY

#define JS_GPN_ENUM_ONLY   (1 << 4)

◆ JS_GPN_SET_ENUM

#define JS_GPN_SET_ENUM   (1 << 5)

◆ JS_PARSE_JSON_EXT

#define JS_PARSE_JSON_EXT   (1 << 0) /* allow extended JSON */

◆ JS_WRITE_OBJ_BYTECODE

#define JS_WRITE_OBJ_BYTECODE   (1 << 0) /* allow function/module */

◆ JS_WRITE_OBJ_BSWAP

#define JS_WRITE_OBJ_BSWAP   (1 << 1) /* byte swapped output */

◆ JS_WRITE_OBJ_SAB

#define JS_WRITE_OBJ_SAB   (1 << 2) /* allow SharedArrayBuffer */

◆ JS_WRITE_OBJ_REFERENCE

#define JS_WRITE_OBJ_REFERENCE
Value:
(1 << 3) /* allow object references to
encode arbitrary object
graph */

◆ JS_READ_OBJ_BYTECODE

#define JS_READ_OBJ_BYTECODE   (1 << 0) /* allow function/module */

◆ JS_READ_OBJ_ROM_DATA

#define JS_READ_OBJ_ROM_DATA   (1 << 1) /* avoid duplicating 'buf' data */

◆ JS_READ_OBJ_SAB

#define JS_READ_OBJ_SAB   (1 << 2) /* allow SharedArrayBuffer */

◆ JS_READ_OBJ_REFERENCE

#define JS_READ_OBJ_REFERENCE   (1 << 3) /* allow object references */

◆ JS_DEF_CFUNC

#define JS_DEF_CFUNC   0

◆ JS_DEF_CGETSET

#define JS_DEF_CGETSET   1

◆ JS_DEF_CGETSET_MAGIC

#define JS_DEF_CGETSET_MAGIC   2

◆ JS_DEF_PROP_STRING

#define JS_DEF_PROP_STRING   3

◆ JS_DEF_PROP_INT32

#define JS_DEF_PROP_INT32   4

◆ JS_DEF_PROP_INT64

#define JS_DEF_PROP_INT64   5

◆ JS_DEF_PROP_DOUBLE

#define JS_DEF_PROP_DOUBLE   6

◆ JS_DEF_PROP_UNDEFINED

#define JS_DEF_PROP_UNDEFINED   7

◆ JS_DEF_OBJECT

#define JS_DEF_OBJECT   8

◆ JS_DEF_ALIAS

#define JS_DEF_ALIAS   9

◆ JS_CFUNC_DEF

#define JS_CFUNC_DEF (   name,
  length,
  func1 
)    { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }

◆ JS_CFUNC_MAGIC_DEF

#define JS_CFUNC_MAGIC_DEF (   name,
  length,
  func1,
  magic 
)    { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, .u = { .func = { length, JS_CFUNC_generic_magic, { .generic_magic = func1 } } } }

◆ JS_CFUNC_SPECIAL_DEF

#define JS_CFUNC_SPECIAL_DEF (   name,
  length,
  cproto,
  func1 
)    { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_ ## cproto, { .cproto = func1 } } } }

◆ JS_ITERATOR_NEXT_DEF

#define JS_ITERATOR_NEXT_DEF (   name,
  length,
  func1,
  magic 
)    { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, .u = { .func = { length, JS_CFUNC_iterator_next, { .iterator_next = func1 } } } }

◆ JS_CGETSET_DEF

#define JS_CGETSET_DEF (   name,
  fgetter,
  fsetter 
)    { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET, 0, .u = { .getset = { .get = { .getter = fgetter }, .set = { .setter = fsetter } } } }

◆ JS_CGETSET_MAGIC_DEF

#define JS_CGETSET_MAGIC_DEF (   name,
  fgetter,
  fsetter,
  magic 
)    { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET_MAGIC, magic, .u = { .getset = { .get = { .getter_magic = fgetter }, .set = { .setter_magic = fsetter } } } }

◆ JS_PROP_STRING_DEF

#define JS_PROP_STRING_DEF (   name,
  cstr,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_STRING, 0, .u = { .str = cstr } }

◆ JS_PROP_INT32_DEF

#define JS_PROP_INT32_DEF (   name,
  val,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_INT32, 0, .u = { .i32 = val } }

◆ JS_PROP_INT64_DEF

#define JS_PROP_INT64_DEF (   name,
  val,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_INT64, 0, .u = { .i64 = val } }

◆ JS_PROP_DOUBLE_DEF

#define JS_PROP_DOUBLE_DEF (   name,
  val,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_DOUBLE, 0, .u = { .f64 = val } }

◆ JS_PROP_UNDEFINED_DEF

#define JS_PROP_UNDEFINED_DEF (   name,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_UNDEFINED, 0, .u = { .i32 = 0 } }

◆ JS_OBJECT_DEF

#define JS_OBJECT_DEF (   name,
  tab,
  len,
  prop_flags 
)    { name, prop_flags, JS_DEF_OBJECT, 0, .u = { .prop_list = { tab, len } } }

◆ JS_ALIAS_DEF

#define JS_ALIAS_DEF (   name,
  from 
)    { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, .u = { .alias = { from, -1 } } }

◆ JS_ALIAS_BASE_DEF

#define JS_ALIAS_BASE_DEF (   name,
  from,
  base 
)    { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, .u = { .alias = { from, base } } }

Typedef Documentation

◆ JSClassID

◆ JSAtom

typedef uint32_t JSAtom

◆ JSCFunction

typedef JSValue JSCFunction(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)

◆ JSCFunctionMagic

typedef JSValue JSCFunctionMagic(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic)

◆ JSCFunctionData

typedef JSValue JSCFunctionData(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic, JSValue *func_data)

◆ JS_MarkFunc

typedef void JS_MarkFunc(JSRuntime *rt, JSGCObjectHeader *gp)

◆ JSClassFinalizer

typedef void JSClassFinalizer(JSRuntime *rt, JSValue val)

◆ JSClassGCMark

typedef void JSClassGCMark(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)

◆ JSClassCall

typedef JSValue JSClassCall(JSContext *ctx, JSValueConst func_obj, JSValueConst this_val, int argc, JSValueConst *argv, int flags)

◆ JSFreeArrayBufferDataFunc

typedef void JSFreeArrayBufferDataFunc(JSRuntime *rt, void *opaque, void *ptr)

◆ JSHostPromiseRejectionTracker

typedef void JSHostPromiseRejectionTracker(JSContext *ctx, JSValueConst promise, JSValueConst reason, JS_BOOL is_handled, void *opaque)

◆ JSInterruptHandler

typedef int JSInterruptHandler(JSRuntime *rt, void *opaque)

◆ JSModuleNormalizeFunc

typedef char* JSModuleNormalizeFunc(JSContext *ctx, const char *module_base_name, const char *module_name, void *opaque)

◆ JSModuleLoaderFunc

typedef JSModuleDef* JSModuleLoaderFunc(JSContext *ctx, const char *module_name, void *opaque)

◆ JSJobFunc

typedef JSValue JSJobFunc(JSContext *ctx, int argc, JSValueConst *argv)

◆ JSModuleInitFunc

typedef int JSModuleInitFunc(JSContext *ctx, JSModuleDef *m)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
JS_TAG_FIRST 
JS_TAG_BIG_DECIMAL 
JS_TAG_BIG_INT 
JS_TAG_BIG_FLOAT 
JS_TAG_SYMBOL 
JS_TAG_STRING 
JS_TAG_MODULE 
JS_TAG_FUNCTION_BYTECODE 
JS_TAG_OBJECT 
JS_TAG_INT 
JS_TAG_BOOL 
JS_TAG_NULL 
JS_TAG_UNDEFINED 
JS_TAG_UNINITIALIZED 
JS_TAG_CATCH_OFFSET 
JS_TAG_EXCEPTION 
JS_TAG_FLOAT64 

◆ JSCFunctionEnum

Enumerator
JS_CFUNC_generic 
JS_CFUNC_generic_magic 
JS_CFUNC_constructor 
JS_CFUNC_constructor_magic 
JS_CFUNC_constructor_or_func 
JS_CFUNC_constructor_or_func_magic 
JS_CFUNC_f_f 
JS_CFUNC_f_f_f 
JS_CFUNC_getter 
JS_CFUNC_setter 
JS_CFUNC_getter_magic 
JS_CFUNC_setter_magic 
JS_CFUNC_iterator_next 

Function Documentation

◆ __JS_NewFloat64()

static JSValue __JS_NewFloat64 ( JSContext ctx,
double  d 
)
static
+ Here is the caller graph for this function:

◆ JS_VALUE_IS_NAN()

static JS_BOOL JS_VALUE_IS_NAN ( JSValue  v)
static
+ Here is the caller graph for this function:

◆ JS_NewRuntime()

JSRuntime* JS_NewRuntime ( void  )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetRuntimeInfo()

void JS_SetRuntimeInfo ( JSRuntime rt,
const char *  info 
)

◆ JS_SetMemoryLimit()

void JS_SetMemoryLimit ( JSRuntime rt,
size_t  limit 
)

◆ JS_SetGCThreshold()

void JS_SetGCThreshold ( JSRuntime rt,
size_t  gc_threshold 
)

◆ JS_SetMaxStackSize()

void JS_SetMaxStackSize ( JSRuntime rt,
size_t  stack_size 
)
+ Here is the call graph for this function:

◆ JS_UpdateStackTop()

void JS_UpdateStackTop ( JSRuntime rt)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewRuntime2()

JSRuntime* JS_NewRuntime2 ( const JSMallocFunctions mf,
void *  opaque 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_FreeRuntime()

void JS_FreeRuntime ( JSRuntime rt)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetRuntimeOpaque()

void* JS_GetRuntimeOpaque ( JSRuntime rt)
+ Here is the caller graph for this function:

◆ JS_SetRuntimeOpaque()

void JS_SetRuntimeOpaque ( JSRuntime rt,
void *  opaque 
)
+ Here is the caller graph for this function:

◆ JS_MarkValue()

void JS_MarkValue ( JSRuntime rt,
JSValueConst  val,
JS_MarkFunc mark_func 
)
+ Here is the caller graph for this function:

◆ JS_RunGC()

void JS_RunGC ( JSRuntime rt)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsLiveObject()

JS_BOOL JS_IsLiveObject ( JSRuntime rt,
JSValueConst  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewContext()

JSContext* JS_NewContext ( JSRuntime rt)
+ Here is the call graph for this function:

◆ JS_FreeContext()

void JS_FreeContext ( JSContext s)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DupContext()

JSContext* JS_DupContext ( JSContext ctx)
+ Here is the caller graph for this function:

◆ JS_GetContextOpaque()

void* JS_GetContextOpaque ( JSContext ctx)

◆ JS_SetContextOpaque()

void JS_SetContextOpaque ( JSContext ctx,
void *  opaque 
)
+ Here is the caller graph for this function:

◆ JS_GetRuntime()

JSRuntime* JS_GetRuntime ( JSContext ctx)
+ Here is the caller graph for this function:

◆ JS_SetClassProto()

void JS_SetClassProto ( JSContext ctx,
JSClassID  class_id,
JSValue  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetClassProto()

JSValue JS_GetClassProto ( JSContext ctx,
JSClassID  class_id 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewContextRaw()

JSContext* JS_NewContextRaw ( JSRuntime rt)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicBaseObjects()

void JS_AddIntrinsicBaseObjects ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicDate()

void JS_AddIntrinsicDate ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicEval()

void JS_AddIntrinsicEval ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicStringNormalize()

void JS_AddIntrinsicStringNormalize ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicRegExpCompiler()

void JS_AddIntrinsicRegExpCompiler ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicRegExp()

void JS_AddIntrinsicRegExp ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicJSON()

void JS_AddIntrinsicJSON ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicProxy()

void JS_AddIntrinsicProxy ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicMapSet()

void JS_AddIntrinsicMapSet ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicTypedArrays()

void JS_AddIntrinsicTypedArrays ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicPromise()

void JS_AddIntrinsicPromise ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicBigInt()

void JS_AddIntrinsicBigInt ( JSContext ctx)
+ Here is the caller graph for this function:

◆ JS_AddIntrinsicBigFloat()

void JS_AddIntrinsicBigFloat ( JSContext ctx)

◆ JS_AddIntrinsicBigDecimal()

void JS_AddIntrinsicBigDecimal ( JSContext ctx)

◆ JS_AddIntrinsicOperators()

void JS_AddIntrinsicOperators ( JSContext ctx)

◆ JS_EnableBignumExt()

void JS_EnableBignumExt ( JSContext ctx,
JS_BOOL  enable 
)

◆ js_string_codePointRange()

JSValue js_string_codePointRange ( JSContext ctx,
JSValueConst  this_val,
int  argc,
JSValueConst argv 
)
+ Here is the call graph for this function:

◆ js_malloc_rt()

void* js_malloc_rt ( JSRuntime rt,
size_t  size 
)
+ Here is the caller graph for this function:

◆ js_free_rt()

void js_free_rt ( JSRuntime rt,
void *  ptr 
)
+ Here is the caller graph for this function:

◆ js_realloc_rt()

void* js_realloc_rt ( JSRuntime rt,
void *  ptr,
size_t  size 
)
+ Here is the caller graph for this function:

◆ js_malloc_usable_size_rt()

size_t js_malloc_usable_size_rt ( JSRuntime rt,
const void *  ptr 
)
+ Here is the caller graph for this function:

◆ js_mallocz_rt()

void* js_mallocz_rt ( JSRuntime rt,
size_t  size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_malloc()

void* js_malloc ( JSContext ctx,
size_t  size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_free()

void js_free ( JSContext ctx,
void *  ptr 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_realloc()

void* js_realloc ( JSContext ctx,
void *  ptr,
size_t  size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_malloc_usable_size()

size_t js_malloc_usable_size ( JSContext ctx,
const void *  ptr 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_realloc2()

void* js_realloc2 ( JSContext ctx,
void *  ptr,
size_t  size,
size_t *  pslack 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_mallocz()

void* js_mallocz ( JSContext ctx,
size_t  size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_strdup()

char* js_strdup ( JSContext ctx,
const char *  str 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ js_strndup()

char* js_strndup ( JSContext ctx,
const char *  s,
size_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ComputeMemoryUsage()

void JS_ComputeMemoryUsage ( JSRuntime rt,
JSMemoryUsage s 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DumpMemoryUsage()

void JS_DumpMemoryUsage ( FILE *  fp,
const JSMemoryUsage s,
JSRuntime rt 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewAtomLen()

JSAtom JS_NewAtomLen ( JSContext ctx,
const char *  str,
size_t  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewAtom()

JSAtom JS_NewAtom ( JSContext ctx,
const char *  str 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewAtomUInt32()

JSAtom JS_NewAtomUInt32 ( JSContext ctx,
uint32_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DupAtom()

JSAtom JS_DupAtom ( JSContext ctx,
JSAtom  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_FreeAtom()

void JS_FreeAtom ( JSContext ctx,
JSAtom  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_FreeAtomRT()

void JS_FreeAtomRT ( JSRuntime rt,
JSAtom  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AtomToValue()

JSValue JS_AtomToValue ( JSContext ctx,
JSAtom  atom 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AtomToString()

JSValue JS_AtomToString ( JSContext ctx,
JSAtom  atom 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AtomToCString()

const char* JS_AtomToCString ( JSContext ctx,
JSAtom  atom 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ValueToAtom()

JSAtom JS_ValueToAtom ( JSContext ctx,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewClassID()

JSClassID JS_NewClassID ( JSClassID pclass_id)
+ Here is the caller graph for this function:

◆ JS_NewClass()

int JS_NewClass ( JSRuntime rt,
JSClassID  class_id,
const JSClassDef class_def 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsRegisteredClass()

int JS_IsRegisteredClass ( JSRuntime rt,
JSClassID  class_id 
)
+ Here is the caller graph for this function:

◆ JS_NewBool()

static js_force_inline JSValue JS_NewBool ( JSContext ctx,
JS_BOOL  val 
)
static
+ Here is the caller graph for this function:

◆ JS_NewInt32()

static js_force_inline JSValue JS_NewInt32 ( JSContext ctx,
int32_t  val 
)
static
+ Here is the caller graph for this function:

◆ JS_NewCatchOffset()

static js_force_inline JSValue JS_NewCatchOffset ( JSContext ctx,
int32_t  val 
)
static
+ Here is the caller graph for this function:

◆ JS_NewInt64()

static js_force_inline JSValue JS_NewInt64 ( JSContext ctx,
int64_t  val 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewUint32()

static js_force_inline JSValue JS_NewUint32 ( JSContext ctx,
uint32_t  val 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewBigInt64()

JSValue JS_NewBigInt64 ( JSContext ctx,
int64_t  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewBigUint64()

JSValue JS_NewBigUint64 ( JSContext ctx,
uint64_t  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewFloat64()

static js_force_inline JSValue JS_NewFloat64 ( JSContext ctx,
double  d 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsNumber()

static JS_BOOL JS_IsNumber ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_IsInteger()

static JS_BOOL JS_IsInteger ( JSValueConst  v)
static

◆ JS_IsBigInt()

static JS_BOOL JS_IsBigInt ( JSContext ctx,
JSValueConst  v 
)
static
+ Here is the caller graph for this function:

◆ JS_IsBigFloat()

static JS_BOOL JS_IsBigFloat ( JSValueConst  v)
static

◆ JS_IsBigDecimal()

static JS_BOOL JS_IsBigDecimal ( JSValueConst  v)
static

◆ JS_IsBool()

static JS_BOOL JS_IsBool ( JSValueConst  v)
static

◆ JS_IsNull()

static JS_BOOL JS_IsNull ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_IsUndefined()

static JS_BOOL JS_IsUndefined ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_IsException()

static JS_BOOL JS_IsException ( JSValueConst  v)
static

◆ JS_IsUninitialized()

static JS_BOOL JS_IsUninitialized ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_IsString()

static JS_BOOL JS_IsString ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_IsSymbol()

static JS_BOOL JS_IsSymbol ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_IsObject()

static JS_BOOL JS_IsObject ( JSValueConst  v)
static
+ Here is the caller graph for this function:

◆ JS_Throw()

JSValue JS_Throw ( JSContext ctx,
JSValue  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetException()

JSValue JS_GetException ( JSContext ctx)
+ Here is the caller graph for this function:

◆ JS_IsError()

JS_BOOL JS_IsError ( JSContext ctx,
JSValueConst  val 
)
+ Here is the caller graph for this function:

◆ JS_ResetUncatchableError()

void JS_ResetUncatchableError ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewError()

JSValue JS_NewError ( JSContext ctx)
+ Here is the call graph for this function:

◆ __js_printf_like()

JSValue const char JSValue const char JSValue const char JSValue const char JSValue __js_printf_like ( ,
 
)

◆ JS_ThrowOutOfMemory()

JSValue const char JSValue const char JSValue const char JSValue const char JSValue const char JSValue JS_ThrowOutOfMemory ( JSContext ctx)
+ Here is the caller graph for this function:

◆ __JS_FreeValue()

void __JS_FreeValue ( JSContext ctx,
JSValue  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_FreeValue()

static void JS_FreeValue ( JSContext ctx,
JSValue  v 
)
static
+ Here is the call graph for this function:

◆ __JS_FreeValueRT()

void __JS_FreeValueRT ( JSRuntime rt,
JSValue  v 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_FreeValueRT()

static void JS_FreeValueRT ( JSRuntime rt,
JSValue  v 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DupValue()

static JSValue JS_DupValue ( JSContext ctx,
JSValueConst  v 
)
static
+ Here is the caller graph for this function:

◆ JS_DupValueRT()

static JSValue JS_DupValueRT ( JSRuntime rt,
JSValueConst  v 
)
static
+ Here is the caller graph for this function:

◆ JS_ToBool()

int JS_ToBool ( JSContext ctx,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToInt32()

int JS_ToInt32 ( JSContext ctx,
int32_t pres,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToUint32()

static int JS_ToUint32 ( JSContext ctx,
uint32_t pres,
JSValueConst  val 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToInt64()

int JS_ToInt64 ( JSContext ctx,
int64_t pres,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToIndex()

int JS_ToIndex ( JSContext ctx,
uint64_t plen,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToFloat64()

int JS_ToFloat64 ( JSContext ctx,
double *  pres,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToBigInt64()

int JS_ToBigInt64 ( JSContext ctx,
int64_t pres,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToInt64Ext()

int JS_ToInt64Ext ( JSContext ctx,
int64_t pres,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewStringLen()

JSValue JS_NewStringLen ( JSContext ctx,
const char *  str1,
size_t  len1 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewString()

JSValue JS_NewString ( JSContext ctx,
const char *  str 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewAtomString()

JSValue JS_NewAtomString ( JSContext ctx,
const char *  str 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToString()

JSValue JS_ToString ( JSContext ctx,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToPropertyKey()

JSValue JS_ToPropertyKey ( JSContext ctx,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToCStringLen2()

const char* JS_ToCStringLen2 ( JSContext ctx,
size_t *  plen,
JSValueConst  val1,
JS_BOOL  cesu8 
)
+ Here is the caller graph for this function:

◆ JS_ToCStringLen()

static const char* JS_ToCStringLen ( JSContext ctx,
size_t *  plen,
JSValueConst  val1 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ToCString()

static const char* JS_ToCString ( JSContext ctx,
JSValueConst  val1 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_FreeCString()

void JS_FreeCString ( JSContext ctx,
const char *  ptr 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewObjectProtoClass()

JSValue JS_NewObjectProtoClass ( JSContext ctx,
JSValueConst  proto,
JSClassID  class_id 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewObjectClass()

JSValue JS_NewObjectClass ( JSContext ctx,
int  class_id 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewObjectProto()

JSValue JS_NewObjectProto ( JSContext ctx,
JSValueConst  proto 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewObject()

JSValue JS_NewObject ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsFunction()

JS_BOOL JS_IsFunction ( JSContext ctx,
JSValueConst  val 
)
+ Here is the caller graph for this function:

◆ JS_IsConstructor()

JS_BOOL JS_IsConstructor ( JSContext ctx,
JSValueConst  val 
)
+ Here is the caller graph for this function:

◆ JS_SetConstructorBit()

JS_BOOL JS_SetConstructorBit ( JSContext ctx,
JSValueConst  func_obj,
JS_BOOL  val 
)

◆ JS_NewArray()

JSValue JS_NewArray ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsArray()

int JS_IsArray ( JSContext ctx,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetPropertyInternal()

JSValue JS_GetPropertyInternal ( JSContext ctx,
JSValueConst  obj,
JSAtom  prop,
JSValueConst  receiver,
JS_BOOL  throw_ref_error 
)
+ Here is the caller graph for this function:

◆ JS_GetProperty()

static js_force_inline JSValue JS_GetProperty ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetPropertyStr()

JSValue JS_GetPropertyStr ( JSContext ctx,
JSValueConst  this_obj,
const char *  prop 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetPropertyUint32()

JSValue JS_GetPropertyUint32 ( JSContext ctx,
JSValueConst  this_obj,
uint32_t  idx 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetPropertyInternal()

int JS_SetPropertyInternal ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValue  val,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetProperty()

static int JS_SetProperty ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValue  val 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetPropertyUint32()

int JS_SetPropertyUint32 ( JSContext ctx,
JSValueConst  this_obj,
uint32_t  idx,
JSValue  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetPropertyInt64()

int JS_SetPropertyInt64 ( JSContext ctx,
JSValueConst  this_obj,
int64_t  idx,
JSValue  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetPropertyStr()

int JS_SetPropertyStr ( JSContext ctx,
JSValueConst  this_obj,
const char *  prop,
JSValue  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_HasProperty()

int JS_HasProperty ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsExtensible()

int JS_IsExtensible ( JSContext ctx,
JSValueConst  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_PreventExtensions()

int JS_PreventExtensions ( JSContext ctx,
JSValueConst  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DeleteProperty()

int JS_DeleteProperty ( JSContext ctx,
JSValueConst  obj,
JSAtom  prop,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetPrototype()

int JS_SetPrototype ( JSContext ctx,
JSValueConst  obj,
JSValueConst  proto_val 
)
+ Here is the call graph for this function:

◆ JS_GetPrototype()

JSValue JS_GetPrototype ( JSContext ctx,
JSValueConst  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetOwnPropertyNames()

int JS_GetOwnPropertyNames ( JSContext ctx,
JSPropertyEnum **  ptab,
uint32_t plen,
JSValueConst  obj,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetOwnProperty()

int JS_GetOwnProperty ( JSContext ctx,
JSPropertyDescriptor desc,
JSValueConst  obj,
JSAtom  prop 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_Call()

JSValue JS_Call ( JSContext ctx,
JSValueConst  func_obj,
JSValueConst  this_obj,
int  argc,
JSValueConst argv 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_Invoke()

JSValue JS_Invoke ( JSContext ctx,
JSValueConst  this_val,
JSAtom  atom,
int  argc,
JSValueConst argv 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_CallConstructor()

JSValue JS_CallConstructor ( JSContext ctx,
JSValueConst  func_obj,
int  argc,
JSValueConst argv 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_CallConstructor2()

JSValue JS_CallConstructor2 ( JSContext ctx,
JSValueConst  func_obj,
JSValueConst  new_target,
int  argc,
JSValueConst argv 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DetectModule()

JS_BOOL JS_DetectModule ( const char *  input,
size_t  input_len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_Eval()

JSValue JS_Eval ( JSContext ctx,
const char *  input,
size_t  input_len,
const char *  filename,
int  eval_flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_EvalThis()

JSValue JS_EvalThis ( JSContext ctx,
JSValueConst  this_obj,
const char *  input,
size_t  input_len,
const char *  filename,
int  eval_flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetGlobalObject()

JSValue JS_GetGlobalObject ( JSContext ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsInstanceOf()

int JS_IsInstanceOf ( JSContext ctx,
JSValueConst  val,
JSValueConst  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DefineProperty()

int JS_DefineProperty ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValueConst  val,
JSValueConst  getter,
JSValueConst  setter,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DefinePropertyValue()

int JS_DefinePropertyValue ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValue  val,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DefinePropertyValueUint32()

int JS_DefinePropertyValueUint32 ( JSContext ctx,
JSValueConst  this_obj,
uint32_t  idx,
JSValue  val,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DefinePropertyValueStr()

int JS_DefinePropertyValueStr ( JSContext ctx,
JSValueConst  this_obj,
const char *  prop,
JSValue  val,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DefinePropertyGetSet()

int JS_DefinePropertyGetSet ( JSContext ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValue  getter,
JSValue  setter,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetOpaque()

void JS_SetOpaque ( JSValue  obj,
void *  opaque 
)
+ Here is the caller graph for this function:

◆ JS_GetOpaque()

void* JS_GetOpaque ( JSValueConst  obj,
JSClassID  class_id 
)
+ Here is the caller graph for this function:

◆ JS_GetOpaque2()

void* JS_GetOpaque2 ( JSContext ctx,
JSValueConst  obj,
JSClassID  class_id 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ParseJSON()

JSValue JS_ParseJSON ( JSContext ctx,
const char *  buf,
size_t  buf_len,
const char *  filename 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ParseJSON2()

JSValue JS_ParseJSON2 ( JSContext ctx,
const char *  buf,
size_t  buf_len,
const char *  filename,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_JSONStringify()

JSValue JS_JSONStringify ( JSContext ctx,
JSValueConst  obj,
JSValueConst  replacer,
JSValueConst  space0 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewArrayBuffer()

JSValue JS_NewArrayBuffer ( JSContext ctx,
uint8_t buf,
size_t  len,
JSFreeArrayBufferDataFunc free_func,
void *  opaque,
JS_BOOL  is_shared 
)

◆ JS_NewArrayBufferCopy()

JSValue JS_NewArrayBufferCopy ( JSContext ctx,
const uint8_t buf,
size_t  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_DetachArrayBuffer()

void JS_DetachArrayBuffer ( JSContext ctx,
JSValueConst  obj 
)
+ Here is the call graph for this function:

◆ JS_GetArrayBuffer()

uint8_t* JS_GetArrayBuffer ( JSContext ctx,
size_t *  psize,
JSValueConst  obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetTypedArrayBuffer()

JSValue JS_GetTypedArrayBuffer ( JSContext ctx,
JSValueConst  obj,
size_t *  pbyte_offset,
size_t *  pbyte_length,
size_t *  pbytes_per_element 
)
+ Here is the call graph for this function:

◆ JS_SetSharedArrayBufferFunctions()

void JS_SetSharedArrayBufferFunctions ( JSRuntime rt,
const JSSharedArrayBufferFunctions sf 
)
+ Here is the caller graph for this function:

◆ JS_NewPromiseCapability()

JSValue JS_NewPromiseCapability ( JSContext ctx,
JSValue resolving_funcs 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetHostPromiseRejectionTracker()

void JS_SetHostPromiseRejectionTracker ( JSRuntime rt,
JSHostPromiseRejectionTracker cb,
void *  opaque 
)

◆ JS_SetInterruptHandler()

void JS_SetInterruptHandler ( JSRuntime rt,
JSInterruptHandler cb,
void *  opaque 
)
+ Here is the caller graph for this function:

◆ JS_SetCanBlock()

void JS_SetCanBlock ( JSRuntime rt,
JS_BOOL  can_block 
)

◆ JS_SetIsHTMLDDA()

void JS_SetIsHTMLDDA ( JSContext ctx,
JSValueConst  obj 
)

◆ JS_SetModuleLoaderFunc()

void JS_SetModuleLoaderFunc ( JSRuntime rt,
JSModuleNormalizeFunc module_normalize,
JSModuleLoaderFunc module_loader,
void *  opaque 
)
+ Here is the caller graph for this function:

◆ JS_GetImportMeta()

JSValue JS_GetImportMeta ( JSContext ctx,
JSModuleDef m 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_GetModuleName()

JSAtom JS_GetModuleName ( JSContext ctx,
JSModuleDef m 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_EnqueueJob()

int JS_EnqueueJob ( JSContext ctx,
JSJobFunc job_func,
int  argc,
JSValueConst argv 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsJobPending()

JS_BOOL JS_IsJobPending ( JSRuntime rt)
+ Here is the call graph for this function:

◆ JS_ExecutePendingJob()

int JS_ExecutePendingJob ( JSRuntime rt,
JSContext **  pctx 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_WriteObject()

uint8_t* JS_WriteObject ( JSContext ctx,
size_t *  psize,
JSValueConst  obj,
int  flags 
)
+ Here is the call graph for this function:

◆ JS_WriteObject2()

uint8_t* JS_WriteObject2 ( JSContext ctx,
size_t *  psize,
JSValueConst  obj,
int  flags,
uint8_t ***  psab_tab,
size_t *  psab_tab_len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ReadObject()

JSValue JS_ReadObject ( JSContext ctx,
const uint8_t buf,
size_t  buf_len,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_EvalFunction()

JSValue JS_EvalFunction ( JSContext ctx,
JSValue  fun_obj 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_ResolveModule()

int JS_ResolveModule ( JSContext ctx,
JSValueConst  obj 
)
+ Here is the call graph for this function:

◆ JS_GetScriptOrModuleName()

JSAtom JS_GetScriptOrModuleName ( JSContext ctx,
int  n_stack_levels 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_RunModule()

JSModuleDef* JS_RunModule ( JSContext ctx,
const char *  basename,
const char *  filename 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewCFunction2()

JSValue JS_NewCFunction2 ( JSContext ctx,
JSCFunction func,
const char *  name,
int  length,
JSCFunctionEnum  cproto,
int  magic 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewCFunctionData()

JSValue JS_NewCFunctionData ( JSContext ctx,
JSCFunctionData func,
int  length,
int  magic,
int  data_len,
JSValueConst data 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewCFunction()

static JSValue JS_NewCFunction ( JSContext ctx,
JSCFunction func,
const char *  name,
int  length 
)
static
+ Here is the caller graph for this function:

◆ JS_NewCFunctionMagic()

static JSValue JS_NewCFunctionMagic ( JSContext ctx,
JSCFunctionMagic func,
const char *  name,
int  length,
JSCFunctionEnum  cproto,
int  magic 
)
static
+ Here is the caller graph for this function:

◆ JS_SetConstructor()

void JS_SetConstructor ( JSContext ctx,
JSValueConst  func_obj,
JSValueConst  proto 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetPropertyFunctionList()

void JS_SetPropertyFunctionList ( JSContext ctx,
JSValueConst  obj,
const JSCFunctionListEntry tab,
int  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_NewCModule()

JSModuleDef* JS_NewCModule ( JSContext ctx,
const char *  name_str,
JSModuleInitFunc func 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddModuleExport()

int JS_AddModuleExport ( JSContext ctx,
JSModuleDef m,
const char *  name_str 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AddModuleExportList()

int JS_AddModuleExportList ( JSContext ctx,
JSModuleDef m,
const JSCFunctionListEntry tab,
int  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetModuleExport()

int JS_SetModuleExport ( JSContext ctx,
JSModuleDef m,
const char *  export_name,
JSValue  val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_SetModuleExportList()

int JS_SetModuleExportList ( JSContext ctx,
JSModuleDef m,
const JSCFunctionListEntry tab,
int  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_AtomIsArrayIndex()

int JS_AtomIsArrayIndex ( JSContext ctx,
uint32_t pval,
JSAtom  atom 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JS_IsArrayBuffer()

int JS_IsArrayBuffer ( JSContext ctx,
JSValueConst  val 
)

◆ JS_SwitchClassID()

int JS_SwitchClassID ( JSValue  obj,
JSClassID  class_id 
)

◆ JS_GetOpaque_Nocheck()

void* JS_GetOpaque_Nocheck ( JSValueConst  obj)

Variable Documentation

◆ fmt

JSValue const char JSValue const char JSValue const char JSValue const char JSValue const char* fmt