]> git.kaiwu.me - njs.git/commit
Generator: derive property swap from node.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 4 Mar 2026 07:22:52 +0000 (23:22 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 12 Mar 2026 22:26:01 +0000 (15:26 -0700)
commit5f2fc915eed0701464c8711723fec9dc4bc2dc35
tree320f86f6888068b4caa6d2f36e46e5ada088ce8e
parentf569076f9783c789f8eae7ca0e6e9d73c845ccca
Generator: derive property swap from node.

Previously, the "in" operator swap flag was relayed through generator
context.  This broke when call-end handlers switched to
njs_generator_stack_pop(NULL), which released the context before the
swap was read in njs_generate_3addr_operation_end().

The fix derives the swap directly from the node token type
(NJS_TOKEN_IN), eliminating the context relay.
src/njs_generator.c