diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-03-31 08:21:36 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-03-31 14:39:00 +1100 |
| commit | f68a0449ed4e49705e2ee70be6e5678aa426b206 (patch) | |
| tree | b978668d9df0404b7c8b51391d6920eb70d094cb /compiler/rustc_codegen_llvm/src | |
| parent | 048bd67d513d23341431da208aa7ec075d6252b2 (diff) | |
| download | rust-f68a0449ed4e49705e2ee70be6e5678aa426b206.tar.gz rust-f68a0449ed4e49705e2ee70be6e5678aa426b206.zip | |
Remove `MatcherPos::stack`.
`parse_tt` needs a way to get from within submatchers make to the enclosing submatchers. Currently it has two distinct mechanisms for this: - `Delimited` submatchers use `MatcherPos::stack` to record stuff about the parent (and further back ancestors). - `Sequence` submatchers use `MatcherPosSequence::parent` to point to the parent matcher position. Having two mechanisms is really confusing, and it took me a long time to understand all this. This commit eliminates `MatcherPos::stack`, and changes `Delimited` submatchers to use the same mechanism as sequence submatchers. That mechanism is also changed a bit: instead of storing the entire parent `MatcherPos`, we now only store the necessary parts from the parent `MatcherPos`. Overall this is a small performance win, with the positives outweighing the negatives, but it's mostly for clarity.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
