summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
AgeCommit message (Collapse)Author
2020-05-04Enable MRB_METHOD_T_STRUCT by default on 32bit GUN/LinuxHorimoto Yasuhiro
Because we can't use the highest 2 bits of function pointers.
2020-03-04Enable MRB_METHOD_T_STRUCT by default on 32bit WindowsSutou Kouhei
Because we can't use the highest 2 bits of function pointers.
2020-01-15Remove broken `MRB_INT16` configuration option.Yukihiro "Matz" Matsumoto
2019-11-19Always enable the rational and complex literalsKOBAYASHI Shuji
I think they can always be enabled because the regular expression literal is always enabled.
2019-09-21Rename MRB_USE_ETEXT_EDATA to MRB_USE_LINK_TIME_RO_DATA_P and support lld ↵Fangrui Song
linked programs In lld linked programs, .rodata comes before .text, thus mrb_ro_data_p will return false for strings in .rodata. Change the lower bound from _etext to __ehdr_start to catch these cases. This works for ld.bfd, gold and lld, and it does not have false positives even if .init_array does not exist. Remove the branch that uses _edata: strings in .data can be modified so this is semantically incorrect. Delete the __APPLE__ branch (its manpages say get_etext() and get_edata() are strongly discouraged). .init_array has been adopted by most ELF platforms to supersede .ctors. Neither _etext nor _edata is used, so rename MRB_USE_ETEXT_EDATA to MRB_USE_EHDR_START.
2019-09-16Remove `MRB_METHOD_TABLE_INLINE`.Yukihiro "Matz" Matsumoto
`MRB_METHOD_TABLE_INLINE` was fragile. It requires `-falign-functions=n`. On platform that uses higher bits of function pointers, you can use new `MRB_METHOD_T_STRUCT` configuration macro.
2019-05-17(Proof of Concept) mruby tuning profiles [ci skip]dearblue
Not only mruby, it is one of the difficult things to adjust the performance vs. memory efficiency of the software. If the approximate target device is divided and the adjustment value for it is prepared by default, it is a good indicator to do fine adjustment. This PR divides into four profiles. ***Caution: There is no basis for the definitions in the patch.*** - `MRB_CONSTRAINED_BASELINE_PROFILE` - for microprocessors. Reduce memory consumption. - `MRB_BASELINE_PROFILE` - Default value of mruby. - `MRB_MAIN_PROFILE` - For desktop computers. Assume that a huge amount of RAM, 10 MiB or more, is on board. - `MRB_HIGH_PROFILE` - for servers. Assume that mruby VM has a long life. As you can see the profile name has been ~~stolen~~ imitated from H.264.
2019-05-15Initial suffix supportUkrainskiy Sergey
2019-04-27Update document for `MRB_USE_CUSTOM_RO_DATA_P`dearblue
2019-04-27Update document for any configurationsdearblue
- (Modify) `MRB_INT16` - (Add) `MRB_INT32` - (Modify) `MRB_INT64` - (Add) `MRB_USE_ETEXT_EDATA` - (Add) `MRB_NO_INIT_ARRAY_START - (Add) `MRB_WITHOUT_FLOAT` - (Add) `MRB_METHOD_CACHE` - (Add) `MRB_METHOD_CACHE_SIZE` - (Add) `MRB_METHOD_TABLE_INLINE - (Add) `MRB_ENABLE_ALL_SYMBOLS`
2019-02-12Disable `Symbol.all_symbols`.Yukihiro "Matz" Matsumoto
2018-12-22Fix MRB_ENDIAN_BIG is always defined, if byte order macro is not defineddearblue
2018-12-21Simplify `MRB_ENDIAN_BIG` macro definition; ref #4190Yukihiro "Matz" Matsumoto
`cpp` does not raise error on undefined macro access in condition.
2018-12-21Define `MRB_ENDIAN_BIG` automatically; ref #4190Yukihiro "Matz" Matsumoto
You had to define this macro on big endian platforms, but it is very error-prone. So define the macro automatically if possible.
2018-01-25Do not use `MRB_METHOD_TABLE_INLINE` by default; fix #3924Yukihiro "Matz" Matsumoto
It was default on Linux. Abandoned for 2 reasons: * some cross-platform compiler defines `__linux__` even on bare metal environment (RTL8196 (MIPS big endian soc) for example). * some compilers do not align functions pointers so that we need to specify `-falign-functions=n` (where n>1). It's not suitable for default configuration. By our measurement, `mrbtest` consumes 400KB less memory. So if your target machine is memory tight, add the following command-line options to `GCC` (unfortunately `clang` does not support `-falign-functions`). `-falign-functions=2 -DMRB_METHOD_TABLE_INLINE`
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-20Add `MRB_METHOD_CACHE` description to `include/mrbconf.h`Yukihiro "Matz" Matsumoto
2017-10-11Fix typoYAMAMOTO Masaya
2017-10-11Add MRB_WITHOUT_FLOATYAMAMOTO Masaya
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-09Replaced tabs with spacesChristopher Aue
2017-07-27Always use `MRB_USE_IV_SEGLIST`.Yukihiro "Matz" Matsumoto
2016-12-07set `MRB_64BIT` if the sizeof(size_t) is 8Kazuho Oku
2016-11-21mruby architecture detectionTomasz Dąbrowski
2015-11-17fix MRB_DISABLE_STDIO typoscremno
2015-11-17DISABLE_STDIO/ENABLE_DEBUG macros to rename; close #3014Yukihiro "Matz" Matsumoto
changes: * rename DISABLE_STDIO -> MRB_DISABLE_STDIO * rename ENABLE_DEBUG -> MRB_ENABLE_DEBUG_HOOK * no more opposite macro definitions (e.g. ENABLE_STDIO, DISABLE_DEBUG). * rewrite above macro references throughout the code. * update documents
2015-09-24UTF-8 string support in coreYukihiro "Matz" Matsumoto
define MRB_UTF8_STRING (in mrbconf.h) to enable UTF-8 support.
2015-09-20Setting up doxygen groupsSeba Gamboa
2014-10-02use __init_array_start to determine readonly data section;Yukihiro "Matz" Matsumoto
b72e94f used _etext and _edata to distinguish C string literals from heap allocated strings, but using _edata, global char arrays may be considered as string literals. to avoid the issue, we have to use __init_array_start, which might be less portable. you can still use _edata, by using MRB_NO_INIT_ARRAY_START.
2014-09-30mrbconf.h option MRB_USE_ETEXT_EDATA to reduce memory.Yukihiro "Matz" Matsumoto
on platforms with _etext and _edata, mruby can distinguish string literals so that it avoids memory allocation to copy them. for example, on my Linux box (x86 32bit), memory consumed by mrbtest decreased from 8,168,203 to 8,078,848 (reduced 88KB).
2014-08-04add MRB_API modifiers to mruby API functionsYukihiro "Matz" Matsumoto
2014-06-16Add fixed state atexit stack feature.take_cheeze
Adds following macros: * MRB_FIXED_STATE_ATEXIT_STACK (not defined by default) * When defined enables fixed state atexit stack. * MRB_FIXED_STATE_ATEXIT_STACK_SIZE (default value: 5) * This macro will be ignored when `MRB_FIXED_STATE_ATEXIT_STACK` isn't defined. * When `mrb_state_atexit` is called more than this value it will raise runtime error.
2014-05-18Remove space.yui-knk
2014-03-01revert changes to mrbconf.hYukihiro "Matz" Matsumoto
2014-03-01use C style comments instead of C++ style commentscubicdaiya
According to CONTRIBUTING.md, Don't use C++ style comments /* This is the prefered comment style */ Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2013-12-24remove MRB_IREP_ARRAY_INIT_SIZE which is no longer usedYukihiro "Matz" Matsumoto
2013-11-25remove MRB_PARSER_BUF_SIZE configuration; close #1596Yukihiro "Matz" Matsumoto
2013-11-22Make mrb->arena variable sized. Use MRB_GC_FIXED_ARENA for old behavior.Yukihiro "Matz" Matsumoto
You will not see "arena overflow" error anymore, but I encourage gem authors to check your gems with MRB_GC_FIXED_ARENA to avoid memory broat.
2013-08-08allow turning off GC generational mode by default by ↵Yukihiro "Matz" Matsumoto
MRB_GC_TURN_OFF_GENERATIONAL; #1447
2013-06-10restructure header files; move non config lines away from mrbconf.hYukihiro "Matz" Matsumoto
2013-05-26Add MRB_WORD_BOXING mode (represent mrb_value as a word)kimu_shu
2013-05-11Potential fix for 'inline' macro redefinition error - VS2012 C++Ryan Scott
2013-04-29always use unsigned int as mrb_bool even in C++Yukihiro "Matz" Matsumoto
2013-04-26quote error message in mrbconf.h to stop warningYukihiro "Matz" Matsumoto
2013-04-26Add a descrption of MRB_INT16.Masaki Muranaka
2013-04-26Avoid defining MRB_INT16 adn MRB_INT64 at the same time. This is a poka-yoke.Masaki Muranaka
2013-03-29Remove str_to_mrb_int(). There is some reasons.Masaki Muranaka
It is not used in the core. It does not have mrb_ prefix. strtol() is slightly heavy and we have similar API.
2013-03-29Move TRUE/FALSE existence checks.Masaki Muranaka
2013-03-24Include stddef.h. It is required by size_t. In case you include stdio.h, ↵Masaki Muranaka
stddef.h is included indirectly.
2013-03-24resolve conflictYukihiro Matz Matsumoto