mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
Shave 4 bytes from parse_node_t
Bitfields ftw
This commit is contained in:
@@ -1149,7 +1149,9 @@ void parse_ll_t::accept_tokens(parse_token_t token1, parse_token_t token2)
|
||||
// Get the production for the top of the stack
|
||||
parse_stack_element_t &stack_elem = symbol_stack.back();
|
||||
parse_node_t &node = nodes.at(stack_elem.node_idx);
|
||||
const production_t *production = production_for_token(stack_elem.type, token1, token2, &node.tag);
|
||||
parse_node_tag_t tag = 0;
|
||||
const production_t *production = production_for_token(stack_elem.type, token1, token2, &tag);
|
||||
node.tag = tag;
|
||||
if (production == NULL)
|
||||
{
|
||||
parse_error_failed_production(stack_elem, token1);
|
||||
|
||||
@@ -103,10 +103,10 @@ class parse_node_t
|
||||
enum parse_keyword_t keyword;
|
||||
|
||||
/* Node flags */
|
||||
parse_node_flags_t flags;
|
||||
parse_node_flags_t flags:4;
|
||||
|
||||
/* This is used to store e.g. the statement decoration. */
|
||||
parse_node_tag_t tag;
|
||||
parse_node_tag_t tag:4;
|
||||
|
||||
/* Description */
|
||||
wcstring describe(void) const;
|
||||
|
||||
Reference in New Issue
Block a user