Update this-mutability of yield*

This commit is contained in:
Andrew Morris
2023-06-01 12:01:56 +10:00
parent 5712221cd6
commit 7e22dbeba0

View File

@@ -50,15 +50,14 @@ pub fn instruction_mutates_this(instruction: &Instruction) -> bool {
| ConstSubCall(_, _, _, reg)
| ThisSubCall(_, _, _, reg)
| Cat(_, reg)
| Yield(_, reg)
| YieldStar(_, reg) => reg == &Register::This,
| Yield(_, reg) => reg == &Register::This,
Next(iter, res) => iter == &Register::This || res == &Register::This,
UnpackIterRes(_, value_reg, done_reg) => {
value_reg == &Register::This || done_reg == &Register::This
}
Apply(_, ctx, _, reg) | SubCall(ctx, _, _, reg) => {
Apply(_, ctx, _, reg) | SubCall(ctx, _, _, reg) | YieldStar(ctx, reg) => {
reg == &Register::This
|| match ctx {
Value::Register(reg) => reg == &Register::This,