Support multiple shorthand expansions in the code generator
A longhand that's part of some shorthand expansion needs manual attention in the code template if that longhand is behind a flag. This CL fixes that by generating shorthand expansions for all possible runtime flag configurations (for relevant flags), and selecting the correct one dynamically. We assume that the flag-protected longhand will appear/disappear "in-place" in the list of longhands. In other words, if some runtime flag were to reorder longhands, manual code will still be needed in the template. Since this CL means we'll generate 2^N expansions for N flags, there's currently a limit of 4 flags per shorthand (which should be generous enough). Bug: 1096015 Fixed: 1094236 Change-Id: I99d321b971ea2b746688829f35a868db7d0f5f3b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250242 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by:Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#780062}
Showing
Please register or sign in to comment