rose: add CHECK_SINGLE_LOOKAROUND instruction

This specialisation is cheaper than the shufti-based variants, so we
prefer it for single character class tests.
This commit is contained in:
Xu, Chi
2016-09-05 12:19:15 +08:00
committed by Matthew Barr
parent 385f71b44e
commit 997787bd4b
6 changed files with 124 additions and 0 deletions

View File

@@ -112,6 +112,15 @@ void RoseInstrCheckNotHandled::write(void *dest, RoseEngineBlob &blob,
inst->fail_jump = calc_jump(offset_map, this, target);
}
void RoseInstrCheckSingleLookaround::write(void *dest, RoseEngineBlob &blob,
const OffsetMap &offset_map) const {
RoseInstrBase::write(dest, blob, offset_map);
auto *inst = static_cast<impl_type *>(dest);
inst->offset = offset;
inst->reach_index = reach_index;
inst->fail_jump = calc_jump(offset_map, this, target);
}
void RoseInstrCheckLookaround::write(void *dest, RoseEngineBlob &blob,
const OffsetMap &offset_map) const {
RoseInstrBase::write(dest, blob, offset_map);