Yukihiro "Matz" Matsumoto
afba74ff50
Add Array.new([1,2,3]) initialization.
2020-11-05 14:29:25 +09:00
Yukihiro "Matz" Matsumoto
aa4d8e9a2b
Avoid integer overflow in comparison.
2020-11-04 14:27:34 +09:00
Yukihiro "Matz" Matsumoto
0113db6716
Add cast to silence int conversion warnings.
2020-11-04 14:18:47 +09:00
Yukihiro "Matz" Matsumoto
b77a0f69a3
Fix a bug with big negative integers.
2020-11-04 14:15:51 +09:00
Yukihiro "Matz" Matsumoto
5d85045fcb
Update mruby3.md about new instructions.
2020-11-04 14:01:56 +09:00
Yukihiro "Matz" Matsumoto
d13df1536d
Add a new instruction OP_LOADI32.
...
That loads 32 bit integer bypassing pool access.
2020-11-04 14:01:04 +09:00
Yukihiro "Matz" Matsumoto
f8156ae175
Merge pull request #5113 from shuujii/reduce-recompilation-when-updating-presym-target-files
...
Reduce recompilation when updating presym target files
2020-11-03 18:13:56 +09:00
Yukihiro "Matz" Matsumoto
b08da9c30b
Merge pull request #5112 from shuujii/fix-dependencies-of-y.tab.o
...
Fix dependencies of `y.tab.o`
2020-11-03 18:12:50 +09:00
Yukihiro "Matz" Matsumoto
963b44286a
Use C99 __func__ instead of __FUNCTION__; #5107
2020-11-03 18:03:23 +09:00
KOBAYASHI Shuji
82a2a5657c
Reduce recompilation when updating presym target files
...
Fix that updating presym target files would recompile almost all files even
if symbols did not change.
2020-11-03 16:03:46 +09:00
KOBAYASHI Shuji
ea5d0a593c
Fix dependencies of y.tab.o
...
In the case of `y.tab.o`, `y.tab.d` was not read, so `y.tab.c` was not
recompiled by updating header files.
It seemed that the cause was overwriting the rake rule, so I deleted
unnecessary settings.
2020-11-03 15:56:08 +09:00
Yukihiro "Matz" Matsumoto
b7e8406f6c
Add new instructions to handle symbols/literals >255; fix #5109
...
New instructions:
* OP_LOADL16
* OP_LOADSYM16
* OP_STRING16
Size of pools, symbols are `int16_t` but offset representation in the
bytecode was 8 bits. Size of child `irep` array is `int16_t`, too but
this change does not address it.
2020-11-03 14:58:44 +09:00
Yukihiro "Matz" Matsumoto
0be5b266b6
format '%p' expects argument of type 'void *'; #5107
2020-11-02 23:04:12 +09:00
Yukihiro "Matz" Matsumoto
ac51a58683
ISO C does not allow extra ';' outside of a function; #5107
2020-11-02 23:04:12 +09:00
Yukihiro "Matz" Matsumoto
436765eb94
Revert "Remove long-time deprecated minirake."
...
`minirake` was still used in many occasions.
This reverts commit 3847c7eb64 .
2020-11-02 15:14:36 +09:00
Yukihiro "Matz" Matsumoto
ddfac9aba0
Search gem from MRUBY_ROOT if build config is in build_config.
2020-11-02 15:14:36 +09:00
Yukihiro "Matz" Matsumoto
9233d28ac7
Make Ranges frozen as Ruby3.0.
2020-11-02 15:14:36 +09:00
Yukihiro "Matz" Matsumoto
dc886873bc
Replace R-assignment by single-line pattern matching.
...
Since `R-assignment` in CRuby is abandoned. Single-line pattern matching
in `mruby` only matches single local variable at the moment. Currently
it works as a right assignment to a local variable. It will be enhanced
in the future.
2020-11-02 15:14:36 +09:00
Yukihiro "Matz" Matsumoto
70ee936367
Update the build description in mruby3.md.
2020-11-02 15:14:35 +09:00
Yukihiro "Matz" Matsumoto
c427776910
Merge pull request #5111 from shuujii/fix-parallel-build
...
Fix parallel build
2020-11-02 15:14:25 +09:00
KOBAYASHI Shuji
9a5c78dc26
Fix parallel build
...
When `rake -m` and so on are used to build in parallel, building may be
started before presym files are generated. Then, for example, the following
error occurs and this issue is fixed.
```console
In file included from /Users/shuujii/mruby/mruby/include/mruby.h:92:
/mruby/mruby/include/mruby/presym.h:16:10: fatal error: '../build/presym.inc' file not found
#include <../build/presym.inc>
^~~~~~~~~~~~~~~~~~~~~
```
2020-11-02 14:13:33 +09:00
Yukihiro "Matz" Matsumoto
331b119313
Merge pull request #5110 from bshastry/fix-mruby-ossfuzz-build
...
ossfuzz: Fix mruby include paths
2020-11-01 22:19:39 +09:00
Bhargava Shastry
b5e4e283e8
ossfuzz: Fix mruby include paths
2020-11-01 13:24:03 +01:00
Yukihiro "Matz" Matsumoto
f000856d68
Merge pull request #5108 from mimaki/display_preview_version
...
Add `preview` to version.
2020-11-01 17:19:01 +09:00
mimaki
943029954f
Fix mruby -v option test.
2020-11-01 14:19:19 +09:00
mimaki
bc9566eb64
Add preview to version.
2020-11-01 13:42:35 +09:00
Yukihiro "Matz" Matsumoto
6cc29ed377
Fix the condition to detect core mrbgems.
2020-10-30 07:15:11 +09:00
Yukihiro "Matz" Matsumoto
e4d4192c3a
Exclude symbols from mruby-test gem only used for tests.
2020-10-29 23:16:54 +09:00
Yukihiro "Matz" Matsumoto
a5d05ea8b7
Use mrb dump format for non core mrbgems by default.
...
If you confirm the gem is cdump safe, add `spec.enable_cdump` in
`mrbgem.rake` file. Some external gems e.g. `mruby-mgem-template` do
not work with cdump.
2020-10-29 22:52:29 +09:00
Yukihiro "Matz" Matsumoto
86981dafb1
Use clear if instead of unless for condition.
2020-10-29 22:52:29 +09:00
Yukihiro "Matz" Matsumoto
5dff2194a2
Use instance variable @dir instead of access method dir.
2020-10-29 22:52:29 +09:00
Yukihiro "Matz" Matsumoto
78f7162508
Remove mrblib_dir and objs_dir configuration from gems.
...
Always use `mrblib` and 'src` for directory names.
2020-10-29 22:52:28 +09:00
Yukihiro "Matz" Matsumoto
ccca5e521c
Merge pull request #5105 from shuujii/fix-typo-in-Range-last
...
Fix typo in `Range#last`
2020-10-29 22:52:17 +09:00
Yukihiro "Matz" Matsumoto
212800a901
Merge pull request #5104 from shuujii/fix-typo-in-doc-guides-compile.md
...
Fix typo in `doc/guides/compile.md` [ci skip]
2020-10-29 22:51:43 +09:00
KOBAYASHI Shuji
353ecd7119
Fix typo in Range#last
2020-10-29 18:40:42 +09:00
KOBAYASHI Shuji
0736d7c99f
Fix typo in doc/guides/compile.md [ci skip]
2020-10-29 18:27:11 +09:00
Yukihiro "Matz" Matsumoto
385cebe0b9
Use `default' gembox by default.
...
I changed to use `full-core` gembox for debugging. It should have been
reverted before `mruby3` branch was merged.
2020-10-29 11:53:10 +09:00
Yukihiro "Matz" Matsumoto
3847c7eb64
Remove long-time deprecated minirake.
2020-10-29 11:49:05 +09:00
Yukihiro "Matz" Matsumoto
24ffa4386a
The path of the gem should be relative from MRUBY_ROOT.
...
It was relative from the directory of the build configuration file, but
the document says it's relative from `MRUBY_ROOT`. When the default
configuration file was `MRUBY_ROOT/build_config.rb`, it was OK for most
of the cases.
2020-10-29 11:49:05 +09:00
Yukihiro "Matz" Matsumoto
33742d941f
Move build_config.rb -> build_config/default.rb; ref #5098
...
In addition, update the documents referring `build_config.rb` which is
no longer used. The new `build_config.rb` describes the new configuration
structure in the comment.
2020-10-29 11:49:05 +09:00
Yukihiro "Matz" Matsumoto
c1ad4c4261
Restore original name for default build_config_name; ref #5098
2020-10-29 10:46:20 +09:00
Yukihiro "Matz" Matsumoto
41d5df03ed
Use Dir.glob instead of map.
2020-10-29 10:43:09 +09:00
Yukihiro "Matz" Matsumoto
32ffd81011
Add beginless/endless ranges tests.
2020-10-29 10:43:09 +09:00
Yukihiro "Matz" Matsumoto
cb636215bb
Raise exception from Range#first with beginless ranges.
2020-10-29 10:43:08 +09:00
Yukihiro "Matz" Matsumoto
d35677f213
Implement Range#last in mruby-range-ext in Ruby.
...
This reduce unnecessary calls of `mrb_funcall()`.
2020-10-29 10:43:08 +09:00
Yukihiro "Matz" Matsumoto
76eafa4608
Merge pull request #5098 from shuujii/revert-MRUBY_TARGET-mechanism
...
Revert `MRUBY_TARGET` mechanism; ref #5096
2020-10-29 10:42:56 +09:00
Yukihiro "Matz" Matsumoto
78d185efb9
Merge pull request #5102 from dearblue/c++-exc
...
Fixed build with `conf.enable_cxx_exception`
2020-10-29 10:41:56 +09:00
Yukihiro "Matz" Matsumoto
f24658816c
Merge pull request #5103 from shuujii/fix-mrb_obj_id-to-Float
...
Fix `mrb_obj_id` to `Float`
2020-10-29 07:01:09 +09:00
KOBAYASHI Shuji
43863d5f01
Fix mrb_obj_id to Float
2020-10-28 23:03:26 +09:00
dearblue
336f0de8bb
Fixed build with conf.enable_cxx_exception
...
The problem was manifested by commit 5069fb15e4 .
2020-10-28 21:10:33 +09:00