aboutsummaryrefslogtreecommitdiffstats
path: root/node.h
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 16:19:07 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-11-01 16:19:07 +0900
commite03e1982bdc2d815298b211d44534908d79aec4e (patch)
treeedb06eabeb1365fb33cdd7702fcf59499df26fa2 /node.h
parent305c79af2f3358f3c330b00c6a883634894bc35c (diff)
downloadruby-e03e1982bdc2d815298b211d44534908d79aec4e.tar.gz
Change NODE layout for pattern matching
I prefer pconst to be the first element of NODE. Before: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | imemo | imemo | pkwargs u2 | pconst | pconst | pconst u3 | apinfo | fpinfo | pkwrestarg After: | ARYPTN | FNDPTN | HSHPTN ---+--------+--------+----------- u1 | pconst | pconst | pconst u2 | imemo | imemo | pkwargs u3 | apinfo | fpinfo | pkwrestarg
Diffstat (limited to 'node.h')
-rw-r--r--node.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/node.h b/node.h
index 3b8b3313f2..d9dfaa5c2d 100644
--- a/node.h
+++ b/node.h
@@ -273,8 +273,8 @@ typedef struct RNode {
#define nd_brace u2.argc
-#define nd_pkwargs u1.node
-#define nd_pconst u2.node
+#define nd_pconst u1.node
+#define nd_pkwargs u2.node
#define nd_pkwrestarg u3.node
#define nd_apinfo u3.apinfo