Commit 4167ff6
Factoring: Move make_fn constructor from collections/map.c to values/val.c
make_fn allocates and initialises a MINO_FN value cell -- a values-domain
constructor that belongs in values/val.c alongside the other value
constructors. It was in collections/map.c because of co-location with
other fn-related utilities, but that placed a values-domain function
outside its owning module.
Move the implementation to val.c (which already includes runtime/internal.h
for mino_current_ctx, giving access to alloc_val and S->ns_vars.*), remove
it from map.c, and update the implementation listing in values/internal.h.
All callers reach the declaration through collections/internal.h, which
includes values/internal.h -- no caller changes needed.
Fixes factoring-values-r3-002 (make_fn placement).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit d1b643a14e996f7418a6745feba7a75cf4543121)1 parent a90c429 commit 4167ff6
2 files changed
Lines changed: 36 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | 919 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
476 | 512 | | |
477 | 513 | | |
478 | 514 | | |
| |||
0 commit comments