You've already forked revanced-patcher
mirror of
https://github.com/revanced/revanced-patcher
synced 2025-09-10 05:30:49 +02:00
Compare commits
3 Commits
v1.0.0-dev
...
v1.0.0-dev
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fa0412985c | ||
![]() |
0048788dd0 | ||
![]() |
47eb493f54 |
@@ -1,3 +1,10 @@
|
||||
# [1.0.0-dev.8](https://github.com/ReVancedTeam/revanced-patcher/compare/v1.0.0-dev.7...v1.0.0-dev.8) (2022-03-24)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* check type instead of class ([47eb493](https://github.com/ReVancedTeam/revanced-patcher/commit/47eb493f5425dc27a4d6e79e6b02a36ef760e8da))
|
||||
|
||||
# [1.0.0-dev.7](https://github.com/ReVancedTeam/revanced-patcher/compare/v1.0.0-dev.6...v1.0.0-dev.7) (2022-03-24)
|
||||
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 1.0.0-dev.7
|
||||
version = 1.0.0-dev.8
|
||||
|
@@ -129,13 +129,7 @@ private fun InsnList.scanFor(pattern: IntArray): ScanResult {
|
||||
var occurrence = 0
|
||||
while (i + occurrence < this.size()) {
|
||||
val n = this[i + occurrence]
|
||||
if (
|
||||
!n.anyOf(
|
||||
LabelNode::class.java,
|
||||
LineNumberNode::class.java
|
||||
) &&
|
||||
n.opcode != pattern[occurrence]
|
||||
) break
|
||||
if (!n.shouldSkip() && n.opcode != pattern[occurrence]) break
|
||||
if (++occurrence >= pattern.size) {
|
||||
val current = i + occurrence
|
||||
return ScanResult(true, current - pattern.size, current)
|
||||
@@ -158,5 +152,5 @@ private fun Array<Type>.convertObjects(): Array<Type> {
|
||||
return this.map { it.convertObject() }.toTypedArray()
|
||||
}
|
||||
|
||||
private fun AbstractInsnNode.anyOf(vararg types: Class<*>): Boolean =
|
||||
types.any { this@anyOf.javaClass == it }
|
||||
private fun AbstractInsnNode.shouldSkip() =
|
||||
type == AbstractInsnNode.LABEL || type == AbstractInsnNode.LINE
|
||||
|
Reference in New Issue
Block a user