Commit ef61c7c
authored
chore(dsl): require MemOp index and value to be witnesses (#23171)
## Summary
- `acir_format::MemOp.index` and `MemOp.value` become plain `uint32_t`
witness indices instead of `WitnessOrConstant<bb::fr>`.
- The deserializer in `acir_to_constraint_buf.cpp` now asserts the
Noir-side `Acir::Expression` is a single unscaled witness, matching what
Noir actually emits (see `MemOp::read_at_mem_index` /
`write_to_mem_index` in
`acvm-repo/acir/src/circuit/opcodes/memory_operation.rs` — both take
`Witness`, not `Expression`).
- Drops the `add_constant_ops` helper and `perform_constant_ops`
parameterization from ROM/RAM/CallData tests, since the path being
exercised never came up in production.
## Test plan
- [ ] `ninja dsl_tests` passes (note: my local build hits a pre-existing
gtest cxx11-ABI link error; the affected `.cpp.o` objects compile
cleanly)
- [ ] CI green1 parent f5e77a9 commit ef61c7c
6 files changed
Lines changed: 89 additions & 178 deletions
File tree
- barretenberg/cpp/src/barretenberg/dsl/acir_format
Lines changed: 13 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
824 | 823 | | |
825 | | - | |
| 824 | + | |
826 | 825 | | |
827 | | - | |
828 | | - | |
829 | | - | |
| 826 | + | |
830 | 827 | | |
831 | 828 | | |
832 | | - | |
833 | | - | |
834 | | - | |
| 829 | + | |
| 830 | + | |
835 | 831 | | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
| 832 | + | |
841 | 833 | | |
842 | 834 | | |
843 | 835 | | |
| |||
862 | 854 | | |
863 | 855 | | |
864 | 856 | | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
870 | 862 | | |
871 | 863 | | |
872 | 864 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
| 154 | + | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | | - | |
| 29 | + | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
| 34 | + | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
0 commit comments