MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clean up even more unused passthroughs

+55 -86
+2 -2
include/modules/collections.h
··· 53 53 54 54 void init_collections_module(void); 55 55 56 - map_entry_t **get_map_from_obj(ant_t *js, ant_value_t obj); 57 - set_entry_t **get_set_from_obj(ant_t *js, ant_value_t obj); 56 + map_entry_t **get_map_from_obj(ant_value_t obj); 57 + set_entry_t **get_set_from_obj(ant_value_t obj); 58 58 59 59 extern ant_value_t g_map_iter_proto; 60 60 extern ant_value_t g_set_iter_proto;
+15 -26
src/modules/async_hooks.c
··· 26 26 return result; 27 27 } 28 28 29 - static ant_value_t async_local_storage_run(ant_t *js, ant_value_t *args, int nargs) { 29 + static ant_value_t async_local_storage_run(ant_params_t) { 30 30 if (nargs < 2 || !is_callable(args[1])) { 31 31 return js_mkerr(js, "AsyncLocalStorage.run(store, callback, ...args) requires a callback"); 32 32 } ··· 43 43 return result; 44 44 } 45 45 46 - static ant_value_t async_local_storage_exit(ant_t *js, ant_value_t *args, int nargs) { 46 + static ant_value_t async_local_storage_exit(ant_params_t) { 47 47 if (nargs < 1 || !is_callable(args[0])) { 48 48 return js_mkerr(js, "AsyncLocalStorage.exit(callback, ...args) requires a callback"); 49 49 } ··· 60 60 return result; 61 61 } 62 62 63 - static ant_value_t async_local_storage_enterWith(ant_t *js, ant_value_t *args, int nargs) { 63 + static ant_value_t async_local_storage_enterWith(ant_params_t) { 64 64 ant_value_t this_obj = js_getthis(js); 65 65 if (!is_object_type(this_obj)) { 66 66 return js_mkerr(js, "AsyncLocalStorage.enterWith() requires an AsyncLocalStorage instance"); ··· 69 69 return js_mkundef(); 70 70 } 71 71 72 - static ant_value_t async_local_storage_getStore(ant_t *js, ant_value_t *args, int nargs) { 73 - (void)args; (void)nargs; 72 + static ant_value_t async_local_storage_getStore(ant_params_t) { 74 73 ant_value_t this_obj = js_getthis(js); 75 74 if (!is_object_type(this_obj)) return js_mkundef(); 76 75 return js_get_slot(this_obj, SLOT_DATA); 77 76 } 78 77 79 - static ant_value_t async_local_storage_disable(ant_t *js, ant_value_t *args, int nargs) { 80 - (void)args; (void)nargs; 78 + static ant_value_t async_local_storage_disable(ant_params_t) { 81 79 ant_value_t this_obj = js_getthis(js); 82 80 if (is_object_type(this_obj)) js_set_slot_wb(js, this_obj, SLOT_DATA, js_mkundef()); 83 81 return js_mkundef(); 84 82 } 85 83 86 - static ant_value_t async_resource_runInAsyncScope(ant_t *js, ant_value_t *args, int nargs) { 84 + static ant_value_t async_resource_runInAsyncScope(ant_params_t) { 87 85 if (nargs < 1 || !is_callable(args[0])) { 88 86 return js_mkerr(js, "AsyncResource.runInAsyncScope(fn[, thisArg, ...args]) requires a function"); 89 87 } ··· 91 89 return async_hooks_call_with_tail_args(js, args[0], this_arg, args, nargs, 2); 92 90 } 93 91 94 - static ant_value_t async_resource_emitDestroy(ant_t *js, ant_value_t *args, int nargs) { 95 - (void)args; (void)nargs; 92 + static ant_value_t async_resource_emitDestroy(ant_params_t) { 96 93 return js_getthis(js); 97 94 } 98 95 99 - static ant_value_t async_resource_asyncId(ant_t *js, ant_value_t *args, int nargs) { 100 - (void)js; (void)args; (void)nargs; 96 + static ant_value_t async_resource_asyncId(ant_params_t) { 101 97 return js_mknum(0); 102 98 } 103 99 104 - static ant_value_t async_resource_triggerAsyncId(ant_t *js, ant_value_t *args, int nargs) { 105 - (void)js; (void)args; (void)nargs; 100 + static ant_value_t async_resource_triggerAsyncId(ant_params_t) { 106 101 return js_mknum(0); 107 102 } 108 103 109 - static ant_value_t async_hook_enable(ant_t *js, ant_value_t *args, int nargs) { 110 - (void)args; (void)nargs; 104 + static ant_value_t async_hook_enable(ant_params_t) { 111 105 return js_getthis(js); 112 106 } 113 107 114 - static ant_value_t async_hook_disable(ant_t *js, ant_value_t *args, int nargs) { 115 - (void)args; (void)nargs; 108 + static ant_value_t async_hook_disable(ant_params_t) { 116 109 return js_getthis(js); 117 110 } 118 111 119 - static ant_value_t async_hooks_createHook(ant_t *js, ant_value_t *args, int nargs) { 120 - (void)args; (void)nargs; 112 + static ant_value_t async_hooks_createHook(ant_params_t) { 121 113 ant_value_t hook = js_mkobj(js); 122 114 js_set(js, hook, "enable", js_mkfun(async_hook_enable)); 123 115 js_set(js, hook, "disable", js_mkfun(async_hook_disable)); 124 116 return hook; 125 117 } 126 118 127 - static ant_value_t async_hooks_executionAsyncId(ant_t *js, ant_value_t *args, int nargs) { 128 - (void)js; (void)args; (void)nargs; 119 + static ant_value_t async_hooks_executionAsyncId(ant_params_t) { 129 120 return js_mknum(1); 130 121 } 131 122 132 - static ant_value_t async_hooks_triggerAsyncId(ant_t *js, ant_value_t *args, int nargs) { 133 - (void)js; (void)args; (void)nargs; 123 + static ant_value_t async_hooks_triggerAsyncId(ant_params_t) { 134 124 return js_mknum(0); 135 125 } 136 126 137 - static ant_value_t async_hooks_executionAsyncResource(ant_t *js, ant_value_t *args, int nargs) { 138 - (void)args; (void)nargs; 127 + static ant_value_t async_hooks_executionAsyncResource(ant_params_t) { 139 128 return js_mkobj(js); 140 129 } 141 130
+3 -4
src/modules/bigint.c
··· 71 71 while (*count > 1 && limbs[*count - 1] == 0) (*count)--; 72 72 } 73 73 74 - static inline const bigint_payload_t *bigint_payload(ant_t *js, ant_value_t v) { 75 - (void)js; 74 + static inline const bigint_payload_t *bigint_payload(ant_value_t v) { 76 75 return (const bigint_payload_t *)(uintptr_t)vdata(v); 77 76 } 78 77 ··· 81 80 } 82 81 83 82 bool bigint_is_negative(ant_t *js, ant_value_t v) { 84 - return bigint_payload(js, v)->sign == 1; 83 + return bigint_payload(v)->sign == 1; 85 84 } 86 85 87 86 static const uint32_t *bigint_limbs(ant_t *js, ant_value_t v, size_t *count) { 88 - const bigint_payload_t *payload = bigint_payload(js, v); 87 + const bigint_payload_t *payload = bigint_payload(v); 89 88 size_t limb_count = payload->limb_count; 90 89 if (limb_count == 0) limb_count = 1; 91 90 if (count) *count = limb_count;
-1
src/modules/buffer.c
··· 717 717 } iter_collect_ctx_t; 718 718 719 719 static bool iter_collect_callback(ant_t *js, ant_value_t value, void *udata) { 720 - (void)js; 721 720 iter_collect_ctx_t *ctx = (iter_collect_ctx_t *)udata; 722 721 if (ctx->length >= ctx->capacity) { 723 722 ctx->capacity *= 2;
-1
src/modules/builtin.c
··· 79 79 if (vtype(args[0]) != T_FUNC) return js_mkerr(js, "constructor must be a function"); 80 80 81 81 #ifndef ANT_JIT 82 - (void)js; 83 82 return js_mkerr(js, "constructor property feedback requires ANT_JIT"); 84 83 #else 85 84 ant_value_t ctor = args[0];
+30 -34
src/modules/collections.c
··· 305 305 return js_mkundef(); 306 306 } 307 307 308 - map_entry_t **get_map_from_obj(ant_t *js, ant_value_t obj) { 309 - (void)js; 308 + map_entry_t **get_map_from_obj(ant_value_t obj) { 310 309 ant_object_t *ptr = js_obj_ptr(obj); 311 310 if (!ptr || ptr->type_tag != T_MAP) return NULL; 312 311 return (map_entry_t **)(uintptr_t)js_getnum(ptr->u.data.value); 313 312 } 314 313 315 - set_entry_t **get_set_from_obj(ant_t *js, ant_value_t obj) { 316 - (void)js; 314 + set_entry_t **get_set_from_obj(ant_value_t obj) { 317 315 ant_object_t *ptr = js_obj_ptr(obj); 318 316 if (!ptr || ptr->type_tag != T_SET) return NULL; 319 317 return (set_entry_t **)(uintptr_t)js_getnum(ptr->u.data.value); 320 318 } 321 319 322 - static weakmap_entry_t **get_weakmap_from_obj(ant_t *js, ant_value_t obj) { 323 - (void)js; 320 + static weakmap_entry_t **get_weakmap_from_obj(ant_value_t obj) { 324 321 ant_object_t *ptr = js_obj_ptr(obj); 325 322 if (!ptr || ptr->type_tag != T_WEAKMAP) return NULL; 326 323 return (weakmap_entry_t **)(uintptr_t)js_getnum(ptr->u.data.value); 327 324 } 328 325 329 - static weakset_entry_t **get_weakset_from_obj(ant_t *js, ant_value_t obj) { 330 - (void)js; 326 + static weakset_entry_t **get_weakset_from_obj(ant_value_t obj) { 331 327 ant_object_t *ptr = js_obj_ptr(obj); 332 328 if (!ptr || ptr->type_tag != T_WEAKSET) return NULL; 333 329 return (weakset_entry_t **)(uintptr_t)js_getnum(ptr->u.data.value); 334 330 } 335 331 336 - static map_iterator_state_t *get_map_iter_state(ant_t *js, ant_value_t obj) { 332 + static map_iterator_state_t *get_map_iter_state(ant_value_t obj) { 337 333 ant_value_t state_val = js_get_slot(obj, SLOT_ITER_STATE); 338 334 if (vtype(state_val) == T_UNDEF) return NULL; 339 335 return (map_iterator_state_t *)(uintptr_t)js_getnum(state_val); 340 336 } 341 337 342 - static set_iterator_state_t *get_set_iter_state(ant_t *js, ant_value_t obj) { 338 + static set_iterator_state_t *get_set_iter_state(ant_value_t obj) { 343 339 ant_value_t state_val = js_get_slot(obj, SLOT_ITER_STATE); 344 340 if (vtype(state_val) == T_UNDEF) return NULL; 345 341 return (set_iterator_state_t *)(uintptr_t)js_getnum(state_val); ··· 349 345 if (nargs < 2) return js_mkerr(js, "Map.set() requires 2 arguments"); 350 346 351 347 ant_value_t this_val = js->this_val; 352 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 348 + map_entry_t **map_ptr = get_map_from_obj(this_val); 353 349 if (!map_ptr) return js_mkerr(js, "Invalid Map object"); 354 350 355 351 ant_value_t key_val = normalize_map_key(args[0]); ··· 369 365 if (nargs < 1) return js_mkerr(js, "Map.get() requires 1 argument"); 370 366 371 367 ant_value_t this_val = js->this_val; 372 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 368 + map_entry_t **map_ptr = get_map_from_obj(this_val); 373 369 if (!map_ptr) return js_mkundef(); 374 370 375 371 map_entry_t *entry = map_find_entry(js, map_ptr, args[0]); ··· 380 376 if (nargs < 1) return js_mkerr(js, "Map.has() requires 1 argument"); 381 377 382 378 ant_value_t this_val = js->this_val; 383 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 379 + map_entry_t **map_ptr = get_map_from_obj(this_val); 384 380 385 381 if (!map_ptr) return js_false; 386 382 map_entry_t *entry = map_find_entry(js, map_ptr, args[0]); ··· 391 387 if (nargs < 1) return js_mkerr(js, "Map.delete() requires 1 argument"); 392 388 393 389 ant_value_t this_val = js->this_val; 394 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 390 + map_entry_t **map_ptr = get_map_from_obj(this_val); 395 391 396 392 if (!map_ptr) return js_false; 397 393 map_entry_t *entry = map_find_entry(js, map_ptr, args[0]); ··· 406 402 407 403 static ant_value_t map_clear(ant_t *js, ant_value_t *args, int nargs) { 408 404 ant_value_t this_val = js->this_val; 409 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 405 + map_entry_t **map_ptr = get_map_from_obj(this_val); 410 406 if (!map_ptr) return js_mkundef(); 411 407 412 408 map_entry_t *entry, *tmp; ··· 422 418 423 419 static ant_value_t map_size(ant_t *js, ant_value_t *args, int nargs) { 424 420 ant_value_t this_val = js->this_val; 425 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 421 + map_entry_t **map_ptr = get_map_from_obj(this_val); 426 422 if (!map_ptr) return js_mknum(0); 427 423 428 424 return js_mknum((double)HASH_COUNT(*map_ptr)); ··· 430 426 431 427 static ant_value_t map_forEach(ant_t *js, ant_value_t *args, int nargs) { 432 428 ant_value_t this_val = js->this_val; 433 - map_entry_t **map_ptr = get_map_from_obj(js, this_val); 429 + map_entry_t **map_ptr = get_map_from_obj(this_val); 434 430 435 431 if (nargs < 1 || vtype(args[0]) != T_FUNC) 436 432 return js_mkerr(js, "forEach requires a callback function"); ··· 450 446 } 451 447 452 448 bool advance_map(ant_t *js, js_iter_t *it, ant_value_t *out) { 453 - map_iterator_state_t *state = get_map_iter_state(js, it->iterator); 449 + map_iterator_state_t *state = get_map_iter_state(it->iterator); 454 450 if (!state || !state->current) return false; 455 451 456 452 map_entry_t *entry = state->current; ··· 482 478 } 483 479 484 480 static ant_value_t create_map_iterator(ant_t *js, ant_value_t map_obj, iter_type_t type) { 485 - map_entry_t **map_ptr = get_map_from_obj(js, map_obj); 481 + map_entry_t **map_ptr = get_map_from_obj(map_obj); 486 482 487 483 map_iterator_state_t *state = ant_calloc(sizeof(map_iterator_state_t)); 488 484 if (!state) return js_mkerr(js, "out of memory"); ··· 514 510 } 515 511 516 512 bool advance_set(ant_t *js, js_iter_t *it, ant_value_t *out) { 517 - set_iterator_state_t *state = get_set_iter_state(js, it->iterator); 513 + set_iterator_state_t *state = get_set_iter_state(it->iterator); 518 514 if (!state || !state->current) return false; 519 515 520 516 set_entry_t *entry = state->current; ··· 536 532 } 537 533 538 534 static ant_value_t create_set_iterator(ant_t *js, ant_value_t set_obj, iter_type_t type) { 539 - set_entry_t **set_ptr = get_set_from_obj(js, set_obj); 535 + set_entry_t **set_ptr = get_set_from_obj(set_obj); 540 536 541 537 set_iterator_state_t *state = ant_calloc(sizeof(set_iterator_state_t)); 542 538 if (!state) return js_mkerr(js, "out of memory"); ··· 556 552 if (nargs < 1) return js_mkerr(js, "Set.add() requires 1 argument"); 557 553 558 554 ant_value_t this_val = js->this_val; 559 - set_entry_t **set_ptr = get_set_from_obj(js, this_val); 555 + set_entry_t **set_ptr = get_set_from_obj(this_val); 560 556 if (!set_ptr) return js_mkerr(js, "Invalid Set object"); 561 557 562 558 if (!set_store_entry(js, set_ptr, args[0])) ··· 572 568 if (nargs < 1) return js_mkerr(js, "Set.has() requires 1 argument"); 573 569 574 570 ant_value_t this_val = js->this_val; 575 - set_entry_t **set_ptr = get_set_from_obj(js, this_val); 571 + set_entry_t **set_ptr = get_set_from_obj(this_val); 576 572 if (!set_ptr) return js_false; 577 573 578 574 set_entry_t *entry = set_find_entry(js, set_ptr, args[0]); ··· 583 579 if (nargs < 1) return js_mkerr(js, "Set.delete() requires 1 argument"); 584 580 585 581 ant_value_t this_val = js->this_val; 586 - set_entry_t **set_ptr = get_set_from_obj(js, this_val); 582 + set_entry_t **set_ptr = get_set_from_obj(this_val); 587 583 if (!set_ptr) return js_false; 588 584 589 585 set_entry_t *entry = set_find_entry(js, set_ptr, args[0]); ··· 600 596 static ant_value_t set_clear(ant_t *js, ant_value_t *args, int nargs) { 601 597 (void)args; (void)nargs; 602 598 ant_value_t this_val = js->this_val; 603 - set_entry_t **set_ptr = get_set_from_obj(js, this_val); 599 + set_entry_t **set_ptr = get_set_from_obj(this_val); 604 600 if (!set_ptr) return js_mkundef(); 605 601 606 602 set_entry_t *entry, *tmp; ··· 617 613 static ant_value_t set_size(ant_t *js, ant_value_t *args, int nargs) { 618 614 (void)args; (void)nargs; 619 615 ant_value_t this_val = js->this_val; 620 - set_entry_t **set_ptr = get_set_from_obj(js, this_val); 616 + set_entry_t **set_ptr = get_set_from_obj(this_val); 621 617 if (!set_ptr) return js_mknum(0); 622 618 623 619 return js_mknum((double)HASH_COUNT(*set_ptr)); ··· 635 631 636 632 static ant_value_t set_forEach(ant_t *js, ant_value_t *args, int nargs) { 637 633 ant_value_t this_val = js->this_val; 638 - set_entry_t **set_ptr = get_set_from_obj(js, this_val); 634 + set_entry_t **set_ptr = get_set_from_obj(this_val); 639 635 640 636 if (nargs < 1 || vtype(args[0]) != T_FUNC) 641 637 return js_mkerr(js, "forEach requires a callback function"); ··· 658 654 if (nargs < 2) return js_mkerr(js, "WeakMap.set() requires 2 arguments"); 659 655 660 656 ant_value_t this_val = js->this_val; 661 - weakmap_entry_t **wm_ptr = get_weakmap_from_obj(js, this_val); 657 + weakmap_entry_t **wm_ptr = get_weakmap_from_obj(this_val); 662 658 if (!wm_ptr) return js_mkerr(js, "Invalid WeakMap object"); 663 659 664 660 if (!is_object_type(args[0])) ··· 691 687 if (nargs < 1) return js_mkerr(js, "WeakMap.get() requires 1 argument"); 692 688 693 689 ant_value_t this_val = js->this_val; 694 - weakmap_entry_t **wm_ptr = get_weakmap_from_obj(js, this_val); 690 + weakmap_entry_t **wm_ptr = get_weakmap_from_obj(this_val); 695 691 if (!wm_ptr) return js_mkundef(); 696 692 if (!is_object_type(args[0])) return js_mkundef(); 697 693 ··· 705 701 if (nargs < 1) return js_mkerr(js, "WeakMap.has() requires 1 argument"); 706 702 707 703 ant_value_t this_val = js->this_val; 708 - weakmap_entry_t **wm_ptr = get_weakmap_from_obj(js, this_val); 704 + weakmap_entry_t **wm_ptr = get_weakmap_from_obj(this_val); 709 705 if (!wm_ptr) return js_false; 710 706 if (!is_object_type(args[0])) return js_false; 711 707 ··· 719 715 if (nargs < 1) return js_mkerr(js, "WeakMap.delete() requires 1 argument"); 720 716 721 717 ant_value_t this_val = js->this_val; 722 - weakmap_entry_t **wm_ptr = get_weakmap_from_obj(js, this_val); 718 + weakmap_entry_t **wm_ptr = get_weakmap_from_obj(this_val); 723 719 if (!wm_ptr) return js_false; 724 720 if (!is_object_type(args[0])) return js_false; 725 721 ··· 738 734 if (nargs < 1) return js_mkerr(js, "WeakSet.add() requires 1 argument"); 739 735 740 736 ant_value_t this_val = js->this_val; 741 - weakset_entry_t **ws_ptr = get_weakset_from_obj(js, this_val); 737 + weakset_entry_t **ws_ptr = get_weakset_from_obj(this_val); 742 738 if (!ws_ptr) return js_mkerr(js, "Invalid WeakSet object"); 743 739 744 740 if (!is_object_type(args[0])) ··· 763 759 if (nargs < 1) return js_mkerr(js, "WeakSet.has() requires 1 argument"); 764 760 765 761 ant_value_t this_val = js->this_val; 766 - weakset_entry_t **ws_ptr = get_weakset_from_obj(js, this_val); 762 + weakset_entry_t **ws_ptr = get_weakset_from_obj(this_val); 767 763 if (!ws_ptr) return js_false; 768 764 if (!is_object_type(args[0])) return js_false; 769 765 ··· 777 773 if (nargs < 1) return js_mkerr(js, "WeakSet.delete() requires 1 argument"); 778 774 779 775 ant_value_t this_val = js->this_val; 780 - weakset_entry_t **ws_ptr = get_weakset_from_obj(js, this_val); 776 + weakset_entry_t **ws_ptr = get_weakset_from_obj(this_val); 781 777 if (!ws_ptr) return js_false; 782 778 if (!is_object_type(args[0])) return js_false; 783 779
-4
src/modules/ffi.c
··· 784 784 785 785 void ffi_library_finalize(ant_t *js, ant_object_t *obj) { 786 786 ffi_library_handle_t *library; 787 - (void)js; 788 787 if (obj->native.tag != FFI_LIBRARY_NATIVE_TAG) return; 789 788 790 789 library = (ffi_library_handle_t *)obj->native.ptr; ··· 799 798 800 799 void ffi_function_finalize(ant_t *js, ant_object_t *obj) { 801 800 ffi_function_handle_t *handle; 802 - (void)js; 803 801 if (obj->native.tag != FFI_FUNCTION_NATIVE_TAG) return; 804 802 805 803 handle = (ffi_function_handle_t *)obj->native.ptr; ··· 814 812 815 813 void ffi_pointer_finalize(ant_t *js, ant_object_t *obj) { 816 814 ffi_pointer_handle_t *handle; 817 - (void)js; 818 815 if (obj->native.tag != FFI_POINTER_NATIVE_TAG) return; 819 816 820 817 handle = (ffi_pointer_handle_t *)obj->native.ptr; ··· 828 825 829 826 void ffi_callback_finalize(ant_t *js, ant_object_t *obj) { 830 827 ffi_callback_handle_t *handle; 831 - (void)js; 832 828 if (obj->native.tag != FFI_CALLBACK_NATIVE_TAG) return; 833 829 834 830 handle = (ffi_callback_handle_t *)obj->native.ptr;
+1 -2
src/modules/process.c
··· 1112 1112 return js_true; 1113 1113 } 1114 1114 1115 - static ant_value_t process_abort(ant_t *js, ant_value_t *args, int nargs) { 1116 - (void)js; (void)args; (void)nargs; 1115 + static ant_value_t process_abort(ant_params_t) { 1117 1116 abort(); 1118 1117 return js_mkundef(); 1119 1118 }
-2
src/modules/reflect.c
··· 288 288 } 289 289 290 290 static ant_value_t reflect_is_extensible(ant_t *js, ant_value_t *args, int nargs) { 291 - (void)js; 292 291 if (nargs < 1) return js_false; 293 292 294 293 ant_value_t target = args[0]; ··· 303 302 } 304 303 305 304 static ant_value_t reflect_prevent_extensions(ant_t *js, ant_value_t *args, int nargs) { 306 - (void)js; 307 305 if (nargs < 1) return js_false; 308 306 309 307 ant_value_t target = args[0];
+2 -4
src/modules/sessionstorage.c
··· 127 127 } 128 128 129 129 // sessionStorage.clear() 130 - static ant_value_t js_sessionstorage_clear(ant_t *js, ant_value_t *args, int nargs) { 131 - (void)js; (void)args; (void)nargs; 130 + static ant_value_t js_sessionstorage_clear(ant_params_t) { 132 131 storage_clear(); 133 132 return js_mkundef(); 134 133 } ··· 155 154 } 156 155 157 156 // sessionStorage.length 158 - static ant_value_t js_sessionstorage_length(ant_t *js, ant_value_t *args, int nargs) { 159 - (void)js; (void)args; (void)nargs; 157 + static ant_value_t js_sessionstorage_length(ant_params_t) { 160 158 return js_mknum((double)storage_length()); 161 159 } 162 160
+2 -2
src/modules/structured-clone.c
··· 193 193 js_set_slot(clone, SLOT_DATA, ANT_PTR(new_head)); 194 194 sc_add(seen, val, clone); 195 195 196 - map_entry_t **src_head = get_map_from_obj(js, val); 196 + map_entry_t **src_head = get_map_from_obj(val); 197 197 if (src_head && *src_head) { 198 198 map_entry_t *e, *tmp; 199 199 HASH_ITER(hh, *src_head, e, tmp) { ··· 229 229 js_set_slot(clone, SLOT_DATA, ANT_PTR(new_head)); 230 230 sc_add(seen, val, clone); 231 231 232 - set_entry_t **src_head = get_set_from_obj(js, val); 232 + set_entry_t **src_head = get_set_from_obj(val); 233 233 if (src_head && *src_head) { 234 234 set_entry_t *e, *tmp; 235 235 HASH_ITER(hh, *src_head, e, tmp) {
-3
src/modules/wasm.c
··· 373 373 } 374 374 375 375 static void wasm_module_finalize(ant_t *js, ant_object_t *obj) { 376 - (void)js; 377 376 if (!obj->extra_slots) return; 378 377 379 378 ant_extra_slot_t *entries = (ant_extra_slot_t *)obj->extra_slots; ··· 398 397 } 399 398 400 399 static void wasm_instance_finalize(ant_t *js, ant_object_t *obj) { 401 - (void)js; 402 400 if (!obj->extra_slots) return; 403 401 404 402 ant_extra_slot_t *entries = (ant_extra_slot_t *)obj->extra_slots; ··· 440 438 } 441 439 442 440 static void wasm_extern_finalize(ant_t *js, ant_object_t *obj) { 443 - (void)js; 444 441 if (!obj->extra_slots) return; 445 442 446 443 ant_extra_slot_t *entries = (ant_extra_slot_t *)obj->extra_slots;
-1
src/repl.c
··· 402 402 } 403 403 404 404 static cmd_result_t cmd_save(ant_t *js, history_t *history, const char *arg) { 405 - (void)js; 406 405 if (!arg || *arg == '\0') { 407 406 fprintf(stderr, "Usage: .save <filename>\n"); 408 407 return CMD_OK;