about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-09-21 14:01:39 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-09-26 08:28:45 +1000
commit66e9b1149c7fbc1fb8108de72b9da1ec0f35afec (patch)
treee3194c6bc747d0cc8115be4c83a0b9d96905df5b /compiler/rustc_codegen_gcc
parentf3fafbb006ee98635874f73e480655912b465e65 (diff)
downloadrust-66e9b1149c7fbc1fb8108de72b9da1ec0f35afec.tar.gz
rust-66e9b1149c7fbc1fb8108de72b9da1ec0f35afec.zip
Rearrange `TokenTreesReader::parse_token_tree`.
`parse_token_tree` is basically a match with four arms: `Eof`,
`OpenDelim`, `CloseDelim`, and "other". It has two call sites, and at
each call site one of the arms is unreachable. It's also not inlined.

This commit removes `parse_token_tree` by splitting it into four
functions and inlining them. This avoids some repeated conditional
tests and also some non-inlined function calls on the hot path.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions