feat(vm): concatenation of byte vectors
This commit is contained in:
parent
993ce94fbd
commit
51438c5568
|
@ -293,6 +293,26 @@ impl Process {
|
|||
MathBinOp::Mul => u128::from(a).wrapping_mul(u128::from(b)),
|
||||
}))
|
||||
}
|
||||
(Some(StackEntValue::Bytes(mut a)), Some(StackEntValue::Bytes(mut b))) => {
|
||||
StackEntValue::Bytes(match mbo {
|
||||
MathBinOp::Add => {
|
||||
a.append(&mut b);
|
||||
a
|
||||
}
|
||||
y => {
|
||||
eprintln!(
|
||||
"ERROR: BIF :math2:*({:?}) @ {} called with {:?}",
|
||||
y,
|
||||
previptr,
|
||||
(
|
||||
Some(StackEntValue::Bytes(a)),
|
||||
Some(StackEntValue::Bytes(b)),
|
||||
),
|
||||
);
|
||||
break;
|
||||
}
|
||||
})
|
||||
}
|
||||
x => {
|
||||
eprintln!("ERROR: BIF :math2:* @ {} called with {:?}", previptr, x);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue