mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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
This commit is contained in:
parent
305c79af2f
commit
e03e1982bd
3 changed files with 11 additions and 7 deletions
4
node.h
4
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue