avm2: Add more domain memory ops to optimizer

This commit is contained in:
Lord-McSweeney 2024-03-23 12:07:57 -07:00 committed by Lord-McSweeney
parent 3c39acc2ae
commit 2646fcf148
1 changed files with 6 additions and 2 deletions

View File

@ -842,14 +842,18 @@ pub fn optimize<'gc>(
stack.pop();
stack.pop();
}
Op::Si8 => {
Op::Si8 | Op::Si16 | Op::Si32 => {
stack.pop();
stack.pop();
}
Op::Li8 => {
Op::Li8 | Op::Li16 => {
stack.pop();
let mut value = OptValue::of_type(types.int);
value.contains_valid_integer = true;
stack.push(value);
}
Op::Li32 => {
stack.pop();
stack.push_class_object(types.int);
}
Op::ReturnVoid