summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
AgeCommit message (Collapse)Author
2017-09-27fix: src\vm.c(704): warning C4244: '=': conversion from 'mrb_int' to 'int', ↵Tomasz Dąbrowski
possible loss of data
2017-09-27fix: src\vm.c(457): warning C4244: '=': conversion from 'mrb_int' to 'int', ↵Tomasz Dąbrowski
possible loss of data
2017-09-27fix: src\vm.c(445): warning C4244: '=': conversion from 'mrb_int' to 'int', ↵Tomasz Dąbrowski
possible loss of data
2017-09-27fix: src\vm.c(438): warning C4244: '=': conversion from 'mrb_int' to 'int', ↵Tomasz Dąbrowski
possible loss of data
2017-09-23The first instruction was skipped mistakenly in ensure clause; fix #3811Yukihiro "Matz" Matsumoto
2017-09-22`OP_EPOP` operand may be bigger than `mrb->c->eidx`; fix #3810Yukihiro "Matz" Matsumoto
2017-09-12Remove temporary limitation of `OP_EPOP`.Yukihiro "Matz" Matsumoto
After f68f5f6, the operand of `OP_EPOP` should have been `1`. Now we have removed the limitation.
2017-09-11The callinfo stack may be reallocated in `cipush`; fix rest of #3809Yukihiro "Matz" Matsumoto
fix #3809
2017-09-11The ensure stack may be empty at `OP_EPOP`; fix 1st part of #3809Yukihiro "Matz" Matsumoto
2017-09-05Avoid crossing C function boundary from `OP_EPOP`; ref #3789Yukihiro "Matz" Matsumoto
2017-09-04Restructure `irep->outer` chain; fix #3804Yukihiro "Matz" Matsumoto
Instead of `irep -> proc` chain, we use `irep -> irep` chain to avoid GC bugs like #3804. We added `target_class` reference to `mrb_irep` struct. That means one more word consumption per `irep`.
2017-08-30Fixed a critical typo; ref #3798Yukihiro "Matz" Matsumoto
2017-08-29Need to update `ci` after `callinfo` stack reallocation; fix #3796Yukihiro "Matz" Matsumoto
2017-08-26Silence compiler warning regarding float condition; fix #3790Yukihiro "Matz" Matsumoto
2017-08-23Asserted bidx < ci->nregs for OP_SEND and OP_SUPERChristopher Aue
2017-08-18Separate `mrb_str_buf_new` and `mrb_str_new_capa`.Yukihiro "Matz" Matsumoto
`mrb_str_buf_new` is an old function that ensures capacity size of `MRB_STR_BUF_MIN_SIZE` minimum. Usually one need to use `mrb_str_new_capa` instead.
2017-08-18Reset ci in OP_SUPER after potential reallocChristopher Aue
2017-08-12Reintroduced not storing converted proc directly in the stackChristopher Aue
2017-08-12Removed unneeded ci->nregs checks in OP_SEND and OP_SUPERChristopher Aue
Because of #3504 `ci->nregs = bidx+1` was introduced in b64f08784cc50861dec80c26fce715982c02c9e9. This led to the follow up error #3551 whose fix introduced the `if (bidx >= ci->nregs)` check in 071164b7999d0932fd60fb3c580a6c374ab1cf4f and the `stack_extend(mrb, ci->nregs)` in 93d802987e722444d0520a8d3f28002841c4f825. Then, the code causing #3504 reappeared again in #3590. The fix for it moved the code dealing with the block in OP_SUPER from below the `cipush` to above the `cipush` in d9fb8b69b0621e8cd2c7c43fd8511a83718d7e45. The `if (bidx >= ci->nregs) { ... }` from then on works with the original callinfo and not the pushed one. `ci->nregs` needed to be modified for the pushed one because it is initialized to 0. But for the original ci it is propertly set and a check is not needed.
2017-08-12Extended stack always based on ci->nregsChristopher Aue
2017-08-12Refactored variable usage in OP_SEND and OP_SUPERChristopher Aue
2017-08-11Remove some empty lines; ref #3778Yukihiro "Matz" Matsumoto
2017-08-11Refactored OP_SEND and OP_SUPER and calculate argc right at the topChristopher Aue
2017-08-11Defer `mid` update after `unshift`; ref #3776Yukihiro "Matz" Matsumoto
2017-08-11Merge branch 'super_method_missing_fix' of ↵Yukihiro "Matz" Matsumoto
https://github.com/christopheraue/mruby into christopheraue-super_method_missing_fix
2017-08-11Silence integer type conversion warnings.Yukihiro "Matz" Matsumoto
2017-08-10Fixed calling missing method through super with 126 argsChristopher Aue
2017-08-09Replaced tabs with spacesChristopher Aue
2017-08-09Wrong blkargs pos for vararg; ref #3768Yukihiro "Matz" Matsumoto
2017-08-09The block argument offset saved in the env was wrong; fix #3768Yukihiro "Matz" Matsumoto
When the method takes variable number of argument (`argc = -1`), the block argument offset should be `-1` not `0`.
2017-08-08Float values divided by zero should honor signs; fix #3766Yukihiro "Matz" Matsumoto
It also fixes unexpected resurrection of #3745 by #3752
2017-08-08Set the current `pc` as the error position in `OP_ERR`; ref #3765Yukihiro "Matz" Matsumoto
2017-08-01Implements `Module::nesting' (15.2.2.3.2); ref #600, #3200Yukihiro "Matz" Matsumoto
2017-07-27Embed small size array elements in the heap.Yukihiro "Matz" Matsumoto
It reduces the memory consumption and sometimes improve the performance as well. For example, the consumed memory size of `bench/bm_ao_render.rb` is reduced from 1.2GB to 1GB, and its total execution time become 18.795 sec from 22.229 sec.
2017-07-27Remove loop from `OP_POPERR`.Yukihiro "Matz" Matsumoto
2017-07-25`0/0` should not be infinity; fix #3752Yukihiro "Matz" Matsumoto
2017-07-24Clear mrb_callinfo struct by zero initializer.Yukihiro "Matz" Matsumoto
2017-07-21Need to unshare env on OP_R_BREAK too.Yukihiro "Matz" Matsumoto
2017-07-21Move NULL check to `mrb_env_unshare()`; ref #3750Yukihiro "Matz" Matsumoto
2017-07-21Should not raise `LocalJumpError` on funcall'ed frame; fix #3750Yukihiro "Matz" Matsumoto
2017-07-19Avoid C undefined behavior of division by zero; close #3745Yukihiro "Matz" Matsumoto
2017-07-18Simplify `mrb_gc_arena_restore()` to reduce overhead.Yukihiro "Matz" Matsumoto
It will no longer shrink arena region. Instead `vm.c` uses a static function `mrb_gc_arena_shrink()` to shrink.
2017-07-12Add `inline` modifier to `cipush()` and `cipop()` functions.Yukihiro "Matz" Matsumoto
2017-07-05Check stack size before accessing env stack; fix #3727Yukihiro "Matz" Matsumoto
2017-07-01`break` should not cross fiber-context boundary; fix #3724Yukihiro "Matz" Matsumoto
2017-07-01`super` may be called from a block; fix #3723Yukihiro "Matz" Matsumoto
2017-06-21Should call `ecall()` before callinfo adjustment; fix #3715Yukihiro "Matz" Matsumoto
2017-06-20#3711 fixMiura Hideki
2017-06-17Store operands to local variables.Yukihiro "Matz" Matsumoto
Mostly for debugging purpose.
2017-06-16Allow `break` from a block called by `mrb_yield`; close #3359Yukihiro "Matz" Matsumoto
This means #3701 is now OK to merge.