diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-15 08:55:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:11 +0900 |
| commit | ee111dd175f3242649d87a4600e2bad62e8e0940 (patch) | |
| tree | cabfe4a193075d9110ea3608e8dc4c3bb835e280 /src/vm.c | |
| parent | f0c11269977e83f2e578a32134d4b65a2cf72ec0 (diff) | |
| download | mruby-ee111dd175f3242649d87a4600e2bad62e8e0940.tar.gz mruby-ee111dd175f3242649d87a4600e2bad62e8e0940.zip | |
Clarify the use of `MRB_64BIT` and `MRB_INT64` in `dump.c` and `load.c`.
- `MRB_64BIT`: the size of a pointer is 64 bits
- `MRB_INT64`: the size of `mrb_int` is 64 bits
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1017,10 +1017,16 @@ RETRY_TRY_BLOCK: case IREP_TT_INT32: regs[a] = mrb_fixnum_value((mrb_int)pool[b].u.i32); break; -#ifdef MRB_INT64 case IREP_TT_INT64: +#if defined(MRB_INT64) && defined(MRB_64BIT) regs[a] = mrb_fixnum_value((mrb_int)pool[b].u.i64); break; +#else + { + mrb_value exc = mrb_exc_new_str_lit(mrb, E_RUNTIME_ERROR, "integer overflow"); + mrb_exc_set(mrb, exc); + } + goto L_RAISE; #endif #ifndef MRB_WITHOUT_FLOAT case IREP_TT_FLOAT: |
