fix: 非常量键成员 **= 复合赋值 rhs 生效

This commit is contained in:
2026-08-15 23:20:36 +08:00
parent 391f613653
commit 7f1187feaf
2 changed files with 21 additions and 1 deletions
+3 -1
View File
@@ -501,7 +501,9 @@ impl Emitter {
AssignmentOperator::Multiplication => OpCode::MUL,
AssignmentOperator::Division => OpCode::DIV,
AssignmentOperator::Remainder => OpCode::MOD,
AssignmentOperator::Exponential => OpCode::COMPOUND_EXP,
// 指数无 COMPOUND_* 对应(COMPOUND_EXP 只读 [Rd,A] 会忽略 rhs):
// 走三寄存器 EXP,旧值在 a 槽(val_reg 兼 rd/a)、rhs 在 b 槽。
AssignmentOperator::Exponential => OpCode::EXP,
AssignmentOperator::BitwiseAnd => OpCode::BIT_AND,
AssignmentOperator::BitwiseOR => OpCode::BIT_OR,
AssignmentOperator::BitwiseXOR => OpCode::BIT_XOR,