Lines Matching refs:JSRuntime

259 struct JSRuntime {  struct
432 JSRuntime* rt;
999 static int JS_InitAtoms(JSRuntime* rt);
1000 static JSAtom __JS_NewAtomInit(JSRuntime* rt, const char* str, int len,
1002 static void JS_FreeAtomStruct(JSRuntime* rt, JSAtomStruct* p);
1003 static void free_function_bytecode(JSRuntime* rt, JSFunctionBytecode* b);
1026 static __maybe_unused void JS_DumpAtoms(JSRuntime* rt);
1027 static __maybe_unused void JS_DumpString(JSRuntime* rt,
1029 static __maybe_unused void JS_DumpObjectHeader(JSRuntime* rt);
1030 static __maybe_unused void JS_DumpObject(JSRuntime* rt, JSObject* p);
1031 static __maybe_unused void JS_DumpGCObject(JSRuntime* rt, JSGCObjectHeader* p);
1032 static __maybe_unused void JS_DumpValueShort(JSRuntime* rt,
1038 static __maybe_unused void JS_DumpShapes(JSRuntime* rt);
1041 static void js_array_finalizer(JSRuntime* rt, JSValue val);
1042 static void js_array_mark(JSRuntime* rt, JSValueConst val,
1044 static void js_object_data_finalizer(JSRuntime* rt, JSValue val);
1045 static void js_object_data_mark(JSRuntime* rt, JSValueConst val,
1047 static void js_c_function_finalizer(JSRuntime* rt, JSValue val);
1048 static void js_c_function_mark(JSRuntime* rt, JSValueConst val,
1050 static void js_bytecode_function_finalizer(JSRuntime* rt, JSValue val);
1051 static void js_bytecode_function_mark(JSRuntime* rt, JSValueConst val,
1053 static void js_bound_function_finalizer(JSRuntime* rt, JSValue val);
1054 static void js_bound_function_mark(JSRuntime* rt, JSValueConst val,
1056 static void js_for_in_iterator_finalizer(JSRuntime* rt, JSValue val);
1057 static void js_for_in_iterator_mark(JSRuntime* rt, JSValueConst val,
1059 static void js_regexp_finalizer(JSRuntime* rt, JSValue val);
1060 static void js_array_buffer_finalizer(JSRuntime* rt, JSValue val);
1061 static void js_typed_array_finalizer(JSRuntime* rt, JSValue val);
1062 static void js_typed_array_mark(JSRuntime* rt, JSValueConst val,
1064 static void js_proxy_finalizer(JSRuntime* rt, JSValue val);
1065 static void js_proxy_mark(JSRuntime* rt, JSValueConst val,
1067 static void js_map_finalizer(JSRuntime* rt, JSValue val);
1068 static void js_map_mark(JSRuntime* rt, JSValueConst val,
1070 static void js_map_iterator_finalizer(JSRuntime* rt, JSValue val);
1071 static void js_map_iterator_mark(JSRuntime* rt, JSValueConst val,
1073 static void js_array_iterator_finalizer(JSRuntime* rt, JSValue val);
1074 static void js_array_iterator_mark(JSRuntime* rt, JSValueConst val,
1076 static void js_regexp_string_iterator_finalizer(JSRuntime* rt, JSValue val);
1077 static void js_regexp_string_iterator_mark(JSRuntime* rt, JSValueConst val,
1079 static void js_generator_finalizer(JSRuntime* rt, JSValue obj);
1080 static void js_generator_mark(JSRuntime* rt, JSValueConst val,
1082 static void js_promise_finalizer(JSRuntime* rt, JSValue val);
1083 static void js_promise_mark(JSRuntime* rt, JSValueConst val,
1085 static void js_promise_resolve_function_finalizer(JSRuntime* rt, JSValue val);
1086 static void js_promise_resolve_function_mark(JSRuntime* rt, JSValueConst val,
1089 static void js_operator_set_finalizer(JSRuntime* rt, JSValue val);
1090 static void js_operator_set_mark(JSRuntime* rt, JSValueConst val,
1102 static void gc_decref(JSRuntime* rt);
1103 static int JS_NewClass1(JSRuntime* rt, JSClassID class_id,
1122 static void js_float_env_finalizer(JSRuntime* rt, JSValue val);
1165 static void reset_weak_ref(JSRuntime* rt, JSObject* p);
1186 static void js_async_function_resolve_finalizer(JSRuntime* rt, JSValue val);
1187 static void js_async_function_resolve_mark(JSRuntime* rt, JSValueConst val,
1193 static void js_mark_module_def(JSRuntime* rt, JSModuleDef* m,
1197 static void free_var_ref(JSRuntime* rt, JSVarRef* var_ref);
1218 static void async_func_mark(JSRuntime* rt, JSAsyncFunctionState* s,
1221 static void js_free_shape(JSRuntime* rt, JSShape* sh);
1222 static void js_free_shape_null(JSRuntime* rt, JSShape* sh);
1225 static int init_shape_hash(JSRuntime* rt);
1237 static void js_c_function_data_finalizer(JSRuntime* rt, JSValue val);
1238 static void js_c_function_data_mark(JSRuntime* rt, JSValueConst val,
1244 static void add_gc_object(JSRuntime* rt, JSGCObjectHeader* h,
1247 static void js_async_function_free0(JSRuntime* rt, JSAsyncFunctionData* s);
1261 static void js_trigger_gc(JSRuntime* rt, size_t size) in js_trigger_gc()
1286 void* js_malloc_rt(JSRuntime* rt, size_t size) in js_malloc_rt()
1291 void js_free_rt(JSRuntime* rt, void* ptr) in js_free_rt()
1296 void* js_realloc_rt(JSRuntime* rt, void* ptr, size_t size) in js_realloc_rt()
1301 size_t js_malloc_usable_size_rt(JSRuntime* rt, const void* ptr) in js_malloc_usable_size_rt()
1306 void* js_mallocz_rt(JSRuntime* rt, size_t size) in js_mallocz_rt()
1319 JSRuntime* rt = opaque; in js_bf_realloc()
1500 static int init_class_range(JSRuntime* rt, JSClassShortDef const* tab, in init_class_range()
1582 static inline BOOL js_check_stack_overflow(JSRuntime* rt, size_t alloca_size) in js_check_stack_overflow()
1593 static inline BOOL js_check_stack_overflow(JSRuntime* rt, size_t alloca_size) in js_check_stack_overflow()
1601 JSRuntime* JS_NewRuntime2(const JSMallocFunctions* mf, void* opaque) in JS_NewRuntime2()
1603 JSRuntime* rt; in JS_NewRuntime2()
1610 rt = mf->js_malloc(&ms, sizeof(JSRuntime)); in JS_NewRuntime2()
1667 void* JS_GetRuntimeOpaque(JSRuntime* rt) in JS_GetRuntimeOpaque()
1672 void JS_SetRuntimeOpaque(JSRuntime* rt, void* opaque) in JS_SetRuntimeOpaque()
1782 JSRuntime* JS_NewRuntime(void) in JS_NewRuntime()
1788 void JS_SetMemoryLimit(JSRuntime* rt, size_t limit) in JS_SetMemoryLimit()
1794 void JS_SetGCThreshold(JSRuntime* rt, size_t gc_threshold) in JS_SetGCThreshold()
1803 void JS_SetInterruptHandler(JSRuntime* rt, JSInterruptHandler* cb, void* opaque) in JS_SetInterruptHandler()
1809 void JS_SetCanBlock(JSRuntime* rt, BOOL can_block) in JS_SetCanBlock()
1814 void JS_SetSharedArrayBufferFunctions(JSRuntime* rt, in JS_SetSharedArrayBufferFunctions()
1824 JSRuntime* rt = ctx->rt; in JS_EnqueueJob()
1841 BOOL JS_IsJobPending(JSRuntime* rt) in JS_IsJobPending()
1848 int JS_ExecutePendingJob(JSRuntime* rt, JSContext** pctx) in JS_ExecutePendingJob()
1893 static JSString* js_alloc_string_rt(JSRuntime* rt, int max_len, int is_wide_char) in js_alloc_string_rt()
1923 static inline void js_free_string(JSRuntime* rt, JSString* str) in js_free_string()
1937 void JS_SetRuntimeInfo(JSRuntime* rt, const char* s) in JS_SetRuntimeInfo()
1943 void JS_FreeRuntime(JSRuntime* rt) in JS_FreeRuntime()
2126 (uint64_t)(s->malloc_size - sizeof(JSRuntime)), in JS_FreeRuntime()
2138 JSContext* JS_NewContextRaw(JSRuntime* rt) in JS_NewContextRaw()
2173 JSContext* JS_NewContext(JSRuntime* rt) in JS_NewContext()
2219 JSRuntime* rt = ctx->rt; in JS_SetClassProto()
2226 JSRuntime* rt = ctx->rt; in JS_GetClassProto()
2259 static void JS_MarkContext(JSRuntime* rt, JSContext* ctx, in JS_MarkContext()
2300 JSRuntime* rt = ctx->rt; in JS_FreeContext()
2366 JSRuntime* JS_GetRuntime(JSContext* ctx) in JS_GetRuntime()
2371 void JS_SetMaxStackSize(JSRuntime* rt, size_t stack_size) in JS_SetMaxStackSize()
2498 static __maybe_unused void JS_DumpString(JSRuntime* rt, in JS_DumpString()
2530 static __maybe_unused void JS_DumpAtoms(JSRuntime* rt) in JS_DumpAtoms()
2565 static int JS_ResizeAtomHash(JSRuntime* rt, int new_hash_size) in JS_ResizeAtomHash()
2595 static int JS_InitAtoms(JSRuntime* rt) in JS_InitAtoms()
2624 static JSAtom JS_DupAtomRT(JSRuntime* rt, JSAtom v) in JS_DupAtomRT()
2637 JSRuntime* rt; in JS_DupAtom()
2650 JSRuntime* rt; in JS_AtomGetKind()
2681 static JSAtom js_get_atom_index(JSRuntime* rt, JSAtomStruct* p) in js_get_atom_index()
2700 static JSAtom __JS_NewAtom(JSRuntime* rt, JSString* str, int atom_type) in __JS_NewAtom()
2855 static JSAtom __JS_NewAtomInit(JSRuntime* rt, const char* str, int len, in __JS_NewAtomInit()
2867 static JSAtom __JS_FindAtom(JSRuntime* rt, const char* str, size_t len, in __JS_FindAtom()
2893 static void JS_FreeAtomStruct(JSRuntime* rt, JSAtomStruct* p) in JS_FreeAtomStruct()
2936 static void __JS_FreeAtom(JSRuntime* rt, uint32_t i) in __JS_FreeAtom()
2949 JSRuntime* rt = ctx->rt; in JS_NewAtomStr()
3016 JSRuntime* rt = ctx->rt; in JS_NewSymbol()
3028 JSRuntime* rt = ctx->rt; in JS_NewSymbolFromAtom()
3041 static const char* JS_AtomGetStrRT(JSRuntime* rt, char* buf, int buf_size, in JS_AtomGetStrRT()
3103 JSRuntime* rt = ctx->rt; in __JS_AtomToValue()
3140 JSRuntime* rt = ctx->rt; in JS_AtomIsArrayIndex()
3162 JSRuntime* rt = ctx->rt; in JS_AtomIsNumericIndex1()
3260 void JS_FreeAtomRT(JSRuntime* rt, JSAtom v) in JS_FreeAtomRT()
3269 JSRuntime* rt; in JS_AtomSymbolHasDescription()
3394 BOOL JS_IsRegisteredClass(JSRuntime* rt, JSClassID class_id) in JS_IsRegisteredClass()
3402 static int JS_NewClass1(JSRuntime* rt, JSClassID class_id, in JS_NewClass1()
3450 int JS_NewClass(JSRuntime* rt, JSClassID class_id, const JSClassDef* class_def) in JS_NewClass()
4256 static int init_shape_hash(JSRuntime* rt) in init_shape_hash()
4289 static int resize_shape_hash(JSRuntime* rt, int new_shape_hash_bits) in resize_shape_hash()
4315 static void js_shape_hash_link(JSRuntime* rt, JSShape* sh) in js_shape_hash_link()
4324 static void js_shape_hash_unlink(JSRuntime* rt, JSShape* sh) in js_shape_hash_unlink()
4341 JSRuntime* rt = ctx->rt; in js_new_shape2()
4415 static void js_free_shape0(JSRuntime* rt, JSShape* sh) in js_free_shape0()
4435 static void js_free_shape(JSRuntime* rt, JSShape* sh) in js_free_shape()
4442 static void js_free_shape_null(JSRuntime* rt, JSShape* sh) in js_free_shape_null()
4586 JSRuntime* rt = ctx->rt; in add_shape_property()
4629 static JSShape* find_hashed_shape_proto(JSRuntime* rt, JSObject* proto) in find_hashed_shape_proto()
4648 static JSShape* find_hashed_shape_prop(JSRuntime* rt, JSShape* sh, in find_hashed_shape_prop()
4679 static __maybe_unused void JS_DumpShape(JSRuntime* rt, int i, JSShape* sh) in JS_DumpShape()
4695 static __maybe_unused void JS_DumpShapes(JSRuntime* rt) in JS_DumpShapes()
5055 static void js_c_function_data_finalizer(JSRuntime* rt, JSValue val) in js_c_function_data_finalizer()
5068 static void js_c_function_data_mark(JSRuntime* rt, JSValueConst val, in js_c_function_data_mark()
5149 static void js_autoinit_free(JSRuntime* rt, JSProperty* pr) in js_autoinit_free()
5154 static void js_autoinit_mark(JSRuntime* rt, JSProperty* pr, in js_autoinit_mark()
5160 static void free_property(JSRuntime* rt, JSProperty* pr, int prop_flags) in free_property()
5227 static void free_var_ref(JSRuntime* rt, JSVarRef* var_ref) in free_var_ref()
5243 static void js_array_finalizer(JSRuntime* rt, JSValue val) in js_array_finalizer()
5254 static void js_array_mark(JSRuntime* rt, JSValueConst val, in js_array_mark()
5265 static void js_object_data_finalizer(JSRuntime* rt, JSValue val) in js_object_data_finalizer()
5272 static void js_object_data_mark(JSRuntime* rt, JSValueConst val, in js_object_data_mark()
5279 static void js_c_function_finalizer(JSRuntime* rt, JSValue val) in js_c_function_finalizer()
5287 static void js_c_function_mark(JSRuntime* rt, JSValueConst val, in js_c_function_mark()
5296 static void js_bytecode_function_finalizer(JSRuntime* rt, JSValue val) in js_bytecode_function_finalizer()
5319 static void js_bytecode_function_mark(JSRuntime* rt, JSValueConst val, in js_bytecode_function_mark()
5346 static void js_bound_function_finalizer(JSRuntime* rt, JSValue val) in js_bound_function_finalizer()
5360 static void js_bound_function_mark(JSRuntime* rt, JSValueConst val, in js_bound_function_mark()
5373 static void js_for_in_iterator_finalizer(JSRuntime* rt, JSValue val) in js_for_in_iterator_finalizer()
5381 static void js_for_in_iterator_mark(JSRuntime* rt, JSValueConst val, in js_for_in_iterator_mark()
5389 static void free_object(JSRuntime* rt, JSObject* p) in free_object()
5436 static void free_gc_object(JSRuntime* rt, JSGCObjectHeader* gp) in free_gc_object()
5450 static void free_zero_refcount(JSRuntime* rt) in free_zero_refcount()
5468 void __JS_FreeValueRT(JSRuntime* rt, JSValue v) in __JS_FreeValueRT()
5540 static void add_gc_object(JSRuntime* rt, JSGCObjectHeader* h, in add_gc_object()
5553 void JS_MarkValue(JSRuntime* rt, JSValueConst val, JS_MarkFunc* mark_func) in JS_MarkValue()
5567 static void mark_children(JSRuntime* rt, JSGCObjectHeader* gp, in mark_children()
5652 static void gc_decref_child(JSRuntime* rt, JSGCObjectHeader* p) in gc_decref_child()
5662 static void gc_decref(JSRuntime* rt) in gc_decref()
5685 static void gc_scan_incref_child(JSRuntime* rt, JSGCObjectHeader* p) in gc_scan_incref_child()
5697 static void gc_scan_incref_child2(JSRuntime* rt, JSGCObjectHeader* p) in gc_scan_incref_child2()
5702 static void gc_scan(JSRuntime* rt) in gc_scan()
5724 static void gc_free_cycles(JSRuntime* rt) in gc_free_cycles()
5774 void JS_RunGC(JSRuntime* rt) in JS_RunGC()
5790 BOOL JS_IsLiveObject(JSRuntime* rt, JSValueConst obj) in JS_IsLiveObject()
5880 void JS_ComputeMemoryUsage(JSRuntime* rt, JSMemoryUsage* s) in JS_ComputeMemoryUsage()
5892 s->memory_used_size = sizeof(JSRuntime) + sizeof(JSValue) * rt->class_count; in JS_ComputeMemoryUsage()
6168 void JS_DumpMemoryUsage(FILE* fp, const JSMemoryUsage* s, JSRuntime* rt) in JS_DumpMemoryUsage()
6183 { "JSRuntime", sizeof(JSRuntime) }, in JS_DumpMemoryUsage()
6305 JSRuntime* rt = ctx->rt; in JS_Throw()
6315 JSRuntime* rt = ctx->rt; in JS_GetException()
6573 JSRuntime* rt = ctx->rt; in JS_ThrowError()
6688 JSRuntime* rt = ctx->rt; in JS_ThrowOutOfMemory()
6728 JSRuntime* rt = ctx->rt; in JS_ThrowTypeErrorInvalidClass()
6736 JSRuntime* rt = ctx->rt; in __js_poll_interrupts()
11532 static __maybe_unused void JS_DumpObjectHeader(JSRuntime* rt) in JS_DumpObjectHeader()
11539 static __maybe_unused void JS_DumpObject(JSRuntime* rt, JSObject* p) in JS_DumpObject()
11631 static __maybe_unused void JS_DumpGCObject(JSRuntime* rt, JSGCObjectHeader* p) in JS_DumpGCObject()
11663 static __maybe_unused void JS_DumpValueShort(JSRuntime* rt, in JS_DumpValueShort()
15684 static void close_var_refs(JSRuntime* rt, JSStackFrame* sf) in close_var_refs()
15732 JSRuntime* rt = ctx->rt; in js_call_c_function()
15924 JSRuntime* rt = caller_ctx->rt; in JS_CallInternal()
18743 static void async_func_mark(JSRuntime* rt, JSAsyncFunctionState* s, in async_func_mark()
18762 static void async_func_free(JSRuntime* rt, JSAsyncFunctionState* s) in async_func_free()
18812 static void free_generator_stack_rt(JSRuntime* rt, JSGeneratorData* s) in free_generator_stack_rt()
18820 static void js_generator_finalizer(JSRuntime* rt, JSValue obj) in js_generator_finalizer()
18835 static void js_generator_mark(JSRuntime* rt, JSValueConst val, in js_generator_mark()
19045 static void js_async_function_terminate(JSRuntime* rt, JSAsyncFunctionData* s) in js_async_function_terminate()
19053 static void js_async_function_free0(JSRuntime* rt, JSAsyncFunctionData* s) in js_async_function_free0()
19062 static void js_async_function_free(JSRuntime* rt, JSAsyncFunctionData* s) in js_async_function_free()
19069 static void js_async_function_resolve_finalizer(JSRuntime* rt, JSValue val) in js_async_function_resolve_finalizer()
19078 static void js_async_function_resolve_mark(JSRuntime* rt, JSValueConst val, in js_async_function_resolve_mark()
19257 static void js_async_generator_free(JSRuntime* rt, in js_async_generator_free()
19279 static void js_async_generator_finalizer(JSRuntime* rt, JSValue obj) in js_async_generator_finalizer()
19288 static void js_async_generator_mark(JSRuntime* rt, JSValueConst val, in js_async_generator_mark()
26634 static void js_mark_module_def(JSRuntime* rt, JSModuleDef* m, in js_mark_module_def()
26830 void JS_SetModuleLoaderFunc(JSRuntime* rt, in JS_SetModuleLoaderFunc()
26917 JSRuntime* rt = ctx->rt; in js_host_resolve_imported_module()
28331 static void free_bytecode_atoms(JSRuntime* rt, in free_bytecode_atoms()
32126 static void free_function_bytecode(JSRuntime* rt, JSFunctionBytecode* b) in free_function_bytecode()
34053 JSRuntime* rt = s->ctx->rt; in JS_WriteObjectAtoms()
38766 static void js_array_iterator_finalizer(JSRuntime* rt, JSValue val) in js_array_iterator_finalizer()
38776 static void js_array_iterator_mark(JSRuntime* rt, JSValueConst val, in js_array_iterator_mark()
41400 static void js_regexp_finalizer(JSRuntime* rt, JSValue val) in js_regexp_finalizer()
42202 static void js_regexp_string_iterator_finalizer(JSRuntime* rt, JSValue val) in js_regexp_string_iterator_finalizer()
42213 static void js_regexp_string_iterator_mark(JSRuntime* rt, JSValueConst val, in js_regexp_string_iterator_mark()
43714 static void js_proxy_finalizer(JSRuntime* rt, JSValue val) in js_proxy_finalizer()
43724 static void js_proxy_mark(JSRuntime* rt, JSValueConst val, in js_proxy_mark()
44648 JSRuntime* rt = ctx->rt; in JS_AddIntrinsicProxy()
45049 static void delete_weak_ref(JSRuntime* rt, JSMapRecord* mr) in delete_weak_ref()
45066 static void map_delete_record(JSRuntime* rt, JSMapState* s, JSMapRecord* mr) in map_delete_record()
45089 static void map_decref_record(JSRuntime* rt, JSMapRecord* mr) in map_decref_record()
45099 static void reset_weak_ref(JSRuntime* rt, JSObject* p) in reset_weak_ref()
45274 static void js_map_finalizer(JSRuntime* rt, JSValue val) in js_map_finalizer()
45303 static void js_map_mark(JSRuntime* rt, JSValueConst val, JS_MarkFunc* mark_func) in js_map_mark()
45330 static void js_map_iterator_finalizer(JSRuntime* rt, JSValue val) in js_map_iterator_finalizer()
45348 static void js_map_iterator_mark(JSRuntime* rt, JSValueConst val, in js_map_iterator_mark()
45609 static void promise_reaction_data_free(JSRuntime* rt, in promise_reaction_data_free()
45660 void JS_SetHostPromiseRejectionTracker(JSRuntime* rt, in JS_SetHostPromiseRejectionTracker()
45684 JSRuntime* rt = ctx->rt; in fulfill_or_reject_promise()
45744 static void js_promise_resolve_function_free_resolved(JSRuntime* rt, in js_promise_resolve_function_free_resolved()
45794 static void js_promise_resolve_function_finalizer(JSRuntime* rt, JSValue val) in js_promise_resolve_function_finalizer()
45804 static void js_promise_resolve_function_mark(JSRuntime* rt, JSValueConst val, in js_promise_resolve_function_mark()
45866 static void js_promise_finalizer(JSRuntime* rt, JSValue val) in js_promise_finalizer()
45886 static void js_promise_mark(JSRuntime* rt, JSValueConst val, in js_promise_mark()
46424 JSRuntime* rt = ctx->rt; in perform_promise_then()
46629 static void js_async_from_sync_iterator_finalizer(JSRuntime* rt, JSValue val) in js_async_from_sync_iterator_finalizer()
46640 static void js_async_from_sync_iterator_mark(JSRuntime* rt, JSValueConst val, in js_async_from_sync_iterator_mark()
46816 JSRuntime* rt = ctx->rt; in JS_AddIntrinsicPromise()
48092 static void js_operator_set_finalizer(JSRuntime* rt, JSValue val) in js_operator_set_finalizer()
48123 static void js_operator_set_mark(JSRuntime* rt, JSValueConst val, in js_operator_set_mark()
48705 JSRuntime* rt = ctx->rt; in JS_AddIntrinsicBigInt()
49415 static void js_float_env_finalizer(JSRuntime* rt, JSValue val) in js_float_env_finalizer()
49590 JSRuntime* rt = ctx->rt; in JS_AddIntrinsicBigFloat()
50073 JSRuntime* rt = ctx->rt; in JS_AddIntrinsicBigDecimal()
50399 JSRuntime* rt = ctx->rt; in js_array_buffer_constructor3()
50451 static void js_array_buffer_free(JSRuntime* rt, void* opaque, void* ptr) in js_array_buffer_free()
50514 static void js_array_buffer_finalizer(JSRuntime* rt, JSValue val) in js_array_buffer_finalizer()
52448 static void js_typed_array_finalizer(JSRuntime* rt, JSValue val) in js_typed_array_finalizer()
52463 static void js_typed_array_mark(JSRuntime* rt, JSValueConst val, in js_typed_array_mark()