Skip to content

flowc MLIR emitter: unsized arrays and a wasm32 size_t option #1069

Closed

Description

@godofecht

Found in PR #1064. The Flow MLIR emitter refuses unsized arrays, so flow bpf and flow wasm32 fall back to the Python MLIR generator (the wasm32 CI job hits this on alloc_sum.flow). It also has no option for a 32-bit size_t.

Activity

  1. added
    flowc-bug
    on Sep 30, 2026
  2. godofecht commented on Sep 30, 2026

    @godofecht
    ContributorAuthor

    #1072 (still open) says it adds unsized arrays to the Flow MLIR emitter and the wasm32 ABI with FLOWC_MLIR_SIZE_T=32. Not on main yet at ee5048d; close after #1072 merges and alloc_sum.flow emits under wasm32 without the Python fallback.

  3. godofecht commented on Sep 30, 2026

    @godofecht
    ContributorAuthor

    Re-checked after #1072, #1076 and #1077 merged, on main at 437ab06 (flowc rebuilt, bootstrap_from_c.sh --verify passes). Fixed by #1072 (unsized arrays, FLOWC_MLIR_SIZE_T=32):

    $ FLOWC_EMIT=mlir FLOWC_MLIR_SIZE_T=32 FLOWC_IN=tests/fixtures/wasm/alloc_sum.flow FLOWC_OUT=a.mlir flowc; echo $?
    0
    $ mlir-opt a.mlir -o /dev/null; echo $?
    0
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    flowc-bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions