| 1435 | } |
| 1436 | |
| 1437 | static void __tsn_module_finalize(JSRuntime* rt, JSValue value) { |
| 1438 | auto* module = tsn_get_module_from_value(value); |
| 1439 | |
| 1440 | auto atoms_length = module->atoms_length; |
| 1441 | for (size_t i = 0; i < atoms_length; i++) { |
| 1442 | if (module->atoms[i] != 0) { |
| 1443 | JS_FreeAtomRT(rt, module->atoms[i]); |
| 1444 | } |
| 1445 | } |
| 1446 | auto constants_length = module->constants_length; |
| 1447 | for (size_t i = 0; i < constants_length; i++) { |
| 1448 | JS_FreeValueRT(rt, module->constants[i]); |
| 1449 | } |
| 1450 | |
| 1451 | js_free_rt(rt, module); |
| 1452 | } |
| 1453 | |
| 1454 | static void __tsn_module_mark(JSRuntime* rt, JSValueConst val, JS_MarkFunc* mark_func) { |
| 1455 | auto* module = tsn_get_module_from_value(val); |
nothing calls this directly
no test coverage detected