summaryrefslogtreecommitdiff
path: root/node.c
AgeCommit message (Collapse)Author
2019-07-23Let memory sizes of the various IMEMO object types be reflected correctlyLourens Naudé
[Feature #15805] Closes: https://github.com/ruby/ruby/pull/2140
2019-06-05Fix grammar of macro name: ECCESSED -> ECCESSIVEMartin Dürst
Fix the name of the macro variable introduced in 0872ea5330 from NODE_SPECIAL_EXCESSED_COMMA to NODE_SPECIAL_EXCESSIVE_COMMA.
2019-06-04* expand tabs.git
2019-06-04node.h: Avoid a magic number to represent excessed commaYusuke Endoh
`(ID)1` was assigned to NODE_ARGS#rest_arg for `{|x,| }`. This change removes the magic number by introducing an explicit macro variable for it: NODE_SPECIAL_EXCESSED_COMMA.
2019-06-04* expand tabs.git
2019-06-04node.c: Show the ID of internal variableYusuke Endoh
2019-04-27Fix description of NODE_INKazuki Tsujimoto
2019-04-20Avoid usage of the dummy empty BEGIN nodektsj
Use NODE_SPECIAL_NO_NAME_REST instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17Fix the format of NODE_IN nodeyui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17Introduce pattern matching [EXPERIMENTAL]ktsj
[ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-15* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-15node.h: introduce nd_brace to determine if a hash literal is a keywordmame
NODE_HASH#nd_brace is a flag that is 1 for `foo({ k: 1 })` and 0 for `foo(k: 1)`. nd_alen had been abused for the flag (and the implementation is completely the same), but an explicit name is better to read. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31Method reference operatornobu
Introduce the new operator for method reference, `.:`. [Feature #12125] [Feature #13581] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12Removed unreachable codenobu
* node.c (rb_ast_dispose): since `ast->node_buffer` is freed in `rb_ast_free()`, it should be always NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12Missing write-barriernobu
Fix up r64507. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16node.c: Typo fix. Patch by Shuichi Tamayose. [ci skip] [Fix GH-1880]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22node.h (rb_ast_t): move its field mark_ary to node_buffer_tmame
I want to add a new field to rb_ast_t whose size is restricted because it is an imemo. This change makes one room in rb_ast_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Use nd_X shorthand for annotationnobu
[Fix GH-1901] From: hkdnet <satoko.itse@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07node.c: Fix format of NODE_OP_ASGN1 and NODE_OP_ASGN2yui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-10node.c: Fix format and example of NODE_OPCALLyui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-10node.c: Fix typosyui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-20node.c: predicates for special NODEsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-17Fix typos.hsbt
* node.c: strucutre -> structure * random.c: acquried -> acquired * thread.c: accross -> across git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-16node.c: Separately allocate a struct having flexible arraymame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-16nested flexible array member is a GCCismshyouhei
This is NG. The ISO C section 6.7.2.1 explicitly states that structs having flexible array members "shall not be a member of a structure or an element of an array." git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-16node.c: Stop double meaning of NODE_FOR by introducing NODE_FOR_MASGNmame
NODE_FOR was used both for "for"-statement itself and for multi-assignment of for-statement (for x, y, in...end). This change separates the two purposes, NODE_FOR for the former, and newly introduced NODE_FOR_MASGN for the latter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-13node.c (node_buffer_elem_t): Use FLEX_ARY_LENmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09Rename code_range to code_locationmame
Because the name "code_range" is ambiguous with encoding's. Abbreviations ("crange", and "cr") are also renamed to "loc". The traditional "code_location" (a pair of lineno and column) is renamed to "code_position". Abbreviations are also renamed (first_loc to beg_pos, and last_loc to end_pos). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09parse.y: Remove special handling of tOROP and tANDOPmame
The complexity is no longer considered necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-08parse.y: Make consistent with the terms about code ranges and locationsmame
"loc" was ambiguous; it might refer both a location and a code range. This change uses "loc" for a location, and "crange" or "cr" for a code range. A location (abbr. loc) is a point in a program and consists of line number and column number. A code range (abbr. crange and cr) is a range within a program and consists of a pair of locations which is the first and the last. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-08parse.y: Remove dispose_stringmame
I think that recycling the delimiter string objects doesn't pay its complexity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-08node.c: show newline node marknobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-07node.c: fix SEGV of `->(a:){}` when --dump=parsetreemame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05node.c: factor out the part of operator output into F_OPERATORmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05node.c: remove unused macro F_OPTIONmame
Follow up of r61610 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05node.c (NODE_OP_CDECL): fix a typo bug.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05node.h: remove NODE_PRELUDEmame
NODE_PRELUDE contains a `BEGIN` node, a main node, and compile_option. This node is assumed that it must be located immediately under the root NODE_SCOPE, but this strange assumption is not so good, IMO. This change removes the assumtion; it integrates the former two nodes by block_append, and moves compile_option into rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05node.h: define rb_ast_body_t and restructure rb_ast_tmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-05node.c: constify NODE* arguments in node.cmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-04node.h: add NODE_ONCE instead of reuse of NODE_SCOPEmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15node.c: show variable type for NODE_*ASGNmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15node.c (NODE_HASH): remove wrong default casemame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15node.c: add more comment to NODE_CASE2mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15node.c: fix typosmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14node.[ch], parse.y, compile.c: rename nd_column to nd_first_columnmame
nd_set_column -> nd_first_set_column nd_lineno -> nd_first_lineno nd_set_lineno -> nd_first_set_lineno git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05node.c: FIELD_BLOCKnobu
* node.c (COMPOUND_FIELD, FIELD_BLOCK): moved block outside arguments like as SIMPLE_FIELD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05node.c: a simple notation for code range of NODEsmame
This affects only `--dump=parsetree` and `--dump=parsetree_with_comment`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Refactoring out the direct accesses of NODE's u1, u2, and u3mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make funcs static.ko1
* node.c: make them static: * rb_node_buffer_new * rb_node_buffer_free git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e