WIP eddit from python

This commit is contained in:
Jean-Marie Mineau 2024-01-23 11:41:18 +01:00
parent d3e005fd68
commit 8dce87d569
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
9 changed files with 474 additions and 9 deletions

View file

@ -599,7 +599,7 @@ impl Serializable for EncodedValue {
.rev()
.take_while(|b| **b == 0)
.count();
1 + 4 - trailing_zeros
std::cmp::max(1 + 4 - trailing_zeros, 2)
}
Self::Double(val) => {
let trailing_zeros = val
@ -608,7 +608,7 @@ impl Serializable for EncodedValue {
.rev()
.take_while(|b| **b == 0)
.count();
1 + 8 - trailing_zeros
std::cmp::max(1 + 8 - trailing_zeros, 2)
}
Self::MethodType(idx) => Idx(*idx, VALUE_TYPE).size(),
Self::MethodHandle(idx) => Idx(*idx, VALUE_METHOD_HANDLE).size(),