don't leave Deref bytecode for Code chunk (#2137)
Re-enter loop after pushing `CompiledExpressionPart::Deref`, so that it isn't recoded for `CompiledExpressionPart::Code` as well.
This commit is contained in:
@@ -454,6 +454,7 @@ where
|
|||||||
Operation::Deref { .. } => {
|
Operation::Deref { .. } => {
|
||||||
flush_code_chunk!();
|
flush_code_chunk!();
|
||||||
parts.push(CompiledExpressionPart::Deref);
|
parts.push(CompiledExpressionPart::Deref);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
@@ -720,7 +721,7 @@ mod tests {
|
|||||||
},
|
},
|
||||||
CompiledExpressionPart::Code(vec![35, 5]),
|
CompiledExpressionPart::Code(vec![35, 5]),
|
||||||
CompiledExpressionPart::Deref,
|
CompiledExpressionPart::Deref,
|
||||||
CompiledExpressionPart::Code(vec![6, 159])
|
CompiledExpressionPart::Code(vec![159])
|
||||||
],
|
],
|
||||||
need_deref: false
|
need_deref: false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user