Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-02-23 | Use rb_str_to_interned_str in parse.y | Peter Zhu | |
This commit changes rb_fstring to rb_str_to_interned_str in parse.y. rb_fstring is private so it shouldn't be used by ripper. | |||
2024-02-21 | Remove not used universal parser macros and functions | yui-knk | |
2024-02-21 | Introduce NODE_REGX to manage regexp literal | yui-knk | |
2024-02-20 | Use rb_gc_mark_and_move for imemo | Peter Zhu | |
2024-02-20 | Remove uneeded Universal Parser properties | S-H-GAMELINKS | |
2024-02-20 | [Feature #20257] Rearchitect Ripper | yui-knk | |
Introduce another semantic value stack for Ripper so that Ripper can manage both Node and Ruby Object separately. This rearchitectutre of Ripper solves these issues. Therefore adding test cases for them. * [Bug 10436] https://bugs.ruby-lang.org/issues/10436 * [Bug 18988] https://bugs.ruby-lang.org/issues/18988 * [Bug 20055] https://bugs.ruby-lang.org/issues/20055 Checked the differences of `Ripper.sexp` for files under `/test/ruby` are only on test_pattern_matching.rb. The differences comes from the differences between `new_hash_pattern_tail` functions between parser and Ripper. Ripper `new_hash_pattern_tail` didn’t call `assignable` then `kw_rest_arg` wasn’t marked as local variable. This is also fixed by this commit. ``` --- a/./tmp/before/test_pattern_matching.rb +++ b/./tmp/after/test_pattern_matching.rb @@ -3607,7 +3607,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [984, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [985, 10]]], + [:var_ref, [:@ident, “a”, [985, 10]]], :==, [:hash, nil]]], nil]]], @@ -3662,7 +3662,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [993, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [994, 10]]], + [:var_ref, [:@ident, “a”, [994, 10]]], :==, [:hash, [:assoclist_from_args, @@ -3813,7 +3813,7 @@ [:command, [:@ident, “raise”, [1022, 10]], [:args_add_block, - [[:vcall, [:@ident, “b”, [1022, 16]]]], + [[:var_ref, [:@ident, “b”, [1022, 16]]]], false]]], [:else, [[:var_ref, [:@kw, “true”, [1024, 10]]]]]]]], nil, @@ -3876,7 +3876,7 @@ [:@int, “0”, [1033, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1033, 20]]], + [:var_ref, [:@ident, “b”, [1033, 20]]], :==, [:hash, nil]]]], nil]]], @@ -3946,7 +3946,7 @@ [:@int, “0”, [1042, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1042, 20]]], + [:var_ref, [:@ident, “b”, [1042, 20]]], :==, [:hash, [:assoclist_from_args, @@ -5206,7 +5206,7 @@ [[:assoc_new, [:@label, “c:“, [1352, 22]], [:@int, “0”, [1352, 25]]]]]], - [:vcall, [:@ident, “r”, [1352, 29]]]], + [:var_ref, [:@ident, “r”, [1352, 29]]]], false]]], [:binary, [:call, @@ -5299,7 +5299,7 @@ [:assoc_new, [:@label, “c:“, [1367, 34]], [:@int, “0”, [1367, 37]]]]]], - [:vcall, [:@ident, “r”, [1367, 41]]]], + [:var_ref, [:@ident, “r”, [1367, 41]]]], false]]], [:binary, [:call, @@ -5931,7 +5931,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “r”, [1533, 11]]]], [[:binary, - [:vcall, [:@ident, “r”, [1534, 8]]], + [:var_ref, [:@ident, “r”, [1534, 8]]], :==, [:hash, [:assoclist_from_args, ``` | |||
2024-02-19 | [Bug #20280] Check by `rb_parser_enc_str_coderange` | Nobuyoshi Nakada | |
Co-authored-by: Yuichiro Kaneko <spiketeika@gmail.com> | |||
2024-02-19 | [Bug #20280] Raise SyntaxError on invalid encoding symbol | Nobuyoshi Nakada | |
2024-02-13 | Fix memory leak when parsing invalid hash symbol | Peter Zhu | |
For example: 10.times do 100_000.times do eval('{"\xC3": 1}') rescue EncodingError end puts `ps -o rss= -p #{$$}` end Before: 32032 48464 66112 84192 100592 117520 134096 150656 167168 183760 After: 17120 17120 17120 17120 18560 18560 18560 18560 18560 18560 | |||
2024-02-09 | Remove ruby object from string nodes | yui-knk | |
String nodes holds ruby string object on `VALUE nd_lit`. This commit changes it to `struct rb_parser_string *string` to reduce dependency on ruby object. Sometimes these strings are concatenated with other string therefore string concatenate functions are needed. | |||
2024-02-03 | Use bool to check ascii only in parse_ident | yui-knk | |
No need to use ENC_CODERANGE to record ascii only or not. | |||
2024-01-31 | Introduced `rb_node_const_decl_val` function | S.H | |
Introduce `rb_node_const_decl_val` function to allow `rb_ary_join` and `rb_ary_reverse` functions to be removed from Universal Parser. | |||
2024-01-28 | Rename `nd_head` in `RNode_RESBODY` as `nd_next` | Nobuyoshi Nakada | |
2024-01-28 | Remove unused `nd_resq` from `RNode_ENSURE` | Nobuyoshi Nakada | |
2024-01-27 | Introduce `NODE_ENCODING` | S.H | |
`__ENCODING__ `was managed by `NODE_LIT` with Encoding object. Introduce `NODE_ENCODING` for 1. `__ENCODING__` is detectable from AST Node. 2. Reduce dependency Ruby object for parse.y | |||
2024-01-14 | Constify `rb_global_parser_config` | Nobuyoshi Nakada | |
2024-01-12 | Remove reference counter from rb_parser_config | yui-knk | |
It's allocated outside of parser then no need to track reference count in rb_parser_config. | |||
2024-01-12 | Statically allocate parser config | yui-knk | |
2024-01-09 | Introduce NODE_SYM to manage symbol literal | yui-knk | |
`:sym` was managed by `NODE_LIT` with `Symbol` object. This commit introduces `NODE_SYM` so that 1. Symbol literal is detectable from AST Node 2. Reduce dependency on ruby object | |||
2024-01-07 | Remove unneeded rb_parser_config_struct struct properties for Universal Parser | S-H-GAMELINKS | |
2024-01-07 | Introduce Numeric Node's | S-H-GAMELINKS | |
2024-01-02 | Introduce NODE_FILE | yui-knk | |
`__FILE__` was managed by `NODE_STR` with `String` object. This commit introduces `NODE_FILE` and `struct rb_parser_string` so that 1. `__FILE__` is detectable from AST Node 2. Reduce dependency ruby object | |||
2023-12-29 | Introduce NODE_LINE | yui-knk | |
`__LINE__` was managed by `NODE_LIT` with `Integer` object. This commit introduces `NODE_LINE` so that 1. `__LINE__` is detectable from AST Node 2. Reduce dependency ruby object | |||
2023-12-28 | Add errno_ptr property for Universal Parser | yui-knk | |
2023-12-28 | Add ary_modify property for Universal Parser | yui-knk | |
2023-12-08 | Fix typo in a comment [ci skip] | Nobuyoshi Nakada | |
2023-10-30 | Embed `rb_args_info` in `rb_node_args_t` | Nobuyoshi Nakada | |
2023-10-25 | Remove unused macro | yui-knk | |
`struct RNode_OP_ASGN22` was removed by 37a783a. | |||
2023-10-20 | Expand OP_ASGN1 nd_args to nd_index and nd_rvalue | yui-knk | |
ARGSCAT has been used for nd_args to hold index and rvalue, because there was limitation on the number of members for Node. We can easily change structure of node now, let's expand it. | |||
2023-10-20 | Add printf format attributes to `rb_parser_config_t` | Nobuyoshi Nakada | |
2023-10-15 | Remove not used fields from STR | yui-knk | |
2023-10-15 | Remove not used fields from XSTR | yui-knk | |
2023-10-15 | Remove not used fields from LIT | yui-knk | |
2023-10-15 | Remove not used fields from MATCH | yui-knk | |
2023-10-14 | Delete heredoc line mark references | Nobuyoshi Nakada | |
2023-10-14 | Manage `rb_strterm_t` without imemo | Nobuyoshi Nakada | |
2023-10-11 | Extract NODE_FL_NEWLINE access to macro | yui-knk | |
2023-10-10 | Remove not used fields from DEFN | yui-knk | |
2023-10-08 | Remove not used fields from EVSTR | yui-knk | |
2023-10-07 | Remove not used fields from asgn nodes | yui-knk | |
2023-10-06 | Remove not used fields from MATCH3 | yui-knk | |
2023-10-06 | Remove not used fields from YIELD | yui-knk | |
2023-10-06 | Remove not used fields from ZLIST | yui-knk | |
2023-10-06 | Remove `NODE_VALUES` | Nobuyoshi Nakada | |
This node type was added for the multi-value experiment back in 2004. The feature itself was removed after a few years, but this is its remnant. | |||
2023-10-05 | Chain nodes to exit only | Nobuyoshi Nakada | |
2023-10-05 | Differentiate `NODE_BREAK`/`NODE_NEXT`/`NODE_RETURN` | Nobuyoshi Nakada | |
2023-10-05 | Remove unused nodes in NODE_RETURN and NODE_REDO | Nobuyoshi Nakada | |
2023-10-05 | Move internal NODE_DEF_TEMP to parse.y | Nobuyoshi Nakada | |
2023-10-05 | Remove not used fields from colon nodes | yui-knk | |
2023-10-04 | Remove not used fields from variable nodes | yui-knk | |