summaryrefslogtreecommitdiff
path: root/rubyparser.h
AgeCommit message (Collapse)Author
2023-09-30Remove not used fields from POSTEXEyui-knk
2023-09-30Remove not used fields from DEFINEDyui-knk
2023-09-30Remove not used fields from AND, ORyui-knk
2023-09-30Remove not used fields from LAMBDAyui-knk
2023-09-29Change NODE DEF_TEMP nd_cval to `struct lex_context`yui-knk
2023-09-29Merge NODE_DEF_TEMP and NODE_DEF_TEMP2yui-knk
2023-09-29Remove not used fields from CASE, CASE2, CASE3yui-knk
2023-09-29Remove not used fields from ALIAS, VALIAS, UNDEFyui-knk
2023-09-29Remove not used fields from DOT2, DOT3, FLIP2, FLIP3yui-knk
2023-09-29Merge RNode_OP_ASGN2 and RNode_OP_ASGN22yui-knk
2023-09-29Remove not used fields from SELF, NIL, TRUE, FALSEyui-knk
2023-09-28Change RNode structure from union to structyui-knk
All kind of AST nodes use same struct RNode, which has u1, u2, u3 union members for holding different kind of data. This has two problems. 1. Low flexibility of data structure Some nodes, for example NODE_TRUE, don’t use u1, u2, u3. On the other hand, NODE_OP_ASGN2 needs more than three union members. However they use same structure definition, need to allocate three union members for NODE_TRUE and need to separate NODE_OP_ASGN2 into another node. This change removes the restriction so make it possible to change data structure by each node type. 2. No compile time check for union member access It’s developer’s responsibility for using correct member for each node type when it’s union. This change clarifies which node has which type of fields and enables compile time check. This commit also changes node_buffer_elem_struct buf management to handle different size data with alignment.
2023-09-22Directly free structure managed by imemo tmpbufyui-knk
NODE_ARGS, NODE_ARYPTN, NODE_FNDPTN manage memory of their structure by imemo tmpbuf Object. However rb_ast_struct has reference to NODE. Then these memory can be freed directly when rb_ast_struct is freed. This commit reduces parser's dependency on CRuby functions.
2023-08-25Replace only use of `snprintf` in parserNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8292
2023-08-25Remove SCRIPT_LINES__ related member functionsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8289
2023-08-25define back snprintf卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/8274
2023-08-25#include <stdarg.h> for va_list卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/8274
2023-08-25snprintf could be defined卜部昌平
include/ruby/subst.h has `#define snprintf` which breaks here. Notes: Merged: https://github.com/ruby/ruby/pull/8274
2023-08-25VALUE is already defined卜部昌平
This header is needed only when outside of the project Notes: Merged: https://github.com/ruby/ruby/pull/8274
2023-08-25do not redefine a typedef卜部昌平
duplicated typedef declaration was not allowed in C99. Notes: Merged: https://github.com/ruby/ruby/pull/8274
2023-08-23Remove nd_entry from NODE_GASGN and NODE_GVARyui-knk
After a0f12a0258e4020bd657ee80b7d8f22bd33ea223 NODE_GASGN and NODE_GVAR hold same value on both nd_vid and nd_entry. This commit stops setting value to nd_entry and makes to use only nd_vid. Notes: Merged: https://github.com/ruby/ruby/pull/8261
2023-08-11Remove uneeded fix2int and rational_raw property for Universal ParserS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/8190
2023-08-05Remove uneeded int2big property for Universal ParserS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/8170
2023-07-09Move some macro for universal parserS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/8044
2023-07-08Move ISASCII defination to parse.yS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/8029
2023-06-24Remove `st_functions_t`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7956
2023-06-17Specify int bitfield as signed int bitfieldyui-knk
sunc treats int bitfield as unsigned int. This commit will fix build failure on sunc. * http://rubyci.s3.amazonaws.com/solaris10-sunc/ruby-master/log/20230617T100003Z.fail.html.gz * http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20230617T090011Z.fail.html.gz Notes: Merged: https://github.com/ruby/ruby/pull/7952
2023-06-17Replace parser & node compile_option from Hash to bit fieldyui-knk
This commit reduces dependency to CRuby object. Notes: Merged: https://github.com/ruby/ruby/pull/7950
2023-06-12[Feature #19719] Universal Parseryui-knk
Introduce Universal Parser mode for the parser. This commit includes these changes: * Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions are passed via `struct rb_parser_config_struct` when this macro is enabled. * Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu. Notes: Merged: https://github.com/ruby/ruby/pull/7927