summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
AgeCommit message (Collapse)Author
2019-04-10Remove `MRB_API` from `mrb_instance_new`.Yukihiro "Matz" Matsumoto
2019-04-10Merge pull request #4367 from shuujii/extract-frozen-checking-to-functionYukihiro "Matz" Matsumoto
Extract frozen checking to function
2019-04-09Extract frozen checking to functionKOBAYASHI Shuji
2019-04-08Remove unneeded function prototypesKOBAYASHI Shuji
2019-04-04Update version and release date.2.0.1Hiroshi Mimaki
`mruby 2.0.1 (2019-4-4)`
2019-03-29va_list is defined in stdarg.h.Tomoyuki Sahara
fixes build on OpenBSD.
2019-03-26Fix missing `MRB_API` prefix for functions below; clse #4267Yukihiro "Matz" Matsumoto
Functions to add prototypes to headers: * mrb_ary_splice() * mrb_notimplement() * mrb_vformat() * mrb_cstr_to_dbl() * mrb_cstr_to_inum() Functions to be made `static` (`MRB_API` was not needed): * mrb_mod_module_function() * mrb_obj_hash() * mrb_str_len_to_inum() Functions to remove `MRB_API` from definitions (referenced from within `libmruby`): * mrb_mod_cv_defined() * mrb_mod_cv_get() * mrb_f_send()
2019-02-17Fix typosyui-knk
2019-02-12Implement inline packed symbols.Yukihiro "Matz" Matsumoto
Small symbols with all alphanumeric characters (<5) are packed in 32bit symbol integer a la base64. This means those small symbols are not listed in `Symbol.all_symbols`.
2019-02-06Implement symbol hash table to boost `find_symbol`.Yukihiro "Matz" Matsumoto
In 4174e02, we removed the symbol hash table from `mrb_state` but `find_symbol` was too slow with linear search. My performance estimation was wrong. So we implemented a new compact hash table for symbols.
2019-02-06Remove symbol hash table from `mrb_state` structure.Yukihiro "Matz" Matsumoto
Use linear search instead. Number of symbols is usually small (<1K), so we don't need performance boost from hash tables. In our benchmark measurement, hash tables consumes 790KB for `build/full-debug/mrbtest`.
2018-12-23Suppress __STDC_VERSION__ warns for C++dearblue
2018-12-18Fix macro arguments with parendearblue
2018-11-20Restrict total recursion number of `ecall()`; fix #3789Yukihiro "Matz" Matsumoto
2018-11-19Remove implicit conversion using `to_str` method; fix #3854Yukihiro "Matz" Matsumoto
We have added internal convenience method `__to_str` which does string type check. The issue #3854 was fixed but fundamental flaw of lack of stack depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA` for workaround.
2018-11-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-09-25Fix minor typos (#4126)Daniel Varga
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