//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- // M(TagName) // ClassName == TagName##Inst // MTemplate(TagName, TemplateDeclaration, GenericClassName, SpecializedClassName) // 0x00 M(Nop) // Opcode byte 0x00 is a NOP (allows for NOP-sleds for alignment if necessary) M(Fail) M(Succ) M(Jump) M(JumpIfNotChar) M(MatchCharOrJump) M(JumpIfNotSet) M(MatchSetOrJump) // 0x08 M(Switch2) M(Switch4) M(Switch8) M(Switch16) // 16 = 0x10 M(Switch24) // 24 = 0x18 (support at least 20 slots from previous iteration, less fragmentation (<= 7 empty) M(SwitchAndConsume2) M(SwitchAndConsume4) M(SwitchAndConsume8) M(SwitchAndConsume16) M(SwitchAndConsume24) MTemplate(BOIHardFailTest, template, BOITestInst, BOITestInst) MTemplate(BOITest, template, BOITestInst, BOITestInst) MTemplate(EOIHardFailTest, template, EOITestInst, EOITestInst) MTemplate(EOITest, template, EOITestInst, EOITestInst) M(BOLTest) M(EOLTest) // TODO (doilij) update Tag numbers // 0x10 MTemplate(NegatedWordBoundaryTest, template, WordBoundaryTestInst, WordBoundaryTestInst) MTemplate(WordBoundaryTest, template, WordBoundaryTestInst, WordBoundaryTestInst) M(MatchChar) M(MatchChar2) M(MatchChar3) M(MatchChar4) MTemplate(MatchSet, template, MatchSetInst, MatchSetInst) MTemplate(MatchNegatedSet, template, MatchSetInst, MatchSetInst) M(MatchLiteral) // 0x18 M(MatchLiteralEquiv) M(MatchTrie) M(OptMatchChar) M(OptMatchSet) M(SyncToCharAndContinue) M(SyncToChar2SetAndContinue) MTemplate(SyncToSetAndContinue, template, SyncToSetAndContinueInst, SyncToSetAndContinueInst) MTemplate(SyncToNegatedSetAndContinue, template, SyncToSetAndContinueInst, SyncToSetAndContinueInst) // 0x20 M(SyncToChar2LiteralAndContinue) // SyncToLiteralAndContinueInstT M(SyncToLiteralAndContinue) // SyncToLiteralAndContinueInstT M(SyncToLinearLiteralAndContinue) // SyncToLiteralAndContinueInstT M(SyncToLiteralEquivAndContinue) // SyncToLiteralAndContinueInstT M(SyncToLiteralEquivTrivialLastPatCharAndContinue) // SyncToLiteralAndContinueInstT M(SyncToCharAndConsume) M(SyncToChar2SetAndConsume) MTemplate(SyncToSetAndConsume, template, SyncToSetAndConsumeInst, SyncToSetAndConsumeInst) // 0x28 MTemplate(SyncToNegatedSetAndConsume, template, SyncToSetAndConsumeInst, SyncToSetAndConsumeInst) M(SyncToChar2LiteralAndConsume) // SyncToLiteralAndConsumeInstT M(SyncToLiteralAndConsume) // SyncToLiteralAndConsumeInstT M(SyncToLinearLiteralAndConsume) // SyncToLiteralAndConsumeInstT M(SyncToLiteralEquivAndConsume) // SyncToLiteralAndConsumeInstT M(SyncToLiteralEquivTrivialLastPatCharAndConsume) // SyncToLiteralAndConsumeInstT M(SyncToCharAndBackup) // REVIEW (doilij): why not have a SyncToChar2SetAndBackup ? MTemplate(SyncToSetAndBackup, template, SyncToSetAndBackupInst, SyncToSetAndBackupInst) // 0x30 MTemplate(SyncToNegatedSetAndBackup, template, SyncToSetAndBackupInst, SyncToSetAndBackupInst) M(SyncToChar2LiteralAndBackup) // SyncToLiteralAndBackupInstT M(SyncToLiteralAndBackup) // SyncToLiteralAndBackupInstT M(SyncToLinearLiteralAndBackup) // SyncToLiteralAndBackupInstT M(SyncToLiteralEquivAndBackup) // SyncToLiteralAndBackupInstT M(SyncToLiteralEquivTrivialLastPatCharAndBackup) // SyncToLiteralAndBackupInstT M(SyncToLiteralsAndBackup) M(MatchGroup) // 0x38 M(BeginDefineGroup) M(EndDefineGroup) M(DefineGroupFixed) M(BeginLoop) M(RepeatLoop) M(BeginLoopIfChar) M(BeginLoopIfSet) M(RepeatLoopIfChar) // 0x40 M(RepeatLoopIfSet) M(BeginLoopFixed) M(RepeatLoopFixed) M(LoopSet) M(LoopSetWithFollowFirst) M(BeginLoopFixedGroupLastIteration) M(RepeatLoopFixedGroupLastIteration) M(BeginGreedyLoopNoBacktrack) // 0x48 M(RepeatGreedyLoopNoBacktrack) MTemplate(ChompCharStar, template, ChompCharInst, ChompCharInst) MTemplate(ChompCharPlus, template, ChompCharInst, ChompCharInst) MTemplate(ChompSetStar, template, ChompSetInst, ChompSetInst) MTemplate(ChompSetPlus, template, ChompSetInst, ChompSetInst) MTemplate(ChompCharGroupStar, template, ChompCharGroupInst, ChompCharGroupInst) MTemplate(ChompCharGroupPlus, template, ChompCharGroupInst, ChompCharGroupInst) MTemplate(ChompSetGroupStar, template, ChompSetGroupInst, ChompSetGroupInst) // 0x50 MTemplate(ChompSetGroupPlus, template, ChompSetGroupInst, ChompSetGroupInst) M(ChompCharBounded) M(ChompSetBounded) M(ChompSetBoundedGroupLastChar) M(Try) M(TryIfChar) M(TryMatchChar) M(TryIfSet) // 0x58 M(TryMatchSet) M(BeginAssertion) M(EndAssertion)