1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Array FFI Symbol Registration.
//!
//! ## Route A close (ADR-006 §2.7.14 / W11-jit-new-array)
//!
//! Q15 resolved Route A: kinded per-element-kind `Arc<TypedArrayData>`
//! monomorphization. The deleted kind-blind `jit_new_array` /
//! `jit_array_push_elem` symbols are not re-registered here — the
//! kinded surface is the existing `v2_array_new_<f64,i64,i32,bool>` +
//! `v2_array_push` family (registered in
//! `ffi_symbols/v2_symbols.rs::register_v2_symbols`). MIR call sites
//! that lack a proven element kind surface-and-stop at JIT compile
//! time with the `Route A surface-and-stop` marker (see
//! `mir_compiler/statements.rs::ArrayStore` / `EnumStore` and
//! `mir_compiler/rvalues.rs::Aggregate`).
//!
//! The full §2.7.14 cascade list (`jit_array_get/push/pop`,
//! `jit_array_first/last/min/max`, `jit_slice`, `jit_range`,
//! `jit_make_range`, `jit_array_filled`, `jit_array_reverse`,
//! `jit_array_zip`, `jit_hof_array_alloc/push`, `jit_array_info`)
//! routes through the v2 typed-array primitives at the MIR codegen
//! layer: `try_emit_v2_array_method` in `mir_compiler/v2_array.rs`
//! handles `len` / `push` / `sum` / `min` / `max` / `mean` /
//! `scale` / `addScalar` / `addArray` / `mulArray` directly against
//! the `TypedArray<T>` layout. Cascade entries beyond that set
//! (slice, reverse, zip, ...) remain a §2.7.14 follow-up — they're
//! reachable via the generic `jit_call_method` trampoline path until
//! per-method Cranelift codegen lands, which is W11-jit-new-array's
//! follow-up scope.
//!
//! ## Forbidden under any future expansion
//!
//! - `JitArray` revival under any renamed shape (CLAUDE.md "Renames
//! to refuse on sight" — broader-family regex).
//! - Bool-default fallback for unknown element kind (CLAUDE.md
//! "Forbidden rationalizations").
//! - `tag_bits`-based element decoder (CLAUDE.md "Forbidden Patterns" #4).
//! - Mixed-route incrementalism across the §2.7.14 cascade list.
use ;
use FuncId;
use HashMap;
/// Route A close (W11-jit-new-array): the kind-blind array-FFI surface
/// is replaced by the kinded `v2_array_new_<kind>` allocators and the
/// `v2_array_push` size-dispatched push helper, both registered by
/// `register_v2_symbols`. No symbols to register at this layer.
/// Route A close (W11-jit-new-array): the kind-blind array-FFI surface
/// is replaced by the kinded `v2_array_new_<kind>` declarations in
/// `declare_v2_functions`. No declarations at this layer.