[aat] Simplify unsafe-to-break logic
This commit is contained in:
parent
cc1e0840ba
commit
f49256d80f
|
@ -639,15 +639,10 @@ struct StateTableDriver
|
||||||
* go differently if we start from state 0 here. */
|
* go differently if we start from state 0 here. */
|
||||||
if (state && buffer->idx)
|
if (state && buffer->idx)
|
||||||
{
|
{
|
||||||
/* Special-case easy cases: if starting here at state 0 is not
|
/* If starting here at state 0 has the exact same entry, it's safe
|
||||||
* actionable, and leads to the same next state, then it's safe.
|
* to break as before as far as we are concerned. */
|
||||||
* Let's hope... Maybe disable the conditional later, if proves
|
|
||||||
* insufficient. */
|
|
||||||
const Entry<EntryData> *start_entry = machine.get_entryZ (0, klass);
|
const Entry<EntryData> *start_entry = machine.get_entryZ (0, klass);
|
||||||
if (start_entry->newState != entry->newState ||
|
if (memcmp (start_entry, entry, sizeof (*entry)))
|
||||||
(start_entry->flags & context_t::DontAdvance) != (entry->flags & context_t::DontAdvance) ||
|
|
||||||
c->is_actionable (this, entry) ||
|
|
||||||
c->is_actionable (this, start_entry))
|
|
||||||
buffer->unsafe_to_break (buffer->idx - 1, buffer->idx + 1);
|
buffer->unsafe_to_break (buffer->idx - 1, buffer->idx + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue