feat: 二元幂运算 opcode 支持 number 与 BigInt

- 新增 EXP opcode(0x94)与 emit 层 Exponential 分支,二元 a ** b 不再 compile error
- dispatch_exp 与 dispatch_compound_exp 共享 exp_result:IEEE-754 powf 快路径 +
  BigInt 幂(负/超 u32 指数 RangeError)+ 混合 BigInt/Number TypeError
- 复合 **= 补 BigInt 语义(此前走 f64 近似),与二元 ** 行为一致
This commit is contained in:
2026-08-15 21:17:49 +08:00
parent 540ccc4a61
commit 78976cad0c
5 changed files with 125 additions and 8 deletions
+4
View File
@@ -1470,6 +1470,10 @@ impl Vm {
binary_arith!(self, a, b, rd, %, true);
}
OpCode::EXP => {
self.dispatch_exp(rd, a, b)?;
}
OpCode::NEG => {
self.dispatch_neg(rd, a)?;
}