mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-31 07:01:02 +00:00
match opcode sequence matching to fingerprint
This commit is contained in:
@@ -922,10 +922,18 @@ fun MutablePredicateList<Method>.custom(block: Predicate<Method>) {
|
||||
predicate { block() }
|
||||
}
|
||||
|
||||
fun MutablePredicateList<Method>.opcodes(vararg opcodes: Opcode) = instructions { opcodes.forEach { +it() } }
|
||||
fun MutablePredicateList<Method>.opcodes(vararg opcodes: Opcode) =
|
||||
instructions {
|
||||
+opcodes.first()()
|
||||
opcodes.drop(1).forEach { +after(it()) }
|
||||
}
|
||||
|
||||
context(matchers: MutableList<IndexedMatcher<Instruction>>)
|
||||
fun MutablePredicateList<Method>.opcodes(vararg opcodes: Opcode) = instructions { opcodes.forEach { +it() } }
|
||||
fun MutablePredicateList<Method>.opcodes(vararg opcodes: Opcode) =
|
||||
instructions {
|
||||
+opcodes.first()()
|
||||
opcodes.drop(1).forEach { +after(it()) }
|
||||
}
|
||||
|
||||
private fun Array<out String>.toUnorderedStringPredicates() = unorderedAllOf(predicates = map { string(it) }.toTypedArray())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user