Skip to content

Arrays of compound types in codegen #132

@aallan

Description

@aallan

Only arrays of primitive types (Int, Nat, Bool, Byte, Float64) can be compiled. Arrays containing ADTs, other arrays, or Option/Result are not supported in WASM codegen.

Location: vera/wasm/helpers.py _element_mem_size() only handles primitive types.
Spec reference: Chapter 9 (Standard Library), Section 9.4 — "Arrays of compound types (Array<Array<Int>>, Array<Option<Int>>) are not yet supported."

Soft dependency on #51 (garbage collection) — compound elements are heap pointers, and without GC, long-running programs will leak memory. However, short programs work with the bump allocator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C8eC8e — Codegen gapscodegenCode generation backendlimitationKnown compilation limitation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions