summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2023-10-03 23:35:17 +0900
committerYuichiro Kaneko <spiketeika@gmail.com>2023-10-04 12:15:39 +0900
commited8a3428e449711f014afa5cb22f4ff2780b0cfe (patch)
treef7bb836a8d51c623480a5887622dc2615c47478a
parent2e1762c9e0d8f68f3133c36f89df24e2d43b88ae (diff)
Remove not used fields from variable nodes
-rw-r--r--parse.y12
-rw-r--r--rubyparser.h14
2 files changed, 0 insertions, 26 deletions
diff --git a/parse.y b/parse.y
index b8bc94cf7c..b8267a002e 100644
--- a/parse.y
+++ b/parse.y
@@ -11666,8 +11666,6 @@ rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
{
rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
n->nd_vid = nd_vid;
- n->not_used = 0;
- n->not_used2 = 0;
return n;
}
@@ -11677,8 +11675,6 @@ rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
{
rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
n->nd_vid = nd_vid;
- n->not_used = 0;
- n->not_used2 = 0;
return n;
}
@@ -11688,8 +11684,6 @@ rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
{
rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
n->nd_vid = nd_vid;
- n->not_used = 0;
- n->not_used2 = 0;
return n;
}
@@ -11699,8 +11693,6 @@ rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
{
rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
n->nd_vid = nd_vid;
- n->not_used = 0;
- n->not_used2 = 0;
return n;
}
@@ -11710,8 +11702,6 @@ rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
{
rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
n->nd_vid = nd_vid;
- n->not_used = 0;
- n->not_used2 = 0;
return n;
}
@@ -11721,8 +11711,6 @@ rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
{
rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
n->nd_vid = nd_vid;
- n->not_used = 0;
- n->not_used2 = 0;
return n;
}
diff --git a/rubyparser.h b/rubyparser.h
index 44ab4eaa50..0258528ed9 100644
--- a/rubyparser.h
+++ b/rubyparser.h
@@ -562,54 +562,40 @@ typedef struct RNode_YIELD {
VALUE not_used2;
} rb_node_yield_t;
-/* RNode_LVAR and RNode_DVAR should be same structure */
typedef struct RNode_LVAR {
NODE node;
ID nd_vid;
- VALUE not_used;
- VALUE not_used2;
} rb_node_lvar_t;
typedef struct RNode_DVAR {
NODE node;
ID nd_vid;
- VALUE not_used;
- VALUE not_used2;
} rb_node_dvar_t;
-/* RNode_GVAR, RNode_IVAR, RNode_CONST and RNode_CVAR should be same structure */
typedef struct RNode_GVAR {
NODE node;
ID nd_vid;
- VALUE not_used;
- VALUE not_used2;
} rb_node_gvar_t;
typedef struct RNode_IVAR {
NODE node;
ID nd_vid;
- VALUE not_used;
- VALUE not_used2;
} rb_node_ivar_t;
typedef struct RNode_CONST {
NODE node;
ID nd_vid;
- VALUE not_used;
- VALUE not_used2;
} rb_node_const_t;
typedef struct RNode_CVAR {
NODE node;
ID nd_vid;
- VALUE not_used;
- VALUE not_used2;
} rb_node_cvar_t;
typedef struct RNode_NTH_REF {