Never inline lookup_slow.
This commit is contained in:
parent
34ac75be28
commit
22725588d3
2 changed files with 4 additions and 0 deletions
|
|
@ -433,6 +433,8 @@ pub mod grapheme_extend {
|
|||
pub fn lookup(c: char) -> bool {
|
||||
(c as u32) >= 0x300 && lookup_slow(c)
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
fn lookup_slow(c: char) -> bool {
|
||||
const {
|
||||
assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > (char::MAX as u32));
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ impl RawEmitter {
|
|||
writeln!(&mut self.file, " (c as u32) >= {first_code_point:#04x} && lookup_slow(c)")
|
||||
.unwrap();
|
||||
writeln!(&mut self.file, "}}").unwrap();
|
||||
writeln!(&mut self.file).unwrap();
|
||||
writeln!(&mut self.file, "#[inline(never)]").unwrap();
|
||||
writeln!(&mut self.file, "fn lookup_slow(c: char) -> bool {{").unwrap();
|
||||
} else {
|
||||
writeln!(&mut self.file, "pub fn lookup(c: char) -> bool {{").unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue