Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node.c: fix NODE_OP_ASGN1 operator #1528

Closed
wants to merge 2 commits into from

Conversation

1 participant
@fate0
Copy link

commented Feb 26, 2017

ary[1] &&= foo

old:

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_PRELUDE (line: 1)
#     +- nd_head:
#     |   (null node)
#     +- nd_body:
#     |   @ NODE_OP_ASGN1 (line: 1)
#     |   +- nd_recv:
#     |   |   @ NODE_VCALL (line: 1)
#     |   |   +- nd_mid: :ary
#     |   +- nd_vid: (internal variable)
#     |   +- nd_args->nd_body:
#     |   |   @ NODE_VCALL (line: 1)
#     |   |   +- nd_mid: :foo
#     |   +- nd_args->nd_head:
#     |       @ NODE_ARRAY (line: 1)
#     |       +- nd_alen: 1
#     |       +- nd_head:
#     |       |   @ NODE_LIT (line: 1)
#     |       |   +- nd_lit: 1
#     |       +- nd_next:
#     |           (null node)
#     +- nd_compile_option: false

nd_vid: (internal variable), It should use nd_mid

new:

# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_PRELUDE (line: 1)
#     +- nd_head:
#     |   (null node)
#     +- nd_body:
#     |   @ NODE_OP_ASGN1 (line: 1)
#     |   +- nd_recv:
#     |   |   @ NODE_VCALL (line: 1)
#     |   |   +- nd_mid: :ary
#     |   +- nd_mid: 1 (&&)
#     |   +- nd_args->nd_head:
#     |   |   @ NODE_ARRAY (line: 1)
#     |   |   +- nd_alen: 1
#     |   |   +- nd_head:
#     |   |   |   @ NODE_LIT (line: 1)
#     |   |   |   +- nd_lit: 1
#     |   |   +- nd_next:
#     |   |       (null node)
#     |   +- nd_args->nd_body:
#     |       @ NODE_VCALL (line: 1)
#     |       +- nd_mid: :foo
#     +- nd_compile_option: false

@hsbt hsbt closed this in 5c5d894 Feb 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.