You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented in commit d74ce9a (local main, pending push).
len / len32 / len64 / ulen32 are implemented for Vec, HashMap, str, and array — Sema return types (usize/i32/i64/u32), MirIntrinsic lowering, both LLVM and C backends, with i32/u32 overflow narrowing. The skipped sketch test/spec/spec_ss18_6_collection_length_methods.w is now executable (7 tests) and the //! skip: directive is removed.
Verified: build + fixpoint + full test suite green.
Note: SlotMap/VecRange len* variants are LLVM-only on the C backend — tracked separately in #301.
Activity
ehartford commentedon May 30, 2026
Length-method portion implemented.
len/len32/len64/ulen32now lower throughMirIntrinsicfor Vec, HashMap, str, and array:usize/i32/i64/u32respectively.len32/ulen32panic at runtime if the length exceeds i32/u32 range.mir_convert_len_method_result) and C (CCodegen.emit_len_result, wired into all four families).test/spec/spec_ss18_6_collection_length_methods.w(7 tests),//! skip:removed.Verified: build + fixpoint + full test suite green; runtime-verified on LLVM; C emission verified to narrow correctly (no bare
len32()calls).Caveat: SlotMap/VecRange
len*variants work on LLVM but not the C backend — tracked in #301. Changes are currently uncommitted in the working tree.ehartford commentedon May 30, 2026
Implemented in commit d74ce9a (local
main, pending push).len/len32/len64/ulen32are implemented for Vec, HashMap, str, and array — Sema return types (usize/i32/i64/u32), MirIntrinsic lowering, both LLVM and C backends, with i32/u32 overflow narrowing. The skipped sketchtest/spec/spec_ss18_6_collection_length_methods.wis now executable (7 tests) and the//! skip:directive is removed.Verified: build + fixpoint + full test suite green.
Note: SlotMap/VecRange
len*variants are LLVM-only on the C backend — tracked separately in #301.Implement collection length methods (len32/len64/ulen32)
Implement collection length methods (len32/len64/ulen32)