feat(vm): implement NAND on byte vectors of equal length
This commit is contained in:
parent
e65cfa9f91
commit
7ce7753bae
|
@ -315,6 +315,12 @@ impl Process {
|
|||
}
|
||||
(Some(StackEntValue::Bytes(mut a)), Some(StackEntValue::Bytes(mut b))) => {
|
||||
StackEntValue::Bytes(match mbo {
|
||||
MathBinOp::NotAnd if a.len() == b.len() => {
|
||||
a.iter_mut()
|
||||
.zip(b.into_iter())
|
||||
.for_each(|(x, y)| *x = !(*x & y));
|
||||
a
|
||||
}
|
||||
MathBinOp::Add => {
|
||||
a.append(&mut b);
|
||||
a
|
||||
|
|
Loading…
Reference in a new issue