diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp index 02193ef7b71e..db26416f7447 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp @@ -61,7 +61,7 @@ poly_triple serialize_arithmetic_gate(Circuit::Expression const& arg) return pt; } -void handle_arithmetic(Circuit::Opcode::Arithmetic const& arg, acir_format& af) +void handle_arithmetic(Circuit::Opcode::AssertZero const& arg, acir_format& af) { af.constraints.push_back(serialize_arithmetic_gate(arg.value)); } @@ -269,7 +269,7 @@ acir_format circuit_buf_to_acir_format(std::vector const& buf) std::visit( [&](auto&& arg) { using T = std::decay_t; - if constexpr (std::is_same_v) { + if constexpr (std::is_same_v) { handle_arithmetic(arg, af); } else if constexpr (std::is_same_v) { handle_blackbox_func_call(arg, af); diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp index e9a9b17d8648..82e57cad6c65 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp @@ -805,12 +805,12 @@ struct MemOp { struct Opcode { - struct Arithmetic { + struct AssertZero { Circuit::Expression value; - friend bool operator==(const Arithmetic&, const Arithmetic&); + friend bool operator==(const AssertZero&, const AssertZero&); std::vector bincodeSerialize() const; - static Arithmetic bincodeDeserialize(std::vector); + static AssertZero bincodeDeserialize(std::vector); }; struct BlackBoxFuncCall { @@ -856,7 +856,7 @@ struct Opcode { static MemoryInit bincodeDeserialize(std::vector); }; - std::variant value; + std::variant value; friend bool operator==(const Opcode&, const Opcode&); std::vector bincodeSerialize() const; @@ -5109,7 +5109,7 @@ Circuit::Opcode serde::Deserializable::deserialize(Deserializer namespace Circuit { -inline bool operator==(const Opcode::Arithmetic& lhs, const Opcode::Arithmetic& rhs) +inline bool operator==(const Opcode::AssertZero& lhs, const Opcode::AssertZero& rhs) { if (!(lhs.value == rhs.value)) { return false; @@ -5117,17 +5117,17 @@ inline bool operator==(const Opcode::Arithmetic& lhs, const Opcode::Arithmetic& return true; } -inline std::vector Opcode::Arithmetic::bincodeSerialize() const +inline std::vector Opcode::AssertZero::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); - serde::Serializable::serialize(*this, serializer); + serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } -inline Opcode::Arithmetic Opcode::Arithmetic::bincodeDeserialize(std::vector input) +inline Opcode::AssertZero Opcode::AssertZero::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); - auto value = serde::Deserializable::deserialize(deserializer); + auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw_or_abort("Some input bytes were not read"); } @@ -5138,7 +5138,7 @@ inline Opcode::Arithmetic Opcode::Arithmetic::bincodeDeserialize(std::vector template -void serde::Serializable::serialize(const Circuit::Opcode::Arithmetic& obj, +void serde::Serializable::serialize(const Circuit::Opcode::AssertZero& obj, Serializer& serializer) { serde::Serializable::serialize(obj.value, serializer); @@ -5146,9 +5146,9 @@ void serde::Serializable::serialize(const Circuit:: template <> template -Circuit::Opcode::Arithmetic serde::Deserializable::deserialize(Deserializer& deserializer) +Circuit::Opcode::AssertZero serde::Deserializable::deserialize(Deserializer& deserializer) { - Circuit::Opcode::Arithmetic obj; + Circuit::Opcode::AssertZero obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; }