summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-11-24Merge pull request #5178 from abinoam/fix_mruby_config_settingYukihiro "Matz" Matsumoto
Fix #5177 by setting MRUBY_CONFIG early
2020-11-23Fix #5177 - set MRUBY_CONFIG earlyAbinoam Praxedes Marques Junior
2020-11-23Merge pull request #5184 from dearblue/embedded-directiveYukihiro "Matz" Matsumoto
Avoid warnings from clang's "-Wembedded-directive"
2020-11-23Avoid warnings from clang's "-Wembedded-directive"dearblue
If it gives clang-11.0 `-Wembedded-directive`, a warning will be reported in `include/mruby/boxing_nan.h`. ``` include/mruby/boxing_nan.h:48:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] include/mruby/boxing_nan.h:52:2: warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] ``` The cause of this is #5117. ref. e993b83c509912f2d90ffece32c969a642f5df01
2020-11-23Merge pull request #5180 from wataash/fix-unintended-variable-shadowingYukihiro "Matz" Matsumoto
Fix unintended variable shadowing
2020-11-23Merge pull request #5181 from ↵Yukihiro "Matz" Matsumoto
shuujii/raise-an-exception-instead-of-exiting-when-mrbc-fails Raise an exception instead of exiting when `mrbc` fails
2020-11-23Merge pull request #5183 from shuujii/change-output-condition-in-_ppYukihiro "Matz" Matsumoto
Change output condition in `_pp`
2020-11-23Merge pull request #5182 from ↵Yukihiro "Matz" Matsumoto
shuujii/use-local-variables-instead-of-top-level-constants-in-boxing.rb Use local variables instead of top level constants in `boxing.rb` [ci skip]
2020-11-23Change output condition in `_pp`KOBAYASHI Shuji
* Output even with `rake -v` (to help debugging) * Not output when `rake -s`
2020-11-23Use local variables instead of top level constants in `boxing.rb` [ci skip]KOBAYASHI Shuji
2020-11-23Raise an exception instead of exiting when `mrbc` failsKOBAYASHI Shuji
2020-11-23Fix unintended variable shadowingWataru Ashihara
2020-11-22Remove `mrb_str_buf_new()` and `MRB_STR_BUF_MIN_SIZE`; close #5171Yukihiro "Matz" Matsumoto
2020-11-22Strictly speaking `NULL + 0` is a undefined behavior; ref #5157Yukihiro "Matz" Matsumoto
2020-11-22Merge pull request #5173 from shuujii/refine-build-log-for-generated-filesYukihiro "Matz" Matsumoto
Refine build log for generated files
2020-11-22Merge pull request #5174 from dearblue/docYukihiro "Matz" Matsumoto
Add brief explanation about `bin/mruby`; ref #5157 [ci skip]
2020-11-22Add brief explanation about `bin/mruby`; ref #5157 [ci skip]dearblue
2020-11-22Refine build log for generated filesKOBAYASHI Shuji
* Output `GEN` log for generated files * `MRBC` log is outputted one for each `mrbc` execution #### Before this patch: ```console CC src/array.c -> build/host/src/array.o (snip) GEN mrblib/*.rb -> build/host/mrblib/mrblib.c MRBC mrblib/00class.rb MRBC mrblib/10error.rb (snip) CC mrbgems/mruby-time/src/time.c -> build/host/mrbgems/mruby-time/src/time.o MRBC mrbgems/mruby-time/mrblib/time.rb (snip) CC mrbgems/mruby-socket/test/sockettest.c -> build/host/mrbgems/mruby-socket/test/sockettest.o MRBC mrbgems/mruby-socket/test/addrinfo.rb MRBC mrbgems/mruby-socket/test/basicsocket.rb (snip) ``` #### After this patch: ```console GEN build/presym GEN build/presym.inc CC src/array.c -> build/host/src/array.o (snip) GEN mrblib/*.rb -> build/host/mrblib/mrblib.c MRBC mrblib/00class.rb mrblib/10error.rb (snip) CC mrbgems/mruby-time/src/time.c -> build/host/mrbgems/mruby-time/src/time.o GEN build/host/mrbgems/mruby-time/gem_init.c MRBC mrbgems/mruby-time/mrblib/time.rb (snip) CC mrbgems/mruby-socket/test/sockettest.c -> build/host/mrbgems/mruby-socket/test/sockettest.o GEN build/host/mrbgems/mruby-socket/gem_test.c MRBC mrbgems/mruby-socket/test/addrinfo.rb MRBC mrbgems/mruby-socket/test/basicsocket.rb (snip) ```
2020-11-22Merge pull request #5172 from ↵Yukihiro "Matz" Matsumoto
shuujii/move-global-function-for-build-to-lib-mruby-core_ext.rb Move global function for build to `lib/mruby/core_ext.rb`
2020-11-22Merge pull request #5170 from dearblue/gcmarkYukihiro "Matz" Matsumoto
Fix GC mark leaks for `MRB_TT_BREAK`; fix #5168
2020-11-22Move global function for build to `lib/mruby/core_ext.rb`KOBAYASHI Shuji
Because `_pp` is originally defined in `lib/mruby/core_ext.rb`, other global functions are moved to the file.
2020-11-22Fix GC mark leaks for `MRB_TT_BREAK`; fix #5168dearblue
2020-11-22Merge pull request #5169 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-size-of-local-variable-array-in-struct-dumped-file Fix size of local variable array in struct dumped file
2020-11-22Fix size of local variable array in struct dumped fileKOBAYASHI Shuji
2020-11-22Merge pull request #5167 from dearblue/singleton-methodYukihiro "Matz" Matsumoto
Improved `Object#define_singleton_method`
2020-11-21Merge pull request #5166 from shuujii/rename-MRB_ENABLE-DISABLE_-to-MRB_USE-NO_Yukihiro "Matz" Matsumoto
Rename `MRB_{ENABLE,DISABLE}_` to `MRB_{USE,NO}_`; close #5163
2020-11-21Improved `Object#define_singleton_method`dearblue
Integrate the implementation with `Module#define_method`. - Introduce the internal function `mrb_mod_define_method_m()` (no static) - The `Object#define_singleton_method` method can now accept a second argument
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-11-21Merge pull request #5157 from dearblue/detect-rb-mrbYukihiro "Matz" Matsumoto
Allow to mixed and specify `*.rb` and `*.mrb` in `bin/mruby`
2020-11-21Allow to mixed and specify `*.rb` and `*.mrb` in `bin/mruby`dearblue
It is not decides by the extension. In order to be recognized as a `.mrb` file, the following three points must be satisfied: - File starts with "RITE" - At least `sizeof(struct rite_binary_header)` bytes can be read - `NUL` is included in the first 64 bytes of the file If these are not met, it is judged as a text file and it is processed as a Ruby script. The `bin/mruby -b` switch is still available which treats the given file as a `.mrb` file. New `MRB_API` function: - `include/mruby/compile.h` and `mrbgems/mruby-compiler/core/parse.y` - `mrb_load_detect_file_cxt()` (remove with `MRB_DISABLE_STDIO`) NOTE: - Even script files now always open in binary mode for `bin/mruby`. The `\r\n` is handled by the `nextc()` function already, so there is no problem even on Windows. - The `nextc0()` function in `mrbgems/mruby-compiler/core/parse.y` can now specify a string buffer and a file pointer at the same time. In this case, get it from the string buffer first. This patch includes modifies by comment of https://github.com/mruby/mruby/pull/5157.
2020-11-21Merge pull request #5165 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-incorrect-build-name-and-simplify-build_config-boxing.rb Fix incorrect build name and simplify `build_config/boxing.rb` [ci skip]
2020-11-21Fix incorrect build name and simplify `build_config/boxing.rb` [ci skip]KOBAYASHI Shuji
`boxing-nan-m64` was duplicated.
2020-11-21Merge pull request #5164 from ↵Yukihiro "Matz" Matsumoto
shuujii/automatically-enable-MRB_ENABLE_DEBUG_HOOK-if-mruby-bin-debugger-is-used Automatically enable `MRB_ENABLE_DEBUG_HOOK` if `mruby-bin-debugger` is used
2020-11-21Automatically enable `MRB_ENABLE_DEBUG_HOOK` if `mruby-bin-debugger` is usedKOBAYASHI Shuji
2020-11-21Remove `-Wdeclaration-after-statement` from gcc options; #5159Yukihiro "Matz" Matsumoto
2020-11-21Remove 2 restrictions from `CONTRIBUTING.md`; close #5159Yukihiro "Matz" Matsumoto
* Allow mixed declarations, especially loop variables * Allow C++ style commends `//`
2020-11-21Merge pull request #5161 from dearblue/ary-spliceYukihiro "Matz" Matsumoto
Fix documents for `mrb_ary_splice()` [ci skip]
2020-11-21Merge pull request #5162 from ↵Yukihiro "Matz" Matsumoto
shuujii/move-some-.rake-files-to-tasks-directory-for-consistency Move some `.rake` files to `tasks` directory for consistency
2020-11-21Reserve `OP_SENDVK` for the future keyword arguments like Ruby3.0.Yukihiro "Matz" Matsumoto
2020-11-21Fix infinite loop bug from `super` when method is prepended.Yukihiro "Matz" Matsumoto
2020-11-21Fix module order of `#include`; ruby-bug:7844Yukihiro "Matz" Matsumoto
2020-11-21Merge pull request #5160 from dearblue/cptr-objYukihiro "Matz" Matsumoto
Unable for the `MRB_TT_CPTR` object to have a singleton class
2020-11-21Merge pull request #5158 from dearblue/typoYukihiro "Matz" Matsumoto
Fix typo "overfow" to "overflow" [ci skip]
2020-11-21Fix documents for `mrb_ary_splice()` [ci skip]dearblue
2020-11-21Unable for the `MRB_TT_CPTR` object to have a singleton classdearblue
This object is treated as an immediate value.
2020-11-21Move some `.rake` files to `tasks` directory for consistencyKOBAYASHI Shuji
2020-11-21Fix typo "overfow" to "overflow" [ci skip]dearblue
2020-11-21Test each combination of boxing, `mrb_int` size, and archtecture.Yukihiro "Matz" Matsumoto
Boxing: * `MRB_NO_BOXING` (`mrb_value` packed in `struct`) * `MRB_WORD_BOXING` (`mrb_value` packed in `struct`) default * `MRB_NAN_BOXING` (`mrb_value` packed in `double`) `mrb_int` size * `MRB_INT32` (`int32_t` as `mrb_int`) * `MRB_INT64` (`int64` as `mrb_int`) conflict with `MRB_NAN_BOXING' Architecture * `MRB_64BIT` (`sizeof(void*)` is 64 bits) * `MRB_32BIT` (`sizeof(void*)` is 32 bits)
2020-11-21Specify `conf` explicitly for `enable_debug`.Yukihiro "Matz" Matsumoto
2020-11-21Update `Float#to_s` to keep trailing zero as CRuby does; ref 68cebb6Yukihiro "Matz" Matsumoto