Lines Matching refs:StatePtr

107     /// A StatePtr is effectively a `*State`, but to avoid various inconvenient
110 /// 64 bit, each StatePtr is half the size of a *State.
119 /// This is, of course, a lie. A StatePtr is actually a pointer to the
121 /// this removes the need to multiply the StatePtr by the stride. Yes, it
133 /// represent it with a StatePtr.
134 start_states: Vec<StatePtr>,
157 /// `StatePtr` points to the start of a particular row in this table. When
163 table: Vec<StatePtr>,
178 start: StatePtr,
191 last_match_si: StatePtr,
314 /// `StatePtr` is a 32 bit pointer to the start of a row in the transition
338 /// kinds always contain a "valid" `StatePtr` (indicated by the `STATE_MAX`
358 type StatePtr = u32;
362 const STATE_UNKNOWN: StatePtr = 1 << 31;
366 const STATE_DEAD: StatePtr = STATE_UNKNOWN + 1;
371 const STATE_QUIT: StatePtr = STATE_DEAD + 1;
376 const STATE_START: StatePtr = 1 << 30;
381 const STATE_MATCH: StatePtr = 1 << 29;
389 const STATE_MAX: StatePtr = STATE_MATCH - 1;
440 self.size = (self.start_states.len() * mem::size_of::<StatePtr>())
853 unsafe fn next_si(&self, si: StatePtr, text: &[u8], i: usize) -> StatePtr {
894 mut si: StatePtr,
896 ) -> Option<StatePtr> {
1150 current_state: Option<&mut StatePtr>,
1151 ) -> Option<StatePtr> {
1254 current_state: Option<&mut StatePtr>,
1322 fn restore_state(&mut self, state: State) -> Option<StatePtr> {
1347 si: StatePtr,
1349 ) -> Option<StatePtr> {
1372 ) -> Option<StatePtr> {
1462 fn state(&self, si: StatePtr) -> &State {
1470 /// StatePtr.
1474 fn add_state(&mut self, state: State) -> Option<StatePtr> {
1497 + mem::size_of::<StatePtr>();
1565 fn start_ptr(&self, si: StatePtr) -> StatePtr {
1599 map: HashMap<State, StatePtr>,
1600 /// Our set of states. Note that `StatePtr / num_byte_classes` indexes
1601 /// this Vec rather than just a `StatePtr`.
1620 fn get_ptr(&self, state: &State) -> Option<StatePtr> {
1624 fn get_state(&self, si: StatePtr) -> Option<&State> {
1628 fn insert(&mut self, state: State, si: StatePtr) {
1656 fn add(&mut self) -> Option<StatePtr> {
1671 fn set_next(&mut self, si: StatePtr, cls: usize, next: StatePtr) {
1676 fn next(&self, si: StatePtr, cls: usize) -> StatePtr {
1682 self.num_byte_classes * mem::size_of::<StatePtr>()
1686 unsafe fn next_unchecked(&self, si: StatePtr, cls: usize) -> StatePtr {
1772 struct TransitionsRow<'a>(&'a [StatePtr]);
1822 fn show_state_ptr(si: StatePtr) -> String {