aboutsummaryrefslogtreecommitdiffstats
path: root/node.h
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2020-08-02 01:03:43 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-08-02 01:04:06 +0900
commitfcdbdff631a1a6bcc2229d448ed7c76041fe3258 (patch)
treecb73eb7446f547b744365e9141657f4790ab92b2 /node.h
parentb6175c9e4fe25b978252d8998fe791d65d998fc5 (diff)
downloadruby-fcdbdff631a1a6bcc2229d448ed7c76041fe3258.tar.gz
rb_{ary,fnd}_pattern_info: Remove imemo member to reduce memory usage
This is a partial revert commit of 8f096226e1b76f95f4d853d3dea2bc75eeeb5244. NODE layout: Before: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | pconst | pconst | pconst u2 | unused | unused | pkwargs u3 | apinfo | fpinfo | pkwrestarg After: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | imemo | imemo | pkwargs u2 | pconst | pconst | pconst u3 | apinfo | fpinfo | pkwrestarg
Diffstat (limited to 'node.h')
-rw-r--r--node.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/node.h b/node.h
index 8252955ef2..b6fefb4410 100644
--- a/node.h
+++ b/node.h
@@ -273,8 +273,8 @@ typedef struct RNode {
#define nd_brace u2.argc
-#define nd_pconst u1.node
-#define nd_pkwargs u2.node
+#define nd_pkwargs u1.node
+#define nd_pconst u2.node
#define nd_pkwrestarg u3.node
#define nd_apinfo u3.apinfo
@@ -458,14 +458,12 @@ struct rb_ary_pattern_info {
NODE *pre_args;
NODE *rest_arg;
NODE *post_args;
- VALUE imemo;
};
struct rb_fnd_pattern_info {
NODE *pre_rest_arg;
NODE *args;
NODE *post_rest_arg;
- VALUE imemo;
};
struct parser_params;