Skip to content

emit-c-test: the compiler's C emission stops at 'HashMap traversal (for (k, v) in map) lowering is not implemented' #1434

Closed

Description

@ehartford

Found while running the emit-C targets for #1377. The same failure appears with a compiler built before #1377 (v0.15.2.1-gcffb1cbb4, ae609cd era), so #1377 did not cause it.

with build :emit-c-test (not part of :test) stops before any C is written:

$ out/release/bin/with build out/gen/versioned_main.w --emit-c --bundle-corpus std/re -o main.c
error: C emission failed: emit-c: HashMap traversal (`for (k, v) in map`) lowering is not implemented; use the LLVM backend
error: build failed

The compiler's own source now uses D44 map traversal (for (k, v) in map), and the C backend refuses it loudly (src/CCodegen.w, "HashMap traversal ... lowering is not implemented"). The emit-C lane of the compiler (#955, #1043) cannot get as far as its C-compile errors.

Expected: the C backend lowers for (k, v) in map (D44: map.iter() binding &K/&V), or the lane is recorded as knowingly red with this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions