]> git.ipfire.org Git - thirdparty/bird.git/commit
Filter: Change linearization of branches in switch instruction
authorOndrej Zajicek <santiago@crfreenet.org>
Sat, 7 Jan 2023 19:18:44 +0000 (20:18 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sat, 7 Jan 2023 19:18:44 +0000 (20:18 +0100)
commite20bef69ccc4a85ef62359ee539c9db2dbe09127
tree1b45ebbcb62cf8d8da5f4e173e39dc0b5e26e770
parentd1cd5e5a63b2256eb71661f7438537e4ded7b01a
Filter: Change linearization of branches in switch instruction

Most branching instructions (FI_CONDITION, FI_AND, FI_OR) linearize its
branches in a recursive way, while FI_SWITCH branches are linearized
from parser even before the switch instruction is allocated.

Change linearization of FI_SWITCH branches to make it similar to other
branching instructions. This also fixes an issue with constant
switch evaluation, where linearized branch is mistaken for
non-linearized during switch construction.

Thanks to Jiten Kumar Pathy for the bugreport.
filter/config.Y
filter/data.h
filter/f-inst.c
filter/tree.c