summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
AgeCommit message (Collapse)Author
2018-09-19Remove implicit conversion using `to_str` method.Yukihiro "Matz" Matsumoto
We have added internal convenience method `__to_str` which does string type check.
2018-09-19Remove implicit conversion using `to_int` method.Yukihiro "Matz" Matsumoto
The ISO standard does not include implicit type conversion using `to_int`. This implicit conversion often causes vulnerability. There will be no more attacks like #4120. In addition, we have added internal convenience method `__to_int` which does type check and conversion (from floats).
2018-08-29Fix type of `eidx` and `ridx` from `uint8_t` to `uint16_t`; fix #4088Yukihiro "Matz" Matsumoto
A byte was too small to hold ensure&rescue stacks indexes.
2018-08-29Move back `mrb_define_alias` to `mruby.h` to avoid breakage.Yukihiro "Matz" Matsumoto
2018-08-25Reduce integer casting warnings.Yukihiro "Matz" Matsumoto
2018-08-25Fix misspelling words in commentsKazuhiro Sera
2018-08-25Remove `nregs` member from `mrb_callinfo`.Yukihiro "Matz" Matsumoto
This means reducing one word per a call frame.
2018-07-30New bytecode implementation of mruby VM.Yukihiro "Matz" Matsumoto
2018-06-20Export mrb_utf8_from_locale() and mrb_locale_from_utf8()Kouhei Sutou
2018-06-07Export `stack_extend` function (renamed `mrb_stack_extend`); fix #3219Yukihiro "Matz" Matsumoto
This change is required to support #4038.
2018-04-10Fix build error on Windows with MRB_BUILD_AS_DLLKouhei Sutou
Error message: C:\projects\groonga\vendor\mruby-source\include\mruby.h(1098): error C2375: 'mrb_gc_arena_save' : redefinition; different linkage [C:\projects\groonga\vendor\mruby\mruby.vcxproj] C:\projects\groonga\vendor\mruby-source\include\mruby.h(1083) : see declaration of 'mrb_gc_arena_save' C:\projects\groonga\vendor\mruby-source\include\mruby.h(1099): error C2375: 'mrb_gc_arena_restore' : redefinition; different linkage [C:\projects\groonga\vendor\mruby\mruby.vcxproj] C:\projects\groonga\vendor\mruby-source\include\mruby.h(1084) : see declaration of 'mrb_gc_arena_restore'
2018-03-16Update `mrb_get_args` reference comment; ref #3963Yukihiro "Matz" Matsumoto
2018-03-04fix && to &! in mrb_get_args()dearblue
2018-03-04add forced block arguments feature to mrb_get_argsdearblue
2018-03-02Add `mrb_fiber_alive_p` to C API.Yukihiro "Matz" Matsumoto
2018-01-16Set the mruby-1.4.0 release date to `2018-1-16`.1.4.0Hiroshi Mimaki
2017-12-12Merge pull request #3882 from mattn/fix-filenameYukihiro "Matz" Matsumoto
use filename in locale
2017-12-12fix compilation errorYasuhiro Matsumoto
2017-12-12Modifying frozen objects will raise `FrozenError`.Yukihiro "Matz" Matsumoto
`FrozenError` is a subclass of `RuntimeError` which used to be raised. [Ruby2.5]
2017-12-06`mrb_method_search_vm()` should gives the defined class.Yukihiro "Matz" Matsumoto
Otherwise `super` may call a wrong method.
2017-11-20Add `MRB_METHOD_TABLE_INLINE` option.Yukihiro "Matz" Matsumoto
Now the method tables (in classes/modules and caches) keeps C function pointers without wrapping in `struct RProc` objects. For the sake of portability, `mrb_method_t` is represented by the struct and union, but if the most significant bit of the pointer is not used by the platform, `mrb_method_t` should be packed in `uintptr_t` to reduce memory usage. `MRB_METHOD_TABLE_INLINE` is turned on by default for linux.
2017-11-04Merge branch 'master' of github.com:mruby/mrubyYAMAMOTO Masaya
2017-10-28remove `inline` from replacement `memcpy`&`memset`Yukihiro "Matz" Matsumoto
2017-10-17Remove `mrb_vm_get_argc`; ref #3826Yukihiro "Matz" Matsumoto
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-09-27fix: src\vm.c(438): warning C4244: '=': conversion from 'mrb_int' to 'int', ↵Tomasz Dąbrowski
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-08-26fix mrbgems/mruby-range-ext/src/range.c:142:71: error: use of undeclared ↵Tomasz Dąbrowski
identifier 'FLT_EPSILON'
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-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-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-06-23Silence `mrbmemcpy` and `mrbmemset` warnings.Yukihiro "Matz" Matsumoto
2017-06-15Add helper functions to use gdb reverse-next.Yukihiro "Matz" Matsumoto
On my machine, gdb reverse-next does not work with memcpy and memset. Add naive implementation of those functions to override.
2017-06-03Revert "Simplify rescue stack management; ref #3683"Yukihiro "Matz" Matsumoto
This reverts commit eb5a606fe209944d0757301edb331ed7ff0fd31f and 079f310fbc9c23b97f062230c32bd91ac65e4835. The rescue stack works differently from ensure stack, so the change caused #3686 and #3688. It might take long to solve the problems, so that I would revert the changes for now. Fix #3688
2017-06-01Simplify rescue stack management; ref #3683Yukihiro "Matz" Matsumoto
2017-06-01Simplify ensure stack management; fix #3683Yukihiro "Matz" Matsumoto
2017-05-23Simplify backtrace mechanism; fix #3633 #3634 #3644Yukihiro "Matz" Matsumoto
Instead of preserving a backtrace in `mrb_state`, `mrb_exc_set` keeps packed backtrace in an exception object. `#backtrace` unpacks it to an array of strings.
2017-05-23Remove class info from backtrace lines.Yukihiro "Matz" Matsumoto
2017-04-19Use trampoline technique for `instance_exec`; ref #3359Yukihiro "Matz" Matsumoto
A new function `mrb_yield_cont()` is provided. You have to call it at the end of a C defined method, e.g. `return mrb_yield_cont()`.
2017-02-15Preallocate SystemStackError; ref #3421Yukihiro "Matz" Matsumoto
2017-02-14Do not use mrb_funcall() if Hash#default is not overridden; ref #3421Yukihiro "Matz" Matsumoto
This change reduces the recursion level, but does not solve the stack overflow issue entirely.
2017-01-11Raises Exception if raising exception class is redefinedYukihiro "Matz" Matsumoto
close #3384 This issue was reported by https://hackerone.com/brakhane
2017-01-06Update Copyright to 2017Daniel Bovensiepen
Signed-off-by: Daniel Bovensiepen <[email protected]>
2016-11-28pre-allocate arena overflow errorYukihiro "Matz" Matsumoto
2016-11-27replace _cstr by _lit for litral C strings; ref #3300Yukihiro "Matz" Matsumoto
2016-11-24Fixed Range.size to use proper floating point toleranceTomasz Dąbrowski
2016-11-24Fixes for compiling mruby as C++Tomasz Dąbrowski