mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: show operations on BITSTACK
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6c77004900
commit
ed34d855bb
1 changed files with 4 additions and 4 deletions
8
parse.y
8
parse.y
|
@ -109,11 +109,11 @@ typedef VALUE stack_type;
|
|||
|
||||
static void show_bitstack(stack_type, const char *, int);
|
||||
# define SHOW_BITSTACK(stack, name) (yydebug ? show_bitstack(stack, name, __LINE__) : (void)0)
|
||||
# define BITSTACK_PUSH(stack, n) (((stack) = ((stack)<<1)|((n)&1)), SHOW_BITSTACK(stack, #stack))
|
||||
# define BITSTACK_POP(stack) (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack))
|
||||
# define BITSTACK_LEXPOP(stack) (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack))
|
||||
# define BITSTACK_PUSH(stack, n) (((stack) = ((stack)<<1)|((n)&1)), SHOW_BITSTACK(stack, #stack"(push)"))
|
||||
# define BITSTACK_POP(stack) (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack"(pop)"))
|
||||
# define BITSTACK_LEXPOP(stack) (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack"(lexpop)"))
|
||||
# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(stack, #stack), (stack)&1)
|
||||
# define BITSTACK_SET(stack, n) ((stack)=(n), SHOW_BITSTACK(stack, #stack))
|
||||
# define BITSTACK_SET(stack, n) ((stack)=(n), SHOW_BITSTACK(stack, #stack"(set)"))
|
||||
|
||||
#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
|
||||
#define COND_POP() BITSTACK_POP(cond_stack)
|
||||
|
|
Loading…
Reference in a new issue