summaryrefslogtreecommitdiffhomepage
path: root/include
AgeCommit message (Collapse)Author
2017-11-04Merge branch 'master' of github.com:mruby/mrubyYAMAMOTO Masaya
2017-11-03Should not use `FSHARED` state for string from `irep` pools; fix #3829Yukihiro "Matz" Matsumoto
This strings in `irep` pools may be freed forcefully in `mrb_irep_free`. This commit probably fixes #3817 as well.
2017-10-31Need to mark fibers referenced from `env`; fix #3837Yukihiro "Matz" Matsumoto
The issue #3837 is a regression of #3819. I was mistakenly removed a important code to mark fibers from `env`.
2017-10-28Add parentheses to pacify a warning.Yukihiro "Matz" Matsumoto
2017-10-28Heavily refactored how lexical scope links are implemented; fix #3821Yukihiro "Matz" Matsumoto
Instead of `irep` links, we added a `upper` link to `struct RProc`. To make a space for the `upper` link, we moved `target_class` reference. If a `Proc` does not have `env`, `target_class` is saved in an `union` shared with `env` (if a `Proc` has env, you can tell it by `MRB_PROC_ENV_P()). Otherwise `target_class` is referenced from `env->c`. We removed links in `env` as well. This change removes 2 members from `mrb_irep` struct, thus saving 2 words per method/proc/block. This also fixes potential memory leaks due to the circular references caused by a link from `mrb_irep`.
2017-10-28remove `inline` from replacement `memcpy`&`memset`Yukihiro "Matz" Matsumoto
2017-10-28Remove MRB_API from `mrb_env_unshare()`Yukihiro "Matz" Matsumoto
2017-10-17Remove `mrb_vm_get_argc`; ref #3826Yukihiro "Matz" Matsumoto
2017-10-11Fix typoYAMAMOTO Masaya
2017-10-11Add MRB_WITHOUT_FLOATYAMAMOTO Masaya
2017-10-10correctly handle *splat arguments in mrb_get_argc, also add mrb_vm_get_argc ↵Tomasz Dąbrowski
and mrb_get_argv Fixes #3825
2017-10-01Add new type of shared string: `RSTR_FSHARED`.Yukihiro "Matz" Matsumoto
`RSTR_FSHARED` use frozen strings as shared body instead of `struct mrb_shared_string`. This reduces allocation from literal strings.
2017-09-29Cut links from `irep` in heaps finalization.Yukihiro "Matz" Matsumoto
2017-09-27fix: src\vm.c(438): warning C4244: '=': conversion from 'mrb_int' to 'int', ↵Tomasz Dąbrowski
possible loss of data
2017-09-27fix: src\numeric.c(1215): warning C4244: 'function': conversion from ↵Tomasz Dąbrowski
'mrb_int' to 'int', possible loss of data
2017-09-27fix: src\kernel.c(874): warning C4244: 'function': conversion from 'mrb_int' ↵Tomasz Dąbrowski
to 'int', possible loss of data
2017-09-27fix: src\hash.c(27): warning C4244: '=': conversion from 'mrb_int' to ↵Tomasz Dąbrowski
'khint_t', possible loss of data
2017-09-27fix: src\array.c(86): warning C4244: '=': conversion from 'mrb_int' to ↵Tomasz Dąbrowski
'uint32_t', possible loss of data
2017-09-27fix: mrbgems\mruby-kernel-ext\src\kernel.c(114): warning C4244: 'function': ↵Tomasz Dąbrowski
conversion from 'mrb_int' to 'int', possible loss of data
2017-09-27fix: include\mruby/gc.h(43): warning C4200: nonstandard extension used: ↵Tomasz Dąbrowski
zero-sized array in struct/union
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-09-01Make the default integer size to be `MRB_INT64` on 64bit systems; close #3800Yukihiro "Matz" Matsumoto
Unless `MRB_NAN_BOXING` is specified.
2017-08-28Remove integer type mismatch warnings from parse.y.Yukihiro "Matz" Matsumoto
2017-08-26fix mrbgems/mruby-range-ext/src/range.c:142:71: error: use of undeclared ↵Tomasz Dąbrowski
identifier 'FLT_EPSILON'
2017-08-26Remove unused `mrb_obj_iv_ifnone()` from API.Yukihiro "Matz" Matsumoto
2017-08-26Keep `Range` class in `mrb_state` structure for performance.Yukihiro "Matz" Matsumoto
2017-08-22Added method cache.Yukihiro "Matz" Matsumoto
To enable method cache, define `MRB_METHOD_CACHE` or `MRB_METHOD_CACHE_SIZE`. The cache size must be power of 2. The default cache size is 128. The measurement: I measured simple benchmarks found in benchmark/ directory. With method cache enabled, we gained 6-8% performance improvement, with 97-99% cache hit rate.
2017-08-22(Try to) fix mixture of `int` and `size_t` in UTF-8 conversion.Yukihiro "Matz" Matsumoto
This only effects VC.
2017-08-18Reduce signed/unsigned comparison warnings; ref #3785Yukihiro "Matz" Matsumoto
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-18Improve Array structureMiura Hideki
2017-08-12Reduce integer type mismatch warnings in VC.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-11Remove `mrb_ary_len` function. Use `RARRAY_LEN` instead.Yukihiro "Matz" Matsumoto
2017-08-11Update document comment of array C API functions.Yukihiro "Matz" Matsumoto
2017-08-11The type of `ARY_EMBED_LEN` should be `mrb_int`.Yukihiro "Matz" Matsumoto
2017-08-09Replaced tabs with spacesChristopher Aue
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-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-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-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-11`POSFIXABLE` and `NEGFIXABLE` should take one argument.Yukihiro "Matz" Matsumoto
2017-07-10Resurrect `POSFIXABLE` and `NEGFIXABLE`; ref 9186828Yukihiro "Matz" Matsumoto
2017-07-07Add fallback definitions of `DBL_EPSILPN` and `LDBL_EPSILON`; fix #3733Yukihiro "Matz" Matsumoto
This is a workaround for mingw-w64 (5.3.1) bug.
2017-07-06`FIXABLE_FLOAT()` fails sometimes in `MRB_INT64` environment.Yukihiro "Matz" Matsumoto
2017-07-04Merge pull request #3726 from mruby/stableYukihiro "Matz" Matsumoto
mruby-1.3.0
2017-07-04Set the mruby-1.3.0 release date to `2017-7-4`.1.3.0Hiroshi Mimaki