forked from cory/tildefriends
quickjs-2024-01-13.tar.xz
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4765 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
15
deps/quickjs/quickjs.h
vendored
15
deps/quickjs/quickjs.h
vendored
@@ -307,6 +307,9 @@ static inline JS_BOOL JS_VALUE_IS_NAN(JSValue v)
|
||||
#define JS_EVAL_FLAG_COMPILE_ONLY (1 << 5)
|
||||
/* don't include the stack frames before this eval in the Error() backtraces */
|
||||
#define JS_EVAL_FLAG_BACKTRACE_BARRIER (1 << 6)
|
||||
/* allow top-level await in normal script. JS_Eval() returns a
|
||||
promise. Only allowed with JS_EVAL_TYPE_GLOBAL */
|
||||
#define JS_EVAL_FLAG_ASYNC (1 << 7)
|
||||
|
||||
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);
|
||||
@@ -831,7 +834,15 @@ typedef struct {
|
||||
void JS_SetSharedArrayBufferFunctions(JSRuntime *rt,
|
||||
const JSSharedArrayBufferFunctions *sf);
|
||||
|
||||
typedef enum JSPromiseStateEnum {
|
||||
JS_PROMISE_PENDING,
|
||||
JS_PROMISE_FULFILLED,
|
||||
JS_PROMISE_REJECTED,
|
||||
} JSPromiseStateEnum;
|
||||
|
||||
JSValue JS_NewPromiseCapability(JSContext *ctx, JSValue *resolving_funcs);
|
||||
JSPromiseStateEnum JS_PromiseState(JSContext *ctx, JSValue promise);
|
||||
JSValue JS_PromiseResult(JSContext *ctx, JSValue promise);
|
||||
|
||||
/* is_handled = TRUE means that the rejection is handled */
|
||||
typedef void JSHostPromiseRejectionTracker(JSContext *ctx, JSValueConst promise,
|
||||
@@ -902,8 +913,8 @@ int JS_ResolveModule(JSContext *ctx, JSValueConst obj);
|
||||
/* only exported for os.Worker() */
|
||||
JSAtom JS_GetScriptOrModuleName(JSContext *ctx, int n_stack_levels);
|
||||
/* only exported for os.Worker() */
|
||||
JSModuleDef *JS_RunModule(JSContext *ctx, const char *basename,
|
||||
const char *filename);
|
||||
JSValue JS_LoadModule(JSContext *ctx, const char *basename,
|
||||
const char *filename);
|
||||
|
||||
/* C function definition */
|
||||
typedef enum JSCFunctionEnum { /* XXX: should rename for namespace isolation */
|
||||
|
||||
Reference in New Issue
Block a user