@@ -3012,6 +3012,7 @@ impl<T: AsRef<[u32]>> DFA<T> {
30123012 /// Returns the index of the match state for the given ID. If the
30133013 /// given ID does not correspond to a match state, then this may
30143014 /// panic or produce an incorrect result.
3015+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
30153016 fn match_state_index ( & self , id : StateID ) -> usize {
30163017 debug_assert ! ( self . is_match_state( id) ) ;
30173018 // This is one of the places where we rely on the fact that match
@@ -4599,6 +4600,7 @@ impl<T: AsRef<[u32]>> MatchStates<T> {
45994600 ///
46004601 /// The match index is the index of the pattern ID for the given state.
46014602 /// The index must be less than `self.pattern_len(state_index)`.
4603+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
46024604 fn pattern_id ( & self , state_index : usize , match_index : usize ) -> PatternID {
46034605 self . pattern_id_slice ( state_index) [ match_index]
46044606 }
@@ -4607,6 +4609,7 @@ impl<T: AsRef<[u32]>> MatchStates<T> {
46074609 ///
46084610 /// The match state index is the state index minus the state index of the
46094611 /// first match state in the DFA.
4612+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
46104613 fn pattern_len ( & self , state_index : usize ) -> usize {
46114614 self . slices ( ) [ state_index * 2 + 1 ] . as_usize ( )
46124615 }
@@ -4615,24 +4618,28 @@ impl<T: AsRef<[u32]>> MatchStates<T> {
46154618 ///
46164619 /// The match state index is the state index minus the state index of the
46174620 /// first match state in the DFA.
4621+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
46184622 fn pattern_id_slice ( & self , state_index : usize ) -> & [ PatternID ] {
46194623 let start = self . slices ( ) [ state_index * 2 ] . as_usize ( ) ;
46204624 let len = self . pattern_len ( state_index) ;
46214625 & self . pattern_ids ( ) [ start..start + len]
46224626 }
46234627
46244628 /// Returns the pattern ID offset slice of u32 as a slice of PatternID.
4629+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
46254630 fn slices ( & self ) -> & [ PatternID ] {
46264631 wire:: u32s_to_pattern_ids ( self . slices . as_ref ( ) )
46274632 }
46284633
46294634 /// Returns the total number of match states.
4635+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
46304636 fn len ( & self ) -> usize {
46314637 assert_eq ! ( 0 , self . slices( ) . len( ) % 2 ) ;
46324638 self . slices ( ) . len ( ) / 2
46334639 }
46344640
46354641 /// Returns the pattern ID slice of u32 as a slice of PatternID.
4642+ #[ cfg_attr( feature = "perf-inline" , inline( always) ) ]
46364643 fn pattern_ids ( & self ) -> & [ PatternID ] {
46374644 wire:: u32s_to_pattern_ids ( self . pattern_ids . as_ref ( ) )
46384645 }
0 commit comments