blob: 9501f29924987fd7fc87740339f19d20456a557c [file] [edit]
[(cpp) namespace: "emboss::test"]
[$default byte_order: "LittleEndian"]
struct LargeConditionals:
0 [+4] UInt tag
if tag == 0:
4 [+4] UInt f0
if tag == 1:
4 [+4] UInt f1
if tag == 2:
4 [+4] UInt f2
if tag == 3:
4 [+4] UInt f3
if tag == 4:
4 [+4] UInt f4
if tag == 5:
4 [+4] UInt f5
if tag == 6:
4 [+4] UInt f6
if tag == 7:
4 [+4] UInt f7
if tag == 8:
4 [+4] UInt f8
if tag == 9:
4 [+4] UInt f9
if tag == 10:
4 [+4] UInt f10
if tag == 11:
4 [+4] UInt f11
if tag == 12:
4 [+4] UInt f12
if tag == 13:
4 [+4] UInt f13
if tag == 14:
4 [+4] UInt f14
if tag == 15:
4 [+4] UInt f15
if tag == 16:
4 [+4] UInt f16
if tag == 17:
4 [+4] UInt f17
if tag == 18:
4 [+4] UInt f18
if tag == 19:
4 [+4] UInt f19
if tag == 20:
4 [+4] UInt f20
if tag == 21:
4 [+4] UInt f21
if tag == 22:
4 [+4] UInt f22
if tag == 23:
4 [+4] UInt f23
if tag == 24:
4 [+4] UInt f24
if tag == 25:
4 [+4] UInt f25
if tag == 26:
4 [+4] UInt f26
if tag == 27:
4 [+4] UInt f27
if tag == 28:
4 [+4] UInt f28
if tag == 29:
4 [+4] UInt f29
if tag == 30:
4 [+4] UInt f30
if tag == 31:
4 [+4] UInt f31
if tag == 32:
4 [+4] UInt f32
if tag == 33:
4 [+4] UInt f33
if tag == 34:
4 [+4] UInt f34
if tag == 35:
4 [+4] UInt f35
if tag == 36:
4 [+4] UInt f36
if tag == 37:
4 [+4] UInt f37
if tag == 38:
4 [+4] UInt f38
if tag == 39:
4 [+4] UInt f39
if tag == 40:
4 [+4] UInt f40
if tag == 41:
4 [+4] UInt f41
if tag == 42:
4 [+4] UInt f42
if tag == 43:
4 [+4] UInt f43
if tag == 44:
4 [+4] UInt f44
if tag == 45:
4 [+4] UInt f45
if tag == 46:
4 [+4] UInt f46
if tag == 47:
4 [+4] UInt f47
if tag == 48:
4 [+4] UInt f48
if tag == 49:
4 [+4] UInt f49
if tag == 50:
4 [+4] UInt f50
if tag == 51:
4 [+4] UInt f51
if tag == 52:
4 [+4] UInt f52
if tag == 53:
4 [+4] UInt f53
if tag == 54:
4 [+4] UInt f54
if tag == 55:
4 [+4] UInt f55
if tag == 56:
4 [+4] UInt f56
if tag == 57:
4 [+4] UInt f57
if tag == 58:
4 [+4] UInt f58
if tag == 59:
4 [+4] UInt f59
if tag == 60:
4 [+4] UInt f60
if tag == 61:
4 [+4] UInt f61
if tag == 62:
4 [+4] UInt f62
if tag == 63:
4 [+4] UInt f63
if tag == 64:
4 [+4] UInt f64
if tag == 65:
4 [+4] UInt f65
if tag == 66:
4 [+4] UInt f66
if tag == 67:
4 [+4] UInt f67
if tag == 68:
4 [+4] UInt f68
if tag == 69:
4 [+4] UInt f69
if tag == 70:
4 [+4] UInt f70
if tag == 71:
4 [+4] UInt f71
if tag == 72:
4 [+4] UInt f72
if tag == 73:
4 [+4] UInt f73
if tag == 74:
4 [+4] UInt f74
if tag == 75:
4 [+4] UInt f75
if tag == 76:
4 [+4] UInt f76
if tag == 77:
4 [+4] UInt f77
if tag == 78:
4 [+4] UInt f78
if tag == 79:
4 [+4] UInt f79
if tag == 80:
4 [+4] UInt f80
if tag == 81:
4 [+4] UInt f81
if tag == 82:
4 [+4] UInt f82
if tag == 83:
4 [+4] UInt f83
if tag == 84:
4 [+4] UInt f84
if tag == 85:
4 [+4] UInt f85
if tag == 86:
4 [+4] UInt f86
if tag == 87:
4 [+4] UInt f87
if tag == 88:
4 [+4] UInt f88
if tag == 89:
4 [+4] UInt f89
if tag == 90:
4 [+4] UInt f90
if tag == 91:
4 [+4] UInt f91
if tag == 92:
4 [+4] UInt f92
if tag == 93:
4 [+4] UInt f93
if tag == 94:
4 [+4] UInt f94
if tag == 95:
4 [+4] UInt f95
if tag == 96:
4 [+4] UInt f96
if tag == 97:
4 [+4] UInt f97
if tag == 98:
4 [+4] UInt f98
if tag == 99:
4 [+4] UInt f99
if tag == 0:
8 [+4] UInt f0_copy
# Exercises disjunction-of-equality matching: each conditional field is
# guarded by an `||` of multiple discriminant values, which collapses into a
# single multi-label switch arm under the optimized Ok() generator.
struct DisjunctionConditionals:
0 [+4] UInt tag
if tag == 0 || tag == 1 || tag == 2:
4 [+4] UInt shared_low
if tag == 10 || tag == 11:
4 [+4] UInt shared_high
if tag == 100 || tag == 200 || tag == 300:
4 [+4] UInt shared_far
# Exercises residual-read elimination (Lever A): a proper tag-discriminated
# switch where every arm additionally carries a shared residual guard
# (`outer == 1`). The discriminant `tag` is decoded once by the switch; the
# residual is the only per-arm predicate, so the optimized Ok() gates each
# field on the residual alone rather than re-deriving the full has_gN()
# existence condition (which would redundantly re-read and re-compare tag).
# The always-present `outer` field makes `tag` provably Known, so the switch
# survives demotion. Contrast LargeConditionals (all bare arms), the control.
struct OuterGuardedUnion:
0 [+4] UInt outer
4 [+4] UInt tag
if tag == 0 && outer == 1:
8 [+4] UInt g0
if tag == 1 && outer == 1:
8 [+4] UInt g1
if tag == 2 && outer == 1:
8 [+4] UInt g2
if tag == 3 && outer == 1:
8 [+4] UInt g3
if tag == 4 && outer == 1:
8 [+4] UInt g4
if tag == 5 && outer == 1:
8 [+4] UInt g5
if tag == 6 && outer == 1:
8 [+4] UInt g6
if tag == 7 && outer == 1:
8 [+4] UInt g7
if tag == 8 && outer == 1:
8 [+4] UInt g8
if tag == 9 && outer == 1:
8 [+4] UInt g9
if tag == 10 && outer == 1:
8 [+4] UInt g10
if tag == 11 && outer == 1:
8 [+4] UInt g11
if tag == 12 && outer == 1:
8 [+4] UInt g12
if tag == 13 && outer == 1:
8 [+4] UInt g13
if tag == 14 && outer == 1:
8 [+4] UInt g14
if tag == 15 && outer == 1:
8 [+4] UInt g15
if tag == 16 && outer == 1:
8 [+4] UInt g16
if tag == 17 && outer == 1:
8 [+4] UInt g17
if tag == 18 && outer == 1:
8 [+4] UInt g18
if tag == 19 && outer == 1:
8 [+4] UInt g19
if tag == 20 && outer == 1:
8 [+4] UInt g20
if tag == 21 && outer == 1:
8 [+4] UInt g21
if tag == 22 && outer == 1:
8 [+4] UInt g22
if tag == 23 && outer == 1:
8 [+4] UInt g23
if tag == 24 && outer == 1:
8 [+4] UInt g24
if tag == 25 && outer == 1:
8 [+4] UInt g25
if tag == 26 && outer == 1:
8 [+4] UInt g26
if tag == 27 && outer == 1:
8 [+4] UInt g27
if tag == 28 && outer == 1:
8 [+4] UInt g28
if tag == 29 && outer == 1:
8 [+4] UInt g29
if tag == 30 && outer == 1:
8 [+4] UInt g30
if tag == 31 && outer == 1:
8 [+4] UInt g31
if tag == 32 && outer == 1:
8 [+4] UInt g32
if tag == 33 && outer == 1:
8 [+4] UInt g33
if tag == 34 && outer == 1:
8 [+4] UInt g34
if tag == 35 && outer == 1:
8 [+4] UInt g35
if tag == 36 && outer == 1:
8 [+4] UInt g36
if tag == 37 && outer == 1:
8 [+4] UInt g37
if tag == 38 && outer == 1:
8 [+4] UInt g38
if tag == 39 && outer == 1:
8 [+4] UInt g39
if tag == 40 && outer == 1:
8 [+4] UInt g40
if tag == 41 && outer == 1:
8 [+4] UInt g41
if tag == 42 && outer == 1:
8 [+4] UInt g42
if tag == 43 && outer == 1:
8 [+4] UInt g43
if tag == 44 && outer == 1:
8 [+4] UInt g44
if tag == 45 && outer == 1:
8 [+4] UInt g45
if tag == 46 && outer == 1:
8 [+4] UInt g46
if tag == 47 && outer == 1:
8 [+4] UInt g47
if tag == 48 && outer == 1:
8 [+4] UInt g48
if tag == 49 && outer == 1:
8 [+4] UInt g49
if tag == 50 && outer == 1:
8 [+4] UInt g50
if tag == 51 && outer == 1:
8 [+4] UInt g51
if tag == 52 && outer == 1:
8 [+4] UInt g52
if tag == 53 && outer == 1:
8 [+4] UInt g53
if tag == 54 && outer == 1:
8 [+4] UInt g54
if tag == 55 && outer == 1:
8 [+4] UInt g55
if tag == 56 && outer == 1:
8 [+4] UInt g56
if tag == 57 && outer == 1:
8 [+4] UInt g57
if tag == 58 && outer == 1:
8 [+4] UInt g58
if tag == 59 && outer == 1:
8 [+4] UInt g59
if tag == 60 && outer == 1:
8 [+4] UInt g60
if tag == 61 && outer == 1:
8 [+4] UInt g61
if tag == 62 && outer == 1:
8 [+4] UInt g62
if tag == 63 && outer == 1:
8 [+4] UInt g63
if tag == 64 && outer == 1:
8 [+4] UInt g64
if tag == 65 && outer == 1:
8 [+4] UInt g65
if tag == 66 && outer == 1:
8 [+4] UInt g66
if tag == 67 && outer == 1:
8 [+4] UInt g67
if tag == 68 && outer == 1:
8 [+4] UInt g68
if tag == 69 && outer == 1:
8 [+4] UInt g69
if tag == 70 && outer == 1:
8 [+4] UInt g70
if tag == 71 && outer == 1:
8 [+4] UInt g71
if tag == 72 && outer == 1:
8 [+4] UInt g72
if tag == 73 && outer == 1:
8 [+4] UInt g73
if tag == 74 && outer == 1:
8 [+4] UInt g74
if tag == 75 && outer == 1:
8 [+4] UInt g75
if tag == 76 && outer == 1:
8 [+4] UInt g76
if tag == 77 && outer == 1:
8 [+4] UInt g77
if tag == 78 && outer == 1:
8 [+4] UInt g78
if tag == 79 && outer == 1:
8 [+4] UInt g79
if tag == 80 && outer == 1:
8 [+4] UInt g80
if tag == 81 && outer == 1:
8 [+4] UInt g81
if tag == 82 && outer == 1:
8 [+4] UInt g82
if tag == 83 && outer == 1:
8 [+4] UInt g83
if tag == 84 && outer == 1:
8 [+4] UInt g84
if tag == 85 && outer == 1:
8 [+4] UInt g85
if tag == 86 && outer == 1:
8 [+4] UInt g86
if tag == 87 && outer == 1:
8 [+4] UInt g87
if tag == 88 && outer == 1:
8 [+4] UInt g88
if tag == 89 && outer == 1:
8 [+4] UInt g89
if tag == 90 && outer == 1:
8 [+4] UInt g90
if tag == 91 && outer == 1:
8 [+4] UInt g91
if tag == 92 && outer == 1:
8 [+4] UInt g92
if tag == 93 && outer == 1:
8 [+4] UInt g93
if tag == 94 && outer == 1:
8 [+4] UInt g94
if tag == 95 && outer == 1:
8 [+4] UInt g95
if tag == 96 && outer == 1:
8 [+4] UInt g96
if tag == 97 && outer == 1:
8 [+4] UInt g97
if tag == 98 && outer == 1:
8 [+4] UInt g98
if tag == 99 && outer == 1:
8 [+4] UInt g99