[analyzer] initial optimization of `switch (constant)` (not perfect yet)