/third_party/quickjs/ |
D | quickjs.h | 50 typedef struct JSContext JSContext; typedef 120 static inline JSValue __JS_NewFloat64(JSContext *ctx, double d) in __JS_NewFloat64() 159 static inline JSValue __JS_NewFloat64(JSContext *ctx, double d) in __JS_NewFloat64() 225 static inline JSValue __JS_NewFloat64(JSContext *ctx, double d) in __JS_NewFloat64() 311 typedef JSValue JSCFunction(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv); 312 typedef JSValue JSCFunctionMagic(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *arg… 313 typedef JSValue JSCFunctionData(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv… 345 JSContext *JS_NewContext(JSRuntime *rt); 346 void JS_FreeContext(JSContext *s); 347 JSContext *JS_DupContext(JSContext *ctx); [all …]
|
D | quickjs-libc.h | 36 JSModuleDef *js_init_module_std(JSContext *ctx, const char *module_name); 37 JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name); 38 void js_std_add_helpers(JSContext *ctx, int argc, char **argv); 39 void js_std_loop(JSContext *ctx); 42 void js_std_dump_error(JSContext *ctx); 43 uint8_t *js_load_file(JSContext *ctx, size_t *pbuf_len, const char *filename); 44 int js_module_set_import_meta(JSContext *ctx, JSValueConst func_val, 46 JSModuleDef *js_module_loader(JSContext *ctx, 48 void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len, 50 void js_std_promise_rejection_tracker(JSContext *ctx, JSValueConst promise, [all …]
|
D | debugger.h | 86 JSContext *cx; 103 DebuggerInfo *JS_GetDebuggerInfo(JSContext *cx); 104 JSValue JS_BuildStackTrace(JSContext *cx, const uint8_t *curPc); 105 uint32_t JS_GetStackDepth(const JSContext *ctx); 106 LocInfo JS_GetCurrentLocation(JSContext *ctx, const uint8_t *pc); 107 JSValue JS_DebuggerEvaluate(JSContext *ctx, int stackIndex, JSValue expression); 108 void DBG_FreeSources(JSContext *cx, DebuggerInfo *debuggerInfo); 109 void DBG_CallDebugger(JSContext *cx, const uint8_t *pc); 110 uint32_t DBG_GetValueAsUint32Type(JSContext *cx, JSValue obj, const char *property);
|
D | quickjs-libc.c | 133 static int (*os_poll_func)(JSContext *ctx); 135 static void js_std_dbuf_init(JSContext *ctx, DynBuf *s) in js_std_dbuf_init() 145 static JSValue js_printf_internal(JSContext *ctx, in js_printf_internal() 361 uint8_t *js_load_file(JSContext *ctx, size_t *pbuf_len, const char *filename) in js_load_file() 407 static JSValue js_loadScript(JSContext *ctx, JSValueConst this_val, in js_loadScript() 432 static JSValue js_std_loadFile(JSContext *ctx, JSValueConst this_val, in js_std_loadFile() 452 typedef JSModuleDef *(JSInitModuleFunc)(JSContext *ctx, 457 static JSModuleDef *js_module_loader_so(JSContext *ctx, in js_module_loader_so() 464 static JSModuleDef *js_module_loader_so(JSContext *ctx, in js_module_loader_so() 514 int js_module_set_import_meta(JSContext *ctx, JSValueConst func_val, in js_module_set_import_meta() [all …]
|
D | debugger.c | 113 JSContext *cx = debuggerInfo->cx; in DBG_SendMsg() 166 JSContext *cx = debuggerInfo->cx; in DBG_SendStopMsg() 190 JSContext *cx = debuggerInfo->cx; in DBG_SendResponseMsg() 243 JSContext *cx = debuggerInfo->cx; in DBG_CotinueProcess() 269 static void DBG_SetScopes(JSContext *cx, JSValue scopes, int scopeCount, int scopeType, int frameId) in DBG_SetScopes() 299 uint32_t DBG_GetValueAsUint32Type(JSContext *cx, JSValue obj, const char *property) in DBG_GetValueAsUint32Type() 320 JSContext *cx = debuggerInfo->cx; in DBG_ScopesProcess() 349 JSContext *cx = debuggerInfo->cx; in DBG_SetStepOverToDebugger() 369 JSContext *cx = debuggerInfo->cx; in DBG_SetStepOutToDebugger() 389 JSContext *cx = debuggerInfo->cx; in DBG_SetStepInToDebugger() [all …]
|
D | quickjs.c | 231 JSValue (*to_string)(JSContext *ctx, JSValueConst val); 232 JSValue (*from_string)(JSContext *ctx, const char *buf, 234 int (*unary_arith)(JSContext *ctx, 236 int (*binary_arith)(JSContext *ctx, OPCodeEnum op, 238 int (*compare)(JSContext *ctx, OPCodeEnum op, 241 JSValue (*mul_pow10_to_float64)(JSContext *ctx, const bf_t *a, 243 int (*mul_pow10)(JSContext *ctx, JSValue *sp); 418 struct JSContext { struct 462 JSValue (*compile_regexp)(JSContext *ctx, JSValueConst pattern, argument 465 JSValue (*eval_internal)(JSContext *ctx, JSValueConst this_obj, argument [all …]
|
D | bjson.c | 27 static JSValue js_bjson_read(JSContext *ctx, JSValueConst this_val, in js_bjson_read() 48 static JSValue js_bjson_write(JSContext *ctx, JSValueConst this_val, in js_bjson_write() 68 static int js_bjson_init(JSContext *ctx, JSModuleDef *m) in js_bjson_init() 80 JSModuleDef *JS_INIT_MODULE(JSContext *ctx, const char *module_name) in JS_INIT_MODULE()
|
D | run-test262.c | 373 static JSValue js_print(JSContext *ctx, JSValueConst this_val, in js_print() 399 static JSValue js_detachArrayBuffer(JSContext *ctx, JSValue this_val, in js_detachArrayBuffer() 406 static JSValue js_evalScript(JSContext *ctx, JSValue this_val, in js_evalScript() 441 static JSValue add_helpers1(JSContext *ctx); 442 static void add_helpers(JSContext *ctx); 457 JSContext *ctx; in agent_start() 484 JSContext *ctx1; in agent_start() 528 static JSValue js_agent_start(JSContext *ctx, JSValue this_val, in js_agent_start() 551 static void js_agent_free(JSContext *ctx) in js_agent_free() 565 static JSValue js_agent_leaving(JSContext *ctx, JSValue this_val, in js_agent_leaving() [all …]
|
D | qjs.c | 53 static int eval_buf(JSContext *ctx, const void *buf, int buf_len, in eval_buf() 81 static int eval_file(JSContext *ctx, const char *filename, int module) in eval_file() 107 static JSContext *JS_NewCustomContext(JSRuntime *rt) in JS_NewCustomContext() 109 JSContext *ctx; in JS_NewCustomContext() 305 JSContext *ctx; in main()
|
D | qjsc.c | 175 static void output_object_code(JSContext *ctx, in output_object_code() 203 static int js_module_dummy_init(JSContext *ctx, JSModuleDef *m) in js_module_dummy_init() 231 JSModuleDef *jsc_module_loader(JSContext *ctx, in jsc_module_loader() 283 static void compile_file(JSContext *ctx, FILE *fo, in compile_file() 491 JSContext *ctx; in main()
|
/third_party/quickjs/examples/ |
D | point.c | 45 static JSValue js_point_ctor(JSContext *ctx, in js_point_ctor() 77 static JSValue js_point_get_xy(JSContext *ctx, JSValueConst this_val, int magic) in js_point_get_xy() 88 static JSValue js_point_set_xy(JSContext *ctx, JSValueConst this_val, JSValue val, int magic) in js_point_set_xy() 103 static JSValue js_point_norm(JSContext *ctx, JSValueConst this_val, in js_point_norm() 123 static int js_point_init(JSContext *ctx, JSModuleDef *m) in js_point_init() 143 JSModuleDef *js_init_module(JSContext *ctx, const char *module_name) in js_init_module()
|
D | fib.c | 38 static JSValue js_fib(JSContext *ctx, JSValueConst this_val, in js_fib() 52 static int js_fib_init(JSContext *ctx, JSModuleDef *m) in js_fib_init() 64 JSModuleDef *JS_INIT_MODULE(JSContext *ctx, const char *module_name) in JS_INIT_MODULE()
|
/third_party/quickjs/tests/ |
D | bjson.c | 27 static JSValue js_bjson_read(JSContext *ctx, JSValueConst this_val, in js_bjson_read() 52 static JSValue js_bjson_write(JSContext *ctx, JSValueConst this_val, in js_bjson_write() 76 static int js_bjson_init(JSContext *ctx, JSModuleDef *m) in js_bjson_init() 88 JSModuleDef *JS_INIT_MODULE(JSContext *ctx, const char *module_name) in JS_INIT_MODULE()
|
/third_party/quickjs/doc/ |
D | quickjs.texi | 837 @code{JSContext} represents a Javascript context (or Realm). Each 838 JSContext has its own global objects and system objects. There can be 870 @code{JSContext} and can be retrieved with @code{JS_GetException()}. 907 JSContext. @code{JS_NewObjectClass()} sets this prototype in the
|