phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
28
tools/selfhost/examples/gen_v1_threeblock_collect.sh
Normal file
28
tools/selfhost/examples/gen_v1_threeblock_collect.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# gen_v1_threeblock_collect.sh — v1 JSON: 3-block collect → rc=44 on then-path
|
||||
set -euo pipefail
|
||||
cat <<'JSON'
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"functions": [
|
||||
{"name": "main", "blocks": [
|
||||
{"id":0,"instructions":[
|
||||
{"op":"const","dst":1,"value":{"type":"i64","value":3}},
|
||||
{"op":"const","dst":2,"value":{"type":"i64","value":5}},
|
||||
{"op":"compare","dst":3,"lhs":1,"rhs":2,"cmp":"Lt"},
|
||||
{"op":"branch","cond":3,"then":1,"else":2}
|
||||
]},
|
||||
{"id":1,"instructions":[
|
||||
{"op":"const","dst":4,"value":{"type":"i64","value":44}},
|
||||
{"op":"jump","target":3}
|
||||
]},
|
||||
{"id":2,"instructions":[
|
||||
{"op":"const","dst":4,"value":{"type":"i64","value":40}},
|
||||
{"op":"jump","target":3}
|
||||
]},
|
||||
{"id":3,"instructions":[{"op":"ret","value":4}]}
|
||||
]}
|
||||
]
|
||||
}
|
||||
JSON
|
||||
|
||||
Reference in New Issue
Block a user