ark_ff_macros/montgomery/add.rs
1pub(super) fn add_assign_impl(modulus_has_spare_bit: bool) -> proc_macro2::TokenStream {
2 if modulus_has_spare_bit {
3 quote::quote! {
4 __add_with_carry(&mut a.0, &b.0);
5 __subtract_modulus(a);
6 }
7 } else {
8 quote::quote! {
9 let c = __add_with_carry(&mut a.0, &b.0);
10 __subtract_modulus_with_carry(a, c);
11 }
12 }
13}