summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-03-12 16:21:32 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-03-12 16:21:32 +0900
commit4ae5ae353564291cdb28108c26382c32242966a8 (patch)
tree6cb495e5c3c59a0c9f46b8e4548f17e7082443d2 /src/vm.c
parent84e27d3b519d8fba87c6ffdf318ccadf67d5318f (diff)
downloadmruby-4ae5ae353564291cdb28108c26382c32242966a8.tar.gz
mruby-4ae5ae353564291cdb28108c26382c32242966a8.zip
codegen.c: no integer overflow error in `codegen`; close #5376
Add new pool value type `IREP_TT_BIGINT` and generate integer overflow error in the VM. In the future, `mruby` will support `Bignum` for integers bigger than `mrb_int` (probably using `mpz`).
Diffstat (limited to 'src/vm.c')
-rw-r--r--src/vm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index 2607ba308..1009fb638 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1143,6 +1143,8 @@ RETRY_TRY_BLOCK:
#endif
goto L_INT_OVERFLOW;
#endif
+ case IREP_TT_BIGINT:
+ goto L_INT_OVERFLOW;
#ifndef MRB_NO_FLOAT
case IREP_TT_FLOAT:
regs[a] = mrb_float_value(mrb, pool[b].u.f);