KOBAYASHI Shuji
|
8df2763b56
|
Support NODE_LITERAL_DELIM in mrb_parser_dump
#### Before this patch:
```terminal
$ bin/mruby -v -e '%w[1 2]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_WORDS:
00001 NODE_STR "1" len 1
00001 node type: 85 (0x55)
00001 NODE_STR "2" len 1
(snip)
```
#### After this patch:
```terminal
$ bin/mruby -v -e '%w[1 2]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_WORDS:
00001 NODE_STR "1" len 1
00001 NODE_LITERAL_DELIM
00001 NODE_STR "2" len 1
(snip)
```
|
2019-10-01 17:20:39 +09:00 |
|
KOBAYASHI Shuji
|
42c7f2d6b0
|
Support NODE_SYMBOLS in mrb_parser_dump
#### Before this patch:
```terminal
$ bin/mruby -v -e '%i[1]; %I[#{2}]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 node type: 87 (0x57)
00001 node type: 87 (0x57)
(snip)
```
#### After this patch:
```terminal
$ bin/mruby -v -e '%i[1]; %I[#{2}]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_SYMBOLS:
00001 NODE_STR "1" len 1
00001 NODE_SYMBOLS:
00001 NODE_STR "" len 0
00001 NODE_BEGIN:
00001 NODE_INT 2 base 10
00001 NODE_STR "" len 0
(snip)
```
|
2019-10-01 17:10:34 +09:00 |
|
KOBAYASHI Shuji
|
732ef6b10e
|
Support NODE_WORDS in mrb_parser_dump
#### Before this patch:
```terminal
$ bin/mruby -v -e '%w[1]; %W[#{2}]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 node type: 86 (0x56)
00001 node type: 86 (0x56)
(snip)
```
#### After this patch:
```terminal
$ bin/mruby -v -e '%w[1]; %W[#{2}]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_WORDS:
00001 NODE_STR "1" len 1
00001 NODE_WORDS:
00001 NODE_STR "" len 0
00001 NODE_BEGIN:
00001 NODE_INT 2 base 10
00001 NODE_STR "" len 0
(snip)
```
|
2019-10-01 17:07:30 +09:00 |
|
KOBAYASHI Shuji
|
16745261e3
|
Support NODE_DSYM in mrb_parser_dump
#### Before this patch:
```terminal
$ bin/mruby -v -e ':"#{1}"; ["#{2}": 0]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 node type: 83 (0x53)
00001 NODE_ARRAY:
00001 NODE_KW_HASH:
00001 key:
00001 node type: 83 (0x53)
00001 value:
00001 NODE_INT 0 base 10
(snip)
```
#### After this patch:
```terminal
$ bin/mruby -v -e ':"#{1}"; ["#{2}": 0]'
mruby 2.0.1 (2019-04-04)
00001 NODE_SCOPE:
00001 NODE_BEGIN:
00001 NODE_DSYM:
00001 NODE_DSTR:
00001 NODE_STR "" len 0
00001 NODE_BEGIN:
00001 NODE_INT 1 base 10
00001 NODE_STR "" len 0
00001 NODE_ARRAY:
00001 NODE_KW_HASH:
00001 key:
00001 NODE_DSYM:
00001 NODE_DSTR:
00001 NODE_STR "" len 0
00001 NODE_BEGIN:
00001 NODE_INT 2 base 10
00001 NODE_STR "" len 0
00001 value:
00001 NODE_INT 0 base 10
(snip)
```
|
2019-09-30 11:54:51 +09:00 |
|
KOBAYASHI Shuji
|
a5d140ae42
|
Print missing : before newline in mrb_parser_dump
|
2019-09-29 17:14:52 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
ccf7a8248f
|
Merge pull request #4739 from dearblue/restore-arena
Restore GC arena frequently
|
2019-09-29 14:40:29 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
a1886942eb
|
Further refactoring over #4738
|
2019-09-29 14:30:41 +09:00 |
|
dearblue
|
39855a3304
|
Restore GC arena frequently
|
2019-09-29 13:57:22 +09:00 |
|
dearblue
|
e48207cdb3
|
Remove unnecessary assignments
|
2019-09-29 13:45:16 +09:00 |
|
KOBAYASHI Shuji
|
ae530d89c4
|
Remove unused node type in codegen()
|
2019-09-28 15:15:31 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
2de757eef0
|
Replace mrb_sym_name with mrb_sym_dump; ref #4684
|
2019-09-28 00:06:01 +09:00 |
|
KOBAYASHI Shuji
|
feaf80d899
|
Use type predicate macros instead of mrb_type if possible
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
|
2019-09-26 22:23:27 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
60cc46a92c
|
Use proper type specifier for mrb_raisef(); ref #4731
The following two may be different:
* `%d` for `int`
* `%i` for `mrb_int`
|
2019-09-26 09:48:01 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
184aeb0694
|
Merge pull request #4732 from dearblue/inttypes
Use inttypes for `snprintf()`
|
2019-09-26 06:31:07 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0d661bcca6
|
Merge pull request #4731 from dearblue/consistent-type
Keep the type of `posarg` consistent
|
2019-09-26 06:30:55 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
5c381032b0
|
Merge pull request #4729 from dearblue/fix-4598
Fix `MRB_WITHOUT_FLOAT` reversal; fix #4598
|
2019-09-25 23:55:36 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
b5fa2dadfc
|
Merge pull request #4730 from dearblue/fall-through
Add "fall through"
|
2019-09-25 23:53:34 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
a365f9a67d
|
Rename symbol-to-string functions; close #4684
* mrb_sym2name -> mrb_sym_name
* mrb_sym2name_len -> mrb_sym_name_len
* mrb_sym2str -> mrb_sym_str
|
2019-09-25 23:52:00 +09:00 |
|
dearblue
|
84d9296c05
|
Use inttypes for snprintf()
|
2019-09-25 23:28:05 +09:00 |
|
dearblue
|
9f6ba4bfa1
|
Keep the type of posarg consistent
Match the type with the caller and related functions.
|
2019-09-25 23:17:06 +09:00 |
|
dearblue
|
5ce1bec1bc
|
Add "fall through"
|
2019-09-25 23:07:05 +09:00 |
|
dearblue
|
eb2f34719d
|
Fix MRB_WITHOUT_FLOAT reversal; fix #4598
|
2019-09-25 22:55:41 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8db7dfb5c4
|
Merge pull request #4724 from shuujii/use-mrb_define_method-instead-of-mrb_define_alias
Use `mrb_define_method` instead of `mrb_define_alias`
|
2019-09-21 17:50:21 +09:00 |
|
KOBAYASHI Shuji
|
f252ab0770
|
Use mrb_define_method instead of mrb_define_alias
|
2019-09-21 16:51:10 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
683baec4f0
|
Add optional argument to Module#class_variables.
|
2019-09-20 13:07:58 +09:00 |
|
KOBAYASHI Shuji
|
1fb4e73981
|
Fix typo in Array#difference document [ci skip]
|
2019-09-20 09:28:56 +09:00 |
|
KOBAYASHI Shuji
|
c7c344dbc2
|
Fix Enumerable#filter_map without block; ref d380c7d2
|
2019-09-18 19:33:15 +09:00 |
|
KOBAYASHI Shuji
|
0bedd900b9
|
Remove mrb_get_args(mrb, ""); ref 30f37872
|
2019-09-18 16:07:21 +09:00 |
|
dearblue
|
099a4f3969
|
Entrust "no block given" error to mrb_get_args()
Some error messages will be changed.
|
2019-09-16 20:29:58 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
2f9b1fdb0c
|
Merge pull request #4255 from shuujii/enumerator-size-is-not-supported
`Enumerator#size` is not supported [ci skip]
|
2019-09-16 15:37:58 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
a57b6f8ed0
|
Implement Enumerable tally from Ruby2.7.
|
2019-09-16 10:10:09 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
d380c7d26f
|
Implement filter_map from Ruby2.6.
|
2019-09-16 10:10:09 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
57a0132b41
|
Add filter aliases for Enumerable and Hash.
|
2019-09-16 10:10:09 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f4117d81d2
|
Add Array#difference method from Ruby2.6.
|
2019-09-16 10:10:09 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
3daa53ce63
|
Implement bind_call method from Ruby2.7.
|
2019-09-16 10:10:09 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
6de1c64a9c
|
Add small fix over #4712
|
2019-09-16 07:44:51 +09:00 |
|
dearblue
|
992ba476a9
|
Fix broken UTF-8 characters by IO#getc
Character (multi-byte UTF-8) is destroyed when character spanning
`IO::BUF_SIZE` (4096 bytes) exist.
- Prepare file:
```ruby
File.open("sample", "wb") { |f| f << "●" * 1370 }
```
- Before patched:
```ruby
File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a }
# => ["●", "●", ..., "●", "\xe2", "\x97", "\x8f", "●", "●", "●", "●"]
- After patched:
```ruby
File.open("sample") { |f| a = []; while ch = f.getc; a << ch; end; p a }
# => ["●", "●", ..., "●", "●", "●", "●", "●", "●"]
|
2019-09-16 00:26:41 +09:00 |
|
dearblue
|
7cc8c7d2ff
|
Small improvement for mruby-io
|
2019-09-16 00:11:43 +09:00 |
|
dearblue
|
52a0ad4108
|
Fix IO#pos
|
2019-09-16 00:11:43 +09:00 |
|
dearblue
|
77368ce762
|
Revert part of 8c90b5fc6
`IO#readline` and `IO#readchar` process in character units.
|
2019-09-16 00:11:43 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0734d9f314
|
Merge pull request #4512 from lopopolo/patch-1
Support parsing a Regexp literal with 'o' option
|
2019-09-15 18:19:59 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
57d7fe94a9
|
Add a macro mrb_frozen_p that points to MRB_FROZEN_P.
|
2019-09-14 23:21:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
6f1c08f7d8
|
Replace String#byteslice by custom IO._bufread.
`byteslice` creates 2 string objects. `_bufread` creates one, and
modifies the original buffer string, that is more efficient.
|
2019-09-14 23:21:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
6620b1cdcb
|
Revert "Update %pure-parser to %define api.pure for newer bison; fix #4706"
The `bison` on MacOS does not support `%define api.pure`.
This reverts commit f7c9f1f796.
|
2019-09-14 10:28:07 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f7c9f1f796
|
Update %pure-parser to %define api.pure for newer bison; fix #4706
|
2019-09-14 09:05:32 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
76f1aa7de5
|
Remove mrb_funcall from <=> operations.
|
2019-09-14 09:05:32 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
2fa4a55e80
|
Replace loop method with while true loop to gain performance.
|
2019-09-14 09:05:32 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
ad4bdda074
|
Update assert_take for zero size take.
|
2019-09-13 02:28:56 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f5542b9927
|
Add Enumerator.produce from Ruby2.7
|
2019-09-13 02:28:56 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
5a0204bb45
|
Remove unnecessary files from mruby-{io,pack,socket}.
|
2019-09-13 02:23:16 +09:00 |
|