summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
AgeCommit message (Collapse)Author
2021-09-25mrbconf.h: rename a configuration macro for no truncate floats.Yukihiro "Matz" Matsumoto
Rename `MRB_WORDBOX_USE_HEAP_FLOAT` to `MRB_WORDBOX_NO_FLOAT_TRUNCATE'.
2021-09-09value.h: add configuration macros around `mrb_ro_data_p()`; close #5547Yukihiro "Matz" Matsumoto
- `MRB_USE_ETEXT_RO_DATA_P`: use `etext` and `edata` - `MRB_NO_DEFAULT_RO_DATA_P`: not use the default `mrb_ro_data_p()`
2021-08-26boxing_word.h: rename configuration macro name.Yukihiro "Matz" Matsumoto
`MRB_WORDBOX_USE_HEAP_FLOAT` instead of `MRB_USE_FLOAT_FULL_PRECISION`.
2021-08-26value.h: reconstruct `mrb_ro_data_p()`.Yukihiro "Matz" Matsumoto
* use predefined `mrb_ro_data_p()` for user-mode Linux and macOS * define `MRB_LINK_TIME_RO_DATA_P` if predefined one is used * configure macro `MRB_USE_LINK_TIME_RO_DATA_P` is no longer used * contributions for new platforms are welcome
2021-08-21boxing_word.h: embed `mrb_float` in `mrb_value` if possible.Yukihiro "Matz" Matsumoto
Embedding reduce memory consumption, sacrificing precision. It clips least significant 2 bits from `mrb_float`, so if you need to keep float precision, define `MRB_USE_FLOAT_FULL_PRECISION`. `MRB_WORD_BOXING` and `MRB_INT64`: `mrb_float` (`double`) is embedded in `mrb_value` clipped last 2 bits. `MRB_WORD_BOXING` and `MRB_INT64` and `MRB_USE_FLOAT_FULL_PRECISION`: `mrb_float` is allocated in the heaps wrapped by `struct RFloat`. `MRB_WORD_BOXING` and `MRB_INT32` and `MRB_USE_FLOAT32`: `mrb_float` (`float`) is embedded in `mrb_value` clipped last 2 bits. In addition, to reserve bit space in the `mrb_value`, maximum inline symbol length become 4 (instead of 5) in the configuration. `MRB_WORD_BOXING` and `MRB_INT32`: Assume `MRB_USE_FLOAT_FULL_PRECISION` and allocate Float values in heap.
2021-07-25Remove redundant include headers.Yukihiro "Matz" Matsumoto
- stdlib.h - stddef.h - stdint.h - stdarg.h - limits.h - float.h
2021-05-13Update `mrb_bool` definition; close #2385Yukihiro "Matz" Matsumoto
- move `TRUE/FALSE` definition from `mrbconf.h` (not configurable) - use C/C++ definition of boolean type for `mrb_bool` The fix is originally written by @take-cheeze.
2021-04-16feat(CI): add the GitHub Super LinterJohn Bampton
The GitHub Super Linter is a more robust and better supported tool than the current GitHub Actions we are using. Running these checks: ERROR_ON_MISSING_EXEC_BIT: true VALIDATE_BASH: true VALIDATE_BASH_EXEC: true VALIDATE_EDITORCONFIG: true VALIDATE_MARKDOWN: true VALIDATE_SHELL_SHFMT: true VALIDATE_YAML: true https://github.com/marketplace/actions/super-linter https://github.com/github/super-linter Added the GitHub Super Linter badge to the README. Also updated the pre-commit framework and added more documentation on pre-commit. Added one more pre-commit check: check-executables-have-shebangs Added one extra check for merge conflicts to our GitHub Actions. EditorConfig and Markdown linting. Minor grammar and spelling fixes. Update linter.yml
2020-12-05Allow obsoluted `MRB_METHOD_T_STRUCT`KOBAYASHI Shuji
2020-11-26Small refactoring regarding symbols for clarity.Yukihiro "Matz" Matsumoto
2020-11-25Remove no longer used `MRB_IV_SEGMENT_SIZE; close #5188 [ci skip]Yukihiro "Matz" Matsumoto
2020-11-22Remove `mrb_str_buf_new()` and `MRB_STR_BUF_MIN_SIZE`; close #5171Yukihiro "Matz" Matsumoto
2020-11-21Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163KOBAYASHI Shuji
| Previous Name | New Name | |------------------------------|-------------------------| | MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI | | MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION | | MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK | | MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING | | MRB_DISABLE_STDIO | MRB_NO_STDIO | | ENABLE_LINENOISE | MRB_USE_LINENOISE | | ENABLE_READLINE | MRB_USE_READLINE | | DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE | | DISABLE_GEMS | MRB_NO_GEMS | * `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed. * `MRB_` prefix is added to those without. * The previous names can also be used for compatibility.
2020-10-12Explain `MRB_USE_MALLOC_TRIM`; ref #5069Yukihiro "Matz" Matsumoto
2020-10-12Remove `MRB_NO_FLOAT_INLINE` and `MRB_WBOX_FLOAT_INLINE` configuration.Yukihiro "Matz" Matsumoto
They are not used from the beginning.
2020-10-12Rename float configuration option names.Yukihiro "Matz" Matsumoto
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT` - `MRB_USE_FLOAT` => `MRB_USE_FLOAT32` The former is to use `USE_XXX` naming convention. The latter is to make sure `float` is 32bit float and not floating point number in general.
2020-10-12Rename `MRB_METHOD_T_STRUCT` to `MRB_USE_METHOD_T_STRUCT`.Yukihiro "Matz" Matsumoto
It's the first change of renaming configuration options to `MRB_XXX` to `MRB_USE_XXX` or `MRB_NO_XXX`.
2020-10-12Change default `mrb_value` representation to `MRB_WORD_BOXING`.Yukihiro "Matz" Matsumoto
2020-10-12Add static check for `MRB_USE_FLOAT` and `MRB_WITHOUT_FLOAT`.Yukihiro "Matz" Matsumoto
2020-10-12Change default boxing scheme from `MRB_NO_BOXING`.Yukihiro "Matz" Matsumoto
On 64bit platforms: `MRB_NAN_BOXING` On 32bit platforms: `MRB_WORD_BOXING` On debugging: `MRB_NO_BOXING`
2020-10-12You don't need to keep index in local variables info in `irep`.Yukihiro "Matz" Matsumoto
2020-10-12Enable method cache by default.Yukihiro "Matz" Matsumoto
Introduced `MRB_NO_METHOD_CACHE` which is inverse of `MRB_METHOD_CACHE` that should be enabled intestinally. In addition, the default cache is made bigger (128 -> 256).
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