summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
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-12Reduce integer type mismatch warnings in VC.Yukihiro "Matz" Matsumoto
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-11Remove an unused argument from `each_backtrace_func`.Yukihiro "Matz" Matsumoto
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-11Remove unnecessary inline function `ary_elt`.Yukihiro "Matz" Matsumoto
And the function does not conform the naming convention anyway.
2017-08-11Avoid possible data loss by using `ptrdiff_t`.Yukihiro "Matz" Matsumoto
2017-08-11Should not call `to_str` in `mrb_vformat`; fix #3773Yukihiro "Matz" Matsumoto
2017-08-10Fixed calling missing method through super with 126 argsChristopher Aue
2017-08-10Remove redundant `flo_hash` function.Yukihiro "Matz" Matsumoto
`flo_hash` implemented `15.2.8.3.18` but `Kernel#hash` (15.3.1.3.15) now works for numbers.
2017-08-10Use standard hash functions in `mrb_hash_ht_hash_func`.Yukihiro "Matz" Matsumoto
2017-08-10Normalize float numbers before calculating a hash value.Yukihiro "Matz" Matsumoto
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-08Check if `ptr` is NULL before calling `memset`; fix #3765Yukihiro "Matz" Matsumoto
2017-08-05Prevented resizing just created hashes in specific size rangesChristopher Aue
2017-08-04Improved speed of creating new hash tablesChristopher Aue
2017-08-05`proc->body.irep` may be NULL; fix #3761Yukihiro "Matz" Matsumoto
2017-08-05Fixed heap buffer overflow in `mrb_ary_unshift_m`; fix #3760Yukihiro "Matz" Matsumoto
2017-08-02Now `local_variables` works when for closures; fix #3710Yukihiro "Matz" Matsumoto
2017-08-01Better class name management.Yukihiro "Matz" Matsumoto
The change removes several internal instance variables used by class name management. The variables `__classid__` and `__classpath__` are no longer available. `__outer__` is used only for unnamed outer classes/modules (and will be removed after they are named). [Important note] Along with this change we removed several public functions. - mrb_class_outer_module() - mrb_class_sym() We believe no one have used those functions, but if you do, please ask us for the workaround.
2017-08-01Cosmetic changes (removing spaces before `*` in return types).Yukihiro "Matz" Matsumoto
2017-08-01Move naming unnamed classes/modulesYukihiro "Matz" Matsumoto
From `mrb_mod_const_set` to `mrb_const_set`.
2017-08-01Reimplement constant look-up rule to follow lexical scoping.Yukihiro "Matz" Matsumoto
This update fix CRuby scoping incompatibility; close #600; close #3200
2017-08-01Implements `Module::nesting' (15.2.2.3.2); ref #600, #3200Yukihiro "Matz" Matsumoto
2017-07-28Extended Module#const_get to support class pathsChristopher Aue
2017-07-28Added mrb_str_index to the mrb APIChristopher Aue
2017-07-27Rename `MRB_SEGMENT_SIZE` to `MRB_IV_SEGMENT_SIZE`.Yukihiro "Matz" Matsumoto
2017-07-27Always use `MRB_USE_IV_SEGLIST`.Yukihiro "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-26`(0).div(0.0)` should be NaN; fix #3754Yukihiro "Matz" Matsumoto
2017-07-25`(0.0).div(0)` should not be infinity; fix #3753Yukihiro "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-19Avoid constant-set duplication; ref #3747Yukihiro "Matz" Matsumoto
2017-07-19Merge branch 'const_set_mod_to_s' of https://github.com/christopheraue/mruby ↵Yukihiro "Matz" Matsumoto
into christopheraue-const_set_mod_to_s
2017-07-18Fixed Module#to_s and #name for #const_set modulesChristopher Aue