diff options
| author | mryouse | 2023-05-27 01:08:47 +0000 |
|---|---|---|
| committer | mryouse | 2023-05-27 01:08:47 +0000 |
| commit | 21eff156a3094c82ad85f8d3658fc1ac79c63da1 (patch) | |
| tree | 2b0ec423038b812ba5fc0130f2744bd3a23d7083 /vm.d | |
| parent | a043f552ddca8d890b14bcddf555472ef69e9014 (diff) | |
multiplication
Diffstat (limited to 'vm.d')
| -rw-r--r-- | vm.d | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -500,6 +500,13 @@ class VM { double anum = asNumber(a); this.pushA(makeNumberValue(anum - bnum)); break; + case OpCode.OP_MULTIPLY: + Value b = this.popA(); + Value a = this.popA(); + double bnum = asNumber(b); + double anum = asNumber(a); + this.pushA(makeNumberValue(anum * bnum)); + break; case OpCode.OP_NOT: Value val = this.popA(); bool bval = asBoolean(val); |
