XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
quickjs.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for quickjs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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
 
struct  JSPrintValueOptions
 

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_LIMB_BITS   32
 
#define JS_SHORT_BIG_INT_BITS   JS_LIMB_BITS
 
#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)   ((int)(v).u.uint64)
 
#define JS_VALUE_GET_BOOL(v)   ((int)(v).u.uint64)
 
#define JS_VALUE_GET_FLOAT64(v)   ((v).u.float64)
 
#define JS_VALUE_GET_SHORT_BIG_INT(v)   ((v).u.short_big_int)
 
#define JS_VALUE_GET_PTR(v)   ((v).u.ptr)
 
#define JS_MKVAL(tag, val)   (JSValue){ (JSValueUnion){ .uint64 = (uint32_t)(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_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_EXOTIC   (1 << 16) /* internal use */
 
#define JS_DEFAULT_STACK_SIZE   (1024 * 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_COMPILE_ONLY   (1 << 5)
 
#define JS_EVAL_FLAG_BACKTRACE_BARRIER   (1 << 6)
 
#define JS_EVAL_FLAG_ASYNC   (1 << 7)
 
#define JS_ATOM_NULL   0
 
#define JS_CALL_FLAG_CONSTRUCTOR   (1 << 0)
 
#define JS_INVALID_CLASS_ID   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_STRIP_SOURCE   (1 << 0) /* strip source code */
 
#define JS_STRIP_DEBUG   (1 << 1) /* strip all debug info including source code */
 
#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_DEF_PROP_ATOM   10
 
#define JS_DEF_PROP_BOOL   11
 
#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_PROP_ATOM_DEF(name, val, prop_flags)   { name, prop_flags, JS_DEF_PROP_ATOM, 0, .u = { .i32 = val } }
 
#define JS_PROP_BOOL_DEF(name, val, prop_flags)   { name, prop_flags, JS_DEF_PROP_BOOL, 0, .u = { .i32 = val } }
 
#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 struct JSRuntime JSRuntime
 
typedef struct JSContext JSContext
 
typedef struct JSClass JSClass
 
typedef uint32_t JSClassID
 
typedef uint32_t JSAtom
 
typedef struct JSRefCountHeader JSRefCountHeader
 
typedef union JSValueUnion JSValueUnion
 
typedef struct JSValue JSValue
 
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 struct JSMallocState JSMallocState
 
typedef struct JSMallocFunctions JSMallocFunctions
 
typedef struct JSGCObjectHeader JSGCObjectHeader
 
typedef void JS_MarkFunc(JSRuntime *rt, JSGCObjectHeader *gp)
 
typedef struct JSMemoryUsage JSMemoryUsage
 
typedef struct JSPropertyEnum JSPropertyEnum
 
typedef struct JSPropertyDescriptor JSPropertyDescriptor
 
typedef struct JSClassExoticMethods JSClassExoticMethods
 
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 struct JSClassDef JSClassDef
 
typedef void JSFreeArrayBufferDataFunc(JSRuntime *rt, void *opaque, void *ptr)
 
typedef enum JSTypedArrayEnum JSTypedArrayEnum
 
typedef enum JSPromiseStateEnum JSPromiseStateEnum
 
typedef void JSHostPromiseRejectionTracker(JSContext *ctx, JSValueConst promise, JSValueConst reason, JS_BOOL is_handled, void *opaque)
 
typedef int JSInterruptHandler(JSRuntime *rt, void *opaque)
 
typedef struct JSModuleDef JSModuleDef
 
typedef char * JSModuleNormalizeFunc(JSContext *ctx, const char *module_base_name, const char *module_name, void *opaque)
 
typedef JSModuleDef * JSModuleLoaderFunc(JSContext *ctx, const char *module_name, void *opaque)
 
typedef JSModuleDef * JSModuleLoaderFunc2(JSContext *ctx, const char *module_name, void *opaque, JSValueConst attributes)
 
typedef int JSModuleCheckSupportedImportAttributes(JSContext *ctx, void *opaque, JSValueConst attributes)
 
typedef JSValue JSJobFunc(JSContext *ctx, int argc, JSValueConst *argv)
 
typedef enum JSCFunctionEnum JSCFunctionEnum
 
typedef union JSCFunctionType JSCFunctionType
 
typedef struct JSCFunctionListEntry JSCFunctionListEntry
 
typedef int JSModuleInitFunc(JSContext *ctx, JSModuleDef *m)
 
typedef void JSPrintValueWrite(void *opaque, const char *buf, size_t len)
 

Enumerations

enum  {
  JS_TAG_FIRST = -9 , JS_TAG_BIG_INT = -9 , JS_TAG_SYMBOL = -8 , JS_TAG_STRING = -7 ,
  JS_TAG_STRING_ROPE = -6 , 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_SHORT_BIG_INT = 7 ,
  JS_TAG_FLOAT64 = 8
}
 
enum  JSTypedArrayEnum {
  JS_TYPED_ARRAY_UINT8C = 0 , JS_TYPED_ARRAY_INT8 , JS_TYPED_ARRAY_UINT8 , JS_TYPED_ARRAY_INT16 ,
  JS_TYPED_ARRAY_UINT16 , JS_TYPED_ARRAY_INT32 , JS_TYPED_ARRAY_UINT32 , JS_TYPED_ARRAY_BIG_INT64 ,
  JS_TYPED_ARRAY_BIG_UINT64 , JS_TYPED_ARRAY_FLOAT16 , JS_TYPED_ARRAY_FLOAT32 , JS_TYPED_ARRAY_FLOAT64
}
 
enum  JSPromiseStateEnum { JS_PROMISE_PENDING , JS_PROMISE_FULFILLED , JS_PROMISE_REJECTED }
 
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

JSRuntime * JS_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)
 
JSRuntime * JS_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)
 
JSContext * JS_NewContext (JSRuntime *rt)
 
void JS_FreeContext (JSContext *s)
 
JSContext * JS_DupContext (JSContext *ctx)
 
void * JS_GetContextOpaque (JSContext *ctx)
 
void JS_SetContextOpaque (JSContext *ctx, void *opaque)
 
JSRuntime * JS_GetRuntime (JSContext *ctx)
 
void JS_SetClassProto (JSContext *ctx, JSClassID class_id, JSValue obj)
 
JSValue JS_GetClassProto (JSContext *ctx, JSClassID class_id)
 
JSContext * JS_NewContextRaw (JSRuntime *rt)
 
int JS_AddIntrinsicBaseObjects (JSContext *ctx)
 
int JS_AddIntrinsicDate (JSContext *ctx)
 
int JS_AddIntrinsicEval (JSContext *ctx)
 
int JS_AddIntrinsicStringNormalize (JSContext *ctx)
 
void JS_AddIntrinsicRegExpCompiler (JSContext *ctx)
 
int JS_AddIntrinsicRegExp (JSContext *ctx)
 
int JS_AddIntrinsicJSON (JSContext *ctx)
 
int JS_AddIntrinsicProxy (JSContext *ctx)
 
int JS_AddIntrinsicMapSet (JSContext *ctx)
 
int JS_AddIntrinsicTypedArrays (JSContext *ctx)
 
int JS_AddIntrinsicPromise (JSContext *ctx)
 
int JS_AddIntrinsicWeakRef (JSContext *ctx)
 
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_AtomToCStringLen (JSContext *ctx, size_t *plen, JSAtom atom)
 
JSAtom JS_ValueToAtom (JSContext *ctx, JSValueConst val)
 
JSClassID JS_NewClassID (JSClassID *pclass_id)
 
JSClassID JS_GetClassID (JSValue v)
 
int JS_NewClass (JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def)
 
int JS_IsRegisteredClass (JSRuntime *rt, JSClassID class_id)
 
JSValue JS_NewBigInt64 (JSContext *ctx, int64_t v)
 
JSValue JS_NewBigUint64 (JSContext *ctx, uint64_t v)
 
JSValue JS_Throw (JSContext *ctx, JSValue obj)
 
void JS_SetUncatchableException (JSContext *ctx, JS_BOOL flag)
 
JSValue JS_GetException (JSContext *ctx)
 
JS_BOOL JS_HasException (JSContext *ctx)
 
JS_BOOL JS_IsError (JSContext *ctx, JSValueConst val)
 
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)
 
void __JS_FreeValueRT (JSRuntime *rt, JSValue v)
 
JS_BOOL JS_StrictEq (JSContext *ctx, JSValueConst op1, JSValueConst op2)
 
JS_BOOL JS_SameValue (JSContext *ctx, JSValueConst op1, JSValueConst op2)
 
JS_BOOL JS_SameValueZero (JSContext *ctx, JSValueConst op1, JSValueConst op2)
 
int JS_ToBool (JSContext *ctx, JSValueConst val)
 
int JS_ToInt32 (JSContext *ctx, int32_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_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)
 
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_NewDate (JSContext *ctx, double epoch_ms)
 
JSValue JS_GetPropertyInternal (JSContext *ctx, JSValueConst obj, JSAtom prop, JSValueConst receiver, JS_BOOL throw_ref_error)
 
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 obj, JSAtom prop, JSValue val, JSValueConst this_obj, int flags)
 
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)
 
void JS_FreePropertyEnum (JSContext *ctx, JSPropertyEnum *tab, uint32_t len)
 
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)
 
void * JS_GetAnyOpaque (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_t * JS_GetArrayBuffer (JSContext *ctx, size_t *psize, JSValueConst obj)
 
JSValue JS_NewTypedArray (JSContext *ctx, int argc, JSValueConst *argv, JSTypedArrayEnum array_type)
 
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)
 
JSPromiseStateEnum JS_PromiseState (JSContext *ctx, JSValue promise)
 
JSValue JS_PromiseResult (JSContext *ctx, JSValue promise)
 
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_SetStripInfo (JSRuntime *rt, int flags)
 
int JS_GetStripInfo (JSRuntime *rt)
 
void JS_SetIsHTMLDDA (JSContext *ctx, JSValueConst obj)
 
void JS_SetModuleLoaderFunc (JSRuntime *rt, JSModuleNormalizeFunc *module_normalize, JSModuleLoaderFunc *module_loader, void *opaque)
 
void JS_SetModuleLoaderFunc2 (JSRuntime *rt, JSModuleNormalizeFunc *module_normalize, JSModuleLoaderFunc2 *module_loader, JSModuleCheckSupportedImportAttributes *module_check_attrs, void *opaque)
 
JSValue JS_GetImportMeta (JSContext *ctx, JSModuleDef *m)
 
JSAtom JS_GetModuleName (JSContext *ctx, JSModuleDef *m)
 
JSValue JS_GetModuleNamespace (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_t * JS_WriteObject (JSContext *ctx, size_t *psize, JSValueConst obj, int flags)
 
uint8_t * JS_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)
 
JSValue JS_LoadModule (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)
 
int JS_SetConstructor (JSContext *ctx, JSValueConst func_obj, JSValueConst proto)
 
int JS_SetPropertyFunctionList (JSContext *ctx, JSValueConst obj, const JSCFunctionListEntry *tab, int len)
 
JSModuleDef * JS_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_SetModulePrivateValue (JSContext *ctx, JSModuleDef *m, JSValue val)
 
JSValue JS_GetModulePrivateValue (JSContext *ctx, JSModuleDef *m)
 
void JS_PrintValueSetDefaultOptions (JSPrintValueOptions *options)
 
void JS_PrintValueRT (JSRuntime *rt, JSPrintValueWrite *write_func, void *write_opaque, JSValueConst val, const JSPrintValueOptions *options)
 
void JS_PrintValue (JSContext *ctx, JSPrintValueWrite *write_func, void *write_opaque, JSValueConst val, const JSPrintValueOptions *options)
 

Variables

JSValue const char * fmt
 

Macro Definition Documentation

◆ __js_printf_like

#define __js_printf_like (   a,
  b 
)

◆ 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 } } }

◆ 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_ATOM_NULL

#define JS_ATOM_NULL   0

◆ JS_BOOL

#define JS_BOOL   int

◆ JS_CALL_FLAG_CONSTRUCTOR

#define JS_CALL_FLAG_CONSTRUCTOR   (1 << 0)

◆ 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_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_DEF_ALIAS

#define JS_DEF_ALIAS   9

◆ 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_OBJECT

#define JS_DEF_OBJECT   8

◆ JS_DEF_PROP_ATOM

#define JS_DEF_PROP_ATOM   10

◆ JS_DEF_PROP_BOOL

#define JS_DEF_PROP_BOOL   11

◆ JS_DEF_PROP_DOUBLE

#define JS_DEF_PROP_DOUBLE   6

◆ JS_DEF_PROP_INT32

#define JS_DEF_PROP_INT32   4

◆ JS_DEF_PROP_INT64

#define JS_DEF_PROP_INT64   5

◆ JS_DEF_PROP_STRING

#define JS_DEF_PROP_STRING   3

◆ JS_DEF_PROP_UNDEFINED

#define JS_DEF_PROP_UNDEFINED   7

◆ JS_DEFAULT_STACK_SIZE

#define JS_DEFAULT_STACK_SIZE   (1024 * 1024)

◆ JS_EVAL_FLAG_ASYNC

#define JS_EVAL_FLAG_ASYNC   (1 << 7)

◆ JS_EVAL_FLAG_BACKTRACE_BARRIER

#define JS_EVAL_FLAG_BACKTRACE_BARRIER   (1 << 6)

◆ JS_EVAL_FLAG_COMPILE_ONLY

#define JS_EVAL_FLAG_COMPILE_ONLY   (1 << 5)

◆ JS_EVAL_FLAG_STRICT

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

◆ JS_EVAL_TYPE_DIRECT

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

◆ JS_EVAL_TYPE_GLOBAL

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

◆ 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_TYPE_MODULE

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

◆ JS_EXCEPTION

#define JS_EXCEPTION   JS_MKVAL(JS_TAG_EXCEPTION, 0)

◆ JS_FALSE

#define JS_FALSE   JS_MKVAL(JS_TAG_BOOL, 0)

◆ JS_FLOAT64_NAN

#define JS_FLOAT64_NAN   NAN

◆ js_force_inline

#define js_force_inline   inline

◆ JS_GPN_ENUM_ONLY

#define JS_GPN_ENUM_ONLY   (1 << 4)

◆ JS_GPN_PRIVATE_MASK

#define JS_GPN_PRIVATE_MASK   (1 << 2)

◆ JS_GPN_SET_ENUM

#define JS_GPN_SET_ENUM   (1 << 5)

◆ JS_GPN_STRING_MASK

#define JS_GPN_STRING_MASK   (1 << 0)

◆ JS_GPN_SYMBOL_MASK

#define JS_GPN_SYMBOL_MASK   (1 << 1)

◆ JS_INVALID_CLASS_ID

#define JS_INVALID_CLASS_ID   0

◆ 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_likely

#define js_likely (   x)    (x)

◆ JS_LIMB_BITS

#define JS_LIMB_BITS   32

◆ JS_MKPTR

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

◆ JS_MKVAL

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

◆ JS_NAN

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

◆ JS_NULL

#define JS_NULL   JS_MKVAL(JS_TAG_NULL, 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_PARSE_JSON_EXT

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

◆ JS_PROP_ATOM_DEF

#define JS_PROP_ATOM_DEF (   name,
  val,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_ATOM, 0, .u = { .i32 = val } }

◆ JS_PROP_AUTOINIT

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

◆ JS_PROP_BOOL_DEF

#define JS_PROP_BOOL_DEF (   name,
  val,
  prop_flags 
)    { name, prop_flags, JS_DEF_PROP_BOOL, 0, .u = { .i32 = val } }

◆ JS_PROP_C_W_E

#define JS_PROP_C_W_E   (JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)

◆ JS_PROP_CONFIGURABLE

#define JS_PROP_CONFIGURABLE   (1 << 0)

◆ 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_ENUMERABLE

#define JS_PROP_ENUMERABLE   (1 << 2)

◆ JS_PROP_GETSET

#define JS_PROP_GETSET   (1 << 4)

◆ JS_PROP_HAS_CONFIGURABLE

#define JS_PROP_HAS_CONFIGURABLE   (1 << 8)

◆ 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_SHIFT

#define JS_PROP_HAS_SHIFT   8

◆ JS_PROP_HAS_VALUE

#define JS_PROP_HAS_VALUE   (1 << 13)

◆ JS_PROP_HAS_WRITABLE

#define JS_PROP_HAS_WRITABLE   (1 << 9)

◆ 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_LENGTH

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

◆ JS_PROP_NO_EXOTIC

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

◆ JS_PROP_NORMAL

#define JS_PROP_NORMAL   (0 << 4)

◆ 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_THROW

#define JS_PROP_THROW   (1 << 14)

◆ JS_PROP_THROW_STRICT

#define JS_PROP_THROW_STRICT   (1 << 15)

◆ JS_PROP_TMASK

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

◆ JS_PROP_UNDEFINED_DEF

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

◆ JS_PROP_VARREF

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

◆ JS_PROP_WRITABLE

#define JS_PROP_WRITABLE   (1 << 1)

◆ JS_PTR64

#define JS_PTR64

◆ JS_PTR64_DEF

#define JS_PTR64_DEF (   a)    a

◆ JS_READ_OBJ_BYTECODE

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

◆ JS_READ_OBJ_REFERENCE

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

◆ 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_SHORT_BIG_INT_BITS

#define JS_SHORT_BIG_INT_BITS   JS_LIMB_BITS

◆ JS_STRIP_DEBUG

#define JS_STRIP_DEBUG   (1 << 1) /* strip all debug info including source code */

◆ JS_STRIP_SOURCE

#define JS_STRIP_SOURCE   (1 << 0) /* strip source code */

◆ JS_TAG_IS_FLOAT64

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

◆ JS_TRUE

#define JS_TRUE   JS_MKVAL(JS_TAG_BOOL, 1)

◆ JS_UNDEFINED

#define JS_UNDEFINED   JS_MKVAL(JS_TAG_UNDEFINED, 0)

◆ JS_UNINITIALIZED

#define JS_UNINITIALIZED   JS_MKVAL(JS_TAG_UNINITIALIZED, 0)

◆ js_unlikely

#define js_unlikely (   x)    (x)

◆ JS_VALUE_GET_BOOL

#define JS_VALUE_GET_BOOL (   v)    ((int)(v).u.uint64)

◆ JS_VALUE_GET_FLOAT64

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

◆ JS_VALUE_GET_INT

#define JS_VALUE_GET_INT (   v)    ((int)(v).u.uint64)

◆ JS_VALUE_GET_NORM_TAG

#define JS_VALUE_GET_NORM_TAG (   v)    JS_VALUE_GET_TAG(v)

◆ JS_VALUE_GET_PTR

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

◆ JS_VALUE_GET_SHORT_BIG_INT

#define JS_VALUE_GET_SHORT_BIG_INT (   v)    ((v).u.short_big_int)

◆ JS_VALUE_GET_TAG

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

◆ JS_VALUE_HAS_REF_COUNT

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

◆ 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_IS_BOTH_INT

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

◆ JS_WRITE_OBJ_BSWAP

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

◆ JS_WRITE_OBJ_BYTECODE

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

◆ JS_WRITE_OBJ_REFERENCE

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

◆ JS_WRITE_OBJ_SAB

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

◆ JSValueConst

#define JSValueConst   JSValue

Typedef Documentation

◆ JS_MarkFunc

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

◆ JSAtom

typedef uint32_t JSAtom

◆ JSCFunction

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

◆ JSCFunctionData

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

◆ JSCFunctionEnum

◆ JSCFunctionListEntry

◆ JSCFunctionMagic

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

◆ JSCFunctionType

◆ JSClass

typedef struct JSClass JSClass

◆ JSClassCall

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

◆ JSClassDef

typedef struct JSClassDef JSClassDef

◆ JSClassExoticMethods

◆ JSClassFinalizer

typedef void JSClassFinalizer(JSRuntime *rt, JSValue val)

◆ JSClassGCMark

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

◆ JSClassID

◆ JSContext

typedef struct JSContext JSContext

◆ JSFreeArrayBufferDataFunc

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

◆ JSGCObjectHeader

◆ JSHostPromiseRejectionTracker

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

◆ JSInterruptHandler

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

◆ JSJobFunc

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

◆ JSMallocFunctions

◆ JSMallocState

typedef struct JSMallocState JSMallocState

◆ JSMemoryUsage

typedef struct JSMemoryUsage JSMemoryUsage

◆ JSModuleCheckSupportedImportAttributes

typedef int JSModuleCheckSupportedImportAttributes(JSContext *ctx, void *opaque, JSValueConst attributes)

◆ JSModuleDef

typedef struct JSModuleDef JSModuleDef

◆ JSModuleInitFunc

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

◆ JSModuleLoaderFunc

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

◆ JSModuleLoaderFunc2

typedef JSModuleDef * JSModuleLoaderFunc2(JSContext *ctx, const char *module_name, void *opaque, JSValueConst attributes)

◆ JSModuleNormalizeFunc

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

◆ JSPrintValueWrite

typedef void JSPrintValueWrite(void *opaque, const char *buf, size_t len)

◆ JSPromiseStateEnum

◆ JSPropertyDescriptor

◆ JSPropertyEnum

◆ JSRefCountHeader

◆ JSRuntime

typedef struct JSRuntime JSRuntime

◆ JSTypedArrayEnum

◆ JSValue

typedef struct JSValue JSValue

◆ JSValueUnion

typedef union JSValueUnion JSValueUnion

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
JS_TAG_FIRST 
JS_TAG_BIG_INT 
JS_TAG_SYMBOL 
JS_TAG_STRING 
JS_TAG_STRING_ROPE 
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_SHORT_BIG_INT 
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 

◆ JSPromiseStateEnum

Enumerator
JS_PROMISE_PENDING 
JS_PROMISE_FULFILLED 
JS_PROMISE_REJECTED 

◆ JSTypedArrayEnum

Enumerator
JS_TYPED_ARRAY_UINT8C 
JS_TYPED_ARRAY_INT8 
JS_TYPED_ARRAY_UINT8 
JS_TYPED_ARRAY_INT16 
JS_TYPED_ARRAY_UINT16 
JS_TYPED_ARRAY_INT32 
JS_TYPED_ARRAY_UINT32 
JS_TYPED_ARRAY_BIG_INT64 
JS_TYPED_ARRAY_BIG_UINT64 
JS_TYPED_ARRAY_FLOAT16 
JS_TYPED_ARRAY_FLOAT32 
JS_TYPED_ARRAY_FLOAT64 

Function Documentation

◆ __JS_FreeValue()

void __JS_FreeValue ( JSContext *  ctx,
JSValue  v 
)

◆ __JS_FreeValueRT()

void __JS_FreeValueRT ( JSRuntime *  rt,
JSValue  v 
)

◆ __js_printf_like()

JSValue const char JSValue const char JSValue const char JSValue const char JSValue __js_printf_like ( 2  ,
3   
)

◆ JS_AddIntrinsicBaseObjects()

int JS_AddIntrinsicBaseObjects ( JSContext *  ctx)

◆ JS_AddIntrinsicDate()

int JS_AddIntrinsicDate ( JSContext *  ctx)

◆ JS_AddIntrinsicEval()

int JS_AddIntrinsicEval ( JSContext *  ctx)

◆ JS_AddIntrinsicJSON()

int JS_AddIntrinsicJSON ( JSContext *  ctx)

◆ JS_AddIntrinsicMapSet()

int JS_AddIntrinsicMapSet ( JSContext *  ctx)

◆ JS_AddIntrinsicPromise()

int JS_AddIntrinsicPromise ( JSContext *  ctx)

◆ JS_AddIntrinsicProxy()

int JS_AddIntrinsicProxy ( JSContext *  ctx)

◆ JS_AddIntrinsicRegExp()

int JS_AddIntrinsicRegExp ( JSContext *  ctx)

◆ JS_AddIntrinsicRegExpCompiler()

void JS_AddIntrinsicRegExpCompiler ( JSContext *  ctx)

◆ JS_AddIntrinsicStringNormalize()

int JS_AddIntrinsicStringNormalize ( JSContext *  ctx)

◆ JS_AddIntrinsicTypedArrays()

int JS_AddIntrinsicTypedArrays ( JSContext *  ctx)

◆ JS_AddIntrinsicWeakRef()

int JS_AddIntrinsicWeakRef ( JSContext *  ctx)

◆ JS_AddModuleExport()

int JS_AddModuleExport ( JSContext *  ctx,
JSModuleDef *  m,
const char *  name_str 
)

◆ JS_AddModuleExportList()

int JS_AddModuleExportList ( JSContext *  ctx,
JSModuleDef *  m,
const JSCFunctionListEntry *  tab,
int  len 
)

◆ JS_AtomToCStringLen()

const char * JS_AtomToCStringLen ( JSContext *  ctx,
size_t *  plen,
JSAtom  atom 
)

◆ JS_AtomToString()

JSValue JS_AtomToString ( JSContext *  ctx,
JSAtom  atom 
)

◆ JS_AtomToValue()

JSValue JS_AtomToValue ( JSContext *  ctx,
JSAtom  atom 
)

◆ JS_Call()

JSValue JS_Call ( JSContext *  ctx,
JSValueConst  func_obj,
JSValueConst  this_obj,
int  argc,
JSValueConst *  argv 
)

◆ JS_CallConstructor()

JSValue JS_CallConstructor ( JSContext *  ctx,
JSValueConst  func_obj,
int  argc,
JSValueConst *  argv 
)

◆ JS_CallConstructor2()

JSValue JS_CallConstructor2 ( JSContext *  ctx,
JSValueConst  func_obj,
JSValueConst  new_target,
int  argc,
JSValueConst *  argv 
)

◆ JS_ComputeMemoryUsage()

void JS_ComputeMemoryUsage ( JSRuntime *  rt,
JSMemoryUsage *  s 
)

◆ JS_DefineProperty()

int JS_DefineProperty ( JSContext *  ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValueConst  val,
JSValueConst  getter,
JSValueConst  setter,
int  flags 
)

◆ JS_DefinePropertyGetSet()

int JS_DefinePropertyGetSet ( JSContext *  ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValue  getter,
JSValue  setter,
int  flags 
)

◆ JS_DefinePropertyValue()

int JS_DefinePropertyValue ( JSContext *  ctx,
JSValueConst  this_obj,
JSAtom  prop,
JSValue  val,
int  flags 
)

◆ JS_DefinePropertyValueStr()

int JS_DefinePropertyValueStr ( JSContext *  ctx,
JSValueConst  this_obj,
const char *  prop,
JSValue  val,
int  flags 
)

◆ JS_DefinePropertyValueUint32()

int JS_DefinePropertyValueUint32 ( JSContext *  ctx,
JSValueConst  this_obj,
uint32_t  idx,
JSValue  val,
int  flags 
)

◆ JS_DeleteProperty()

int JS_DeleteProperty ( JSContext *  ctx,
JSValueConst  obj,
JSAtom  prop,
int  flags 
)

◆ JS_DetachArrayBuffer()

void JS_DetachArrayBuffer ( JSContext *  ctx,
JSValueConst  obj 
)

◆ JS_DetectModule()

JS_BOOL JS_DetectModule ( const char *  input,
size_t  input_len 
)

◆ JS_DumpMemoryUsage()

void JS_DumpMemoryUsage ( FILE *  fp,
const JSMemoryUsage *  s,
JSRuntime *  rt 
)

◆ JS_DupAtom()

JSAtom JS_DupAtom ( JSContext *  ctx,
JSAtom  v 
)

◆ JS_DupContext()

JSContext * JS_DupContext ( JSContext *  ctx)

◆ JS_EnqueueJob()

int JS_EnqueueJob ( JSContext *  ctx,
JSJobFunc *  job_func,
int  argc,
JSValueConst *  argv 
)

◆ JS_Eval()

JSValue JS_Eval ( JSContext *  ctx,
const char *  input,
size_t  input_len,
const char *  filename,
int  eval_flags 
)

◆ JS_EvalFunction()

JSValue JS_EvalFunction ( JSContext *  ctx,
JSValue  fun_obj 
)

◆ JS_EvalThis()

JSValue JS_EvalThis ( JSContext *  ctx,
JSValueConst  this_obj,
const char *  input,
size_t  input_len,
const char *  filename,
int  eval_flags 
)

◆ JS_ExecutePendingJob()

int JS_ExecutePendingJob ( JSRuntime *  rt,
JSContext **  pctx 
)

◆ js_free()

void js_free ( JSContext *  ctx,
void *  ptr 
)

◆ js_free_rt()

void js_free_rt ( JSRuntime *  rt,
void *  ptr 
)

◆ JS_FreeAtom()

void JS_FreeAtom ( JSContext *  ctx,
JSAtom  v 
)

◆ JS_FreeAtomRT()

void JS_FreeAtomRT ( JSRuntime *  rt,
JSAtom  v 
)

◆ JS_FreeContext()

void JS_FreeContext ( JSContext *  s)

◆ JS_FreeCString()

void JS_FreeCString ( JSContext *  ctx,
const char *  ptr 
)

◆ JS_FreePropertyEnum()

void JS_FreePropertyEnum ( JSContext *  ctx,
JSPropertyEnum *  tab,
uint32_t  len 
)

◆ JS_FreeRuntime()

void JS_FreeRuntime ( JSRuntime *  rt)

◆ JS_GetAnyOpaque()

void * JS_GetAnyOpaque ( JSValueConst  obj,
JSClassID *  class_id 
)

◆ JS_GetArrayBuffer()

uint8_t * JS_GetArrayBuffer ( JSContext *  ctx,
size_t *  psize,
JSValueConst  obj 
)

◆ JS_GetClassID()

JSClassID JS_GetClassID ( JSValue  v)

◆ JS_GetClassProto()

JSValue JS_GetClassProto ( JSContext *  ctx,
JSClassID  class_id 
)

◆ JS_GetContextOpaque()

void * JS_GetContextOpaque ( JSContext *  ctx)

◆ JS_GetException()

JSValue JS_GetException ( JSContext *  ctx)

◆ JS_GetGlobalObject()

JSValue JS_GetGlobalObject ( JSContext *  ctx)

◆ JS_GetImportMeta()

JSValue JS_GetImportMeta ( JSContext *  ctx,
JSModuleDef *  m 
)

◆ JS_GetModuleName()

JSAtom JS_GetModuleName ( JSContext *  ctx,
JSModuleDef *  m 
)

◆ JS_GetModuleNamespace()

JSValue JS_GetModuleNamespace ( JSContext *  ctx,
JSModuleDef *  m 
)

◆ JS_GetModulePrivateValue()

JSValue JS_GetModulePrivateValue ( JSContext *  ctx,
JSModuleDef *  m 
)

◆ JS_GetOpaque()

void * JS_GetOpaque ( JSValueConst  obj,
JSClassID  class_id 
)

◆ JS_GetOpaque2()

void * JS_GetOpaque2 ( JSContext *  ctx,
JSValueConst  obj,
JSClassID  class_id 
)

◆ JS_GetOwnProperty()

int JS_GetOwnProperty ( JSContext *  ctx,
JSPropertyDescriptor *  desc,
JSValueConst  obj,
JSAtom  prop 
)

◆ JS_GetOwnPropertyNames()

int JS_GetOwnPropertyNames ( JSContext *  ctx,
JSPropertyEnum **  ptab,
uint32_t *  plen,
JSValueConst  obj,
int  flags 
)

◆ JS_GetPropertyInternal()

JSValue JS_GetPropertyInternal ( JSContext *  ctx,
JSValueConst  obj,
JSAtom  prop,
JSValueConst  receiver,
JS_BOOL  throw_ref_error 
)

◆ JS_GetPropertyStr()

JSValue JS_GetPropertyStr ( JSContext *  ctx,
JSValueConst  this_obj,
const char *  prop 
)

◆ JS_GetPropertyUint32()

JSValue JS_GetPropertyUint32 ( JSContext *  ctx,
JSValueConst  this_obj,
uint32_t  idx 
)

◆ JS_GetPrototype()

JSValue JS_GetPrototype ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_GetRuntime()

JSRuntime * JS_GetRuntime ( JSContext *  ctx)

◆ JS_GetRuntimeOpaque()

void * JS_GetRuntimeOpaque ( JSRuntime *  rt)

◆ JS_GetScriptOrModuleName()

JSAtom JS_GetScriptOrModuleName ( JSContext *  ctx,
int  n_stack_levels 
)

◆ JS_GetStripInfo()

int JS_GetStripInfo ( JSRuntime *  rt)

◆ JS_GetTypedArrayBuffer()

JSValue JS_GetTypedArrayBuffer ( JSContext *  ctx,
JSValueConst  obj,
size_t *  pbyte_offset,
size_t *  pbyte_length,
size_t *  pbytes_per_element 
)

◆ JS_HasException()

JS_BOOL JS_HasException ( JSContext *  ctx)

◆ JS_HasProperty()

int JS_HasProperty ( JSContext *  ctx,
JSValueConst  this_obj,
JSAtom  prop 
)

◆ JS_Invoke()

JSValue JS_Invoke ( JSContext *  ctx,
JSValueConst  this_val,
JSAtom  atom,
int  argc,
JSValueConst *  argv 
)

◆ JS_IsArray()

int JS_IsArray ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_IsConstructor()

JS_BOOL JS_IsConstructor ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_IsError()

JS_BOOL JS_IsError ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_IsExtensible()

int JS_IsExtensible ( JSContext *  ctx,
JSValueConst  obj 
)

◆ JS_IsFunction()

JS_BOOL JS_IsFunction ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_IsInstanceOf()

int JS_IsInstanceOf ( JSContext *  ctx,
JSValueConst  val,
JSValueConst  obj 
)

◆ JS_IsJobPending()

JS_BOOL JS_IsJobPending ( JSRuntime *  rt)

◆ JS_IsLiveObject()

JS_BOOL JS_IsLiveObject ( JSRuntime *  rt,
JSValueConst  obj 
)

◆ JS_IsRegisteredClass()

int JS_IsRegisteredClass ( JSRuntime *  rt,
JSClassID  class_id 
)

◆ JS_JSONStringify()

JSValue JS_JSONStringify ( JSContext *  ctx,
JSValueConst  obj,
JSValueConst  replacer,
JSValueConst  space0 
)

◆ JS_LoadModule()

JSValue JS_LoadModule ( JSContext *  ctx,
const char *  basename,
const char *  filename 
)

◆ js_malloc()

void * js_malloc ( JSContext *  ctx,
size_t  size 
)

◆ js_malloc_rt()

void * js_malloc_rt ( JSRuntime *  rt,
size_t  size 
)

◆ js_malloc_usable_size()

size_t js_malloc_usable_size ( JSContext *  ctx,
const void *  ptr 
)

◆ js_malloc_usable_size_rt()

size_t js_malloc_usable_size_rt ( JSRuntime *  rt,
const void *  ptr 
)

◆ js_mallocz()

void * js_mallocz ( JSContext *  ctx,
size_t  size 
)

◆ js_mallocz_rt()

void * js_mallocz_rt ( JSRuntime *  rt,
size_t  size 
)

◆ JS_MarkValue()

void JS_MarkValue ( JSRuntime *  rt,
JSValueConst  val,
JS_MarkFunc *  mark_func 
)

◆ JS_NewArray()

JSValue JS_NewArray ( JSContext *  ctx)

◆ 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 
)

◆ JS_NewAtom()

JSAtom JS_NewAtom ( JSContext *  ctx,
const char *  str 
)

◆ JS_NewAtomLen()

JSAtom JS_NewAtomLen ( JSContext *  ctx,
const char *  str,
size_t  len 
)

◆ JS_NewAtomString()

JSValue JS_NewAtomString ( JSContext *  ctx,
const char *  str 
)

◆ JS_NewAtomUInt32()

JSAtom JS_NewAtomUInt32 ( JSContext *  ctx,
uint32_t  n 
)

◆ JS_NewBigInt64()

JSValue JS_NewBigInt64 ( JSContext *  ctx,
int64_t  v 
)

◆ JS_NewBigUint64()

JSValue JS_NewBigUint64 ( JSContext *  ctx,
uint64_t  v 
)

◆ JS_NewCFunction2()

JSValue JS_NewCFunction2 ( JSContext *  ctx,
JSCFunction *  func,
const char *  name,
int  length,
JSCFunctionEnum  cproto,
int  magic 
)

◆ JS_NewCFunctionData()

JSValue JS_NewCFunctionData ( JSContext *  ctx,
JSCFunctionData *  func,
int  length,
int  magic,
int  data_len,
JSValueConst *  data 
)

◆ JS_NewClass()

int JS_NewClass ( JSRuntime *  rt,
JSClassID  class_id,
const JSClassDef *  class_def 
)

◆ JS_NewClassID()

JSClassID JS_NewClassID ( JSClassID *  pclass_id)

◆ JS_NewCModule()

JSModuleDef * JS_NewCModule ( JSContext *  ctx,
const char *  name_str,
JSModuleInitFunc *  func 
)

◆ JS_NewContext()

JSContext * JS_NewContext ( JSRuntime *  rt)

◆ JS_NewContextRaw()

JSContext * JS_NewContextRaw ( JSRuntime *  rt)

◆ JS_NewDate()

JSValue JS_NewDate ( JSContext *  ctx,
double  epoch_ms 
)

◆ JS_NewError()

JSValue JS_NewError ( JSContext *  ctx)

◆ JS_NewObject()

JSValue JS_NewObject ( JSContext *  ctx)

◆ JS_NewObjectClass()

JSValue JS_NewObjectClass ( JSContext *  ctx,
int  class_id 
)

◆ JS_NewObjectProto()

JSValue JS_NewObjectProto ( JSContext *  ctx,
JSValueConst  proto 
)

◆ JS_NewObjectProtoClass()

JSValue JS_NewObjectProtoClass ( JSContext *  ctx,
JSValueConst  proto,
JSClassID  class_id 
)

◆ JS_NewPromiseCapability()

JSValue JS_NewPromiseCapability ( JSContext *  ctx,
JSValue *  resolving_funcs 
)

◆ JS_NewRuntime()

JSRuntime * JS_NewRuntime ( void  )

◆ JS_NewRuntime2()

JSRuntime * JS_NewRuntime2 ( const JSMallocFunctions *  mf,
void *  opaque 
)

◆ JS_NewStringLen()

JSValue JS_NewStringLen ( JSContext *  ctx,
const char *  str1,
size_t  len1 
)

◆ JS_NewTypedArray()

JSValue JS_NewTypedArray ( JSContext *  ctx,
int  argc,
JSValueConst *  argv,
JSTypedArrayEnum  array_type 
)

◆ JS_ParseJSON()

JSValue JS_ParseJSON ( JSContext *  ctx,
const char *  buf,
size_t  buf_len,
const char *  filename 
)

◆ JS_ParseJSON2()

JSValue JS_ParseJSON2 ( JSContext *  ctx,
const char *  buf,
size_t  buf_len,
const char *  filename,
int  flags 
)

◆ JS_PreventExtensions()

int JS_PreventExtensions ( JSContext *  ctx,
JSValueConst  obj 
)

◆ JS_PrintValue()

void JS_PrintValue ( JSContext *  ctx,
JSPrintValueWrite *  write_func,
void *  write_opaque,
JSValueConst  val,
const JSPrintValueOptions *  options 
)

◆ JS_PrintValueRT()

void JS_PrintValueRT ( JSRuntime *  rt,
JSPrintValueWrite *  write_func,
void *  write_opaque,
JSValueConst  val,
const JSPrintValueOptions *  options 
)

◆ JS_PrintValueSetDefaultOptions()

void JS_PrintValueSetDefaultOptions ( JSPrintValueOptions *  options)

◆ JS_PromiseResult()

JSValue JS_PromiseResult ( JSContext *  ctx,
JSValue  promise 
)

◆ JS_PromiseState()

JSPromiseStateEnum JS_PromiseState ( JSContext *  ctx,
JSValue  promise 
)

◆ JS_ReadObject()

JSValue JS_ReadObject ( JSContext *  ctx,
const uint8_t *  buf,
size_t  buf_len,
int  flags 
)

◆ js_realloc()

void * js_realloc ( JSContext *  ctx,
void *  ptr,
size_t  size 
)

◆ js_realloc2()

void * js_realloc2 ( JSContext *  ctx,
void *  ptr,
size_t  size,
size_t *  pslack 
)

◆ js_realloc_rt()

void * js_realloc_rt ( JSRuntime *  rt,
void *  ptr,
size_t  size 
)

◆ JS_ResolveModule()

int JS_ResolveModule ( JSContext *  ctx,
JSValueConst  obj 
)

◆ JS_RunGC()

void JS_RunGC ( JSRuntime *  rt)

◆ JS_SameValue()

JS_BOOL JS_SameValue ( JSContext *  ctx,
JSValueConst  op1,
JSValueConst  op2 
)

◆ JS_SameValueZero()

JS_BOOL JS_SameValueZero ( JSContext *  ctx,
JSValueConst  op1,
JSValueConst  op2 
)

◆ JS_SetCanBlock()

void JS_SetCanBlock ( JSRuntime *  rt,
JS_BOOL  can_block 
)

◆ JS_SetClassProto()

void JS_SetClassProto ( JSContext *  ctx,
JSClassID  class_id,
JSValue  obj 
)

◆ JS_SetConstructor()

int JS_SetConstructor ( JSContext *  ctx,
JSValueConst  func_obj,
JSValueConst  proto 
)

◆ JS_SetConstructorBit()

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

◆ JS_SetContextOpaque()

void JS_SetContextOpaque ( JSContext *  ctx,
void *  opaque 
)

◆ JS_SetGCThreshold()

void JS_SetGCThreshold ( JSRuntime *  rt,
size_t  gc_threshold 
)

◆ JS_SetHostPromiseRejectionTracker()

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

◆ JS_SetInterruptHandler()

void JS_SetInterruptHandler ( JSRuntime *  rt,
JSInterruptHandler *  cb,
void *  opaque 
)

◆ JS_SetIsHTMLDDA()

void JS_SetIsHTMLDDA ( JSContext *  ctx,
JSValueConst  obj 
)

◆ JS_SetMaxStackSize()

void JS_SetMaxStackSize ( JSRuntime *  rt,
size_t  stack_size 
)

◆ JS_SetMemoryLimit()

void JS_SetMemoryLimit ( JSRuntime *  rt,
size_t  limit 
)

◆ JS_SetModuleExport()

int JS_SetModuleExport ( JSContext *  ctx,
JSModuleDef *  m,
const char *  export_name,
JSValue  val 
)

◆ JS_SetModuleExportList()

int JS_SetModuleExportList ( JSContext *  ctx,
JSModuleDef *  m,
const JSCFunctionListEntry *  tab,
int  len 
)

◆ JS_SetModuleLoaderFunc()

void JS_SetModuleLoaderFunc ( JSRuntime *  rt,
JSModuleNormalizeFunc *  module_normalize,
JSModuleLoaderFunc *  module_loader,
void *  opaque 
)

◆ JS_SetModuleLoaderFunc2()

void JS_SetModuleLoaderFunc2 ( JSRuntime *  rt,
JSModuleNormalizeFunc *  module_normalize,
JSModuleLoaderFunc2 *  module_loader,
JSModuleCheckSupportedImportAttributes *  module_check_attrs,
void *  opaque 
)

◆ JS_SetModulePrivateValue()

int JS_SetModulePrivateValue ( JSContext *  ctx,
JSModuleDef *  m,
JSValue  val 
)

◆ JS_SetOpaque()

void JS_SetOpaque ( JSValue  obj,
void *  opaque 
)

◆ JS_SetPropertyFunctionList()

int JS_SetPropertyFunctionList ( JSContext *  ctx,
JSValueConst  obj,
const JSCFunctionListEntry *  tab,
int  len 
)

◆ JS_SetPropertyInt64()

int JS_SetPropertyInt64 ( JSContext *  ctx,
JSValueConst  this_obj,
int64_t  idx,
JSValue  val 
)

◆ JS_SetPropertyInternal()

int JS_SetPropertyInternal ( JSContext *  ctx,
JSValueConst  obj,
JSAtom  prop,
JSValue  val,
JSValueConst  this_obj,
int  flags 
)

◆ JS_SetPropertyStr()

int JS_SetPropertyStr ( JSContext *  ctx,
JSValueConst  this_obj,
const char *  prop,
JSValue  val 
)

◆ JS_SetPropertyUint32()

int JS_SetPropertyUint32 ( JSContext *  ctx,
JSValueConst  this_obj,
uint32_t  idx,
JSValue  val 
)

◆ JS_SetPrototype()

int JS_SetPrototype ( JSContext *  ctx,
JSValueConst  obj,
JSValueConst  proto_val 
)

◆ JS_SetRuntimeInfo()

void JS_SetRuntimeInfo ( JSRuntime *  rt,
const char *  info 
)

◆ JS_SetRuntimeOpaque()

void JS_SetRuntimeOpaque ( JSRuntime *  rt,
void *  opaque 
)

◆ JS_SetSharedArrayBufferFunctions()

void JS_SetSharedArrayBufferFunctions ( JSRuntime *  rt,
const JSSharedArrayBufferFunctions *  sf 
)

◆ JS_SetStripInfo()

void JS_SetStripInfo ( JSRuntime *  rt,
int  flags 
)

◆ JS_SetUncatchableException()

void JS_SetUncatchableException ( JSContext *  ctx,
JS_BOOL  flag 
)

◆ js_strdup()

char * js_strdup ( JSContext *  ctx,
const char *  str 
)

◆ JS_StrictEq()

JS_BOOL JS_StrictEq ( JSContext *  ctx,
JSValueConst  op1,
JSValueConst  op2 
)

◆ js_string_codePointRange()

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

◆ js_strndup()

char * js_strndup ( JSContext *  ctx,
const char *  s,
size_t  n 
)

◆ JS_Throw()

JSValue JS_Throw ( JSContext *  ctx,
JSValue  obj 
)

◆ JS_ThrowOutOfMemory()

JSValue JS_ThrowOutOfMemory ( JSContext *  ctx)

◆ JS_ToBigInt64()

int JS_ToBigInt64 ( JSContext *  ctx,
int64_t *  pres,
JSValueConst  val 
)

◆ JS_ToBool()

int JS_ToBool ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_ToCStringLen2()

const char * JS_ToCStringLen2 ( JSContext *  ctx,
size_t *  plen,
JSValueConst  val1,
JS_BOOL  cesu8 
)

◆ JS_ToFloat64()

int JS_ToFloat64 ( JSContext *  ctx,
double *  pres,
JSValueConst  val 
)

◆ JS_ToIndex()

int JS_ToIndex ( JSContext *  ctx,
uint64_t *  plen,
JSValueConst  val 
)

◆ JS_ToInt32()

int JS_ToInt32 ( JSContext *  ctx,
int32_t *  pres,
JSValueConst  val 
)

◆ JS_ToInt64()

int JS_ToInt64 ( JSContext *  ctx,
int64_t *  pres,
JSValueConst  val 
)

◆ JS_ToInt64Ext()

int JS_ToInt64Ext ( JSContext *  ctx,
int64_t *  pres,
JSValueConst  val 
)

◆ JS_ToPropertyKey()

JSValue JS_ToPropertyKey ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_ToString()

JSValue JS_ToString ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_UpdateStackTop()

void JS_UpdateStackTop ( JSRuntime *  rt)

◆ JS_ValueToAtom()

JSAtom JS_ValueToAtom ( JSContext *  ctx,
JSValueConst  val 
)

◆ JS_WriteObject()

uint8_t * JS_WriteObject ( JSContext *  ctx,
size_t *  psize,
JSValueConst  obj,
int  flags 
)

◆ JS_WriteObject2()

uint8_t * JS_WriteObject2 ( JSContext *  ctx,
size_t *  psize,
JSValueConst  obj,
int  flags,
uint8_t ***  psab_tab,
size_t *  psab_tab_len 
)

Variable Documentation

◆ fmt

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