snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

[Feature] `Literal::from_bits`

Open howardwu opened this issue 3 years ago • 0 comments

🚀 Feature

Literal::from_bits is implemented but commented out. It will need updating the instruction tests due to a change in convention.

This feature changes the Literal::to_bits impl, by changing the serialization as follows:

BEFORE

literal.write_le()

AFTER

let variant = self.enum_index();
variant.write_le()
literal.write_le()

This needs to be studied further before introducing, as it cannot be used in a record (as it will fix the format) however this will be useful for programs (I believe).

howardwu avatar May 16 '22 03:05 howardwu