From 4b2972990eb9421df494abb3e047a1e7e807ba1a Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Thu, 5 Sep 2024 16:16:00 +0000 Subject: [PATCH] add missing inlines --- parser/src/earley/parser.rs | 1 + parser/src/earley/regexvec.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/parser/src/earley/parser.rs b/parser/src/earley/parser.rs index e6fc7803..5a520116 100644 --- a/parser/src/earley/parser.rs +++ b/parser/src/earley/parser.rs @@ -1595,6 +1595,7 @@ impl BiasComputer for DefaultBiasComputer { } impl<'a> Recognizer for ParserRecognizer<'a> { + #[inline(always)] fn pop_bytes(&mut self, num: usize) { self.state.pop_lexer_states(num); } diff --git a/parser/src/earley/regexvec.rs b/parser/src/earley/regexvec.rs index 24205426..b91ae567 100644 --- a/parser/src/earley/regexvec.rs +++ b/parser/src/earley/regexvec.rs @@ -64,6 +64,7 @@ impl RegexVec { self.insert_state(vec_desc) } + #[inline(always)] pub fn state_desc(&self, state: StateID) -> &StateDesc { &self.state_descs[state.as_usize()] }