Skip to content

Commit

Permalink
feat: parametersCount for InlineSmaliCompiler instead of `paramet…
Browse files Browse the repository at this point in the history
…ers`
  • Loading branch information
oSumAtrIX committed Jun 20, 2022
1 parent fd690ac commit ad6c5c8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class InlineSmaliCompiler {
}
}

fun String.toInstructions(parameters: String = "", registers: Int = 1, forStaticMethod: Boolean = true) =
InlineSmaliCompiler.compileMethodInstructions(this, parameters, registers, forStaticMethod)
fun String.toInstructions(parametersCount: Int = 0, registers: Int = 1, forStaticMethod: Boolean = true) =
InlineSmaliCompiler.compileMethodInstructions(this, "I".repeat(parametersCount), registers, forStaticMethod)

fun String.toInstruction(parameters: String = "", registers: Int = 1, forStaticMethod: Boolean = true) =
this.toInstructions(parameters, registers, forStaticMethod).first()
fun String.toInstruction(parametersCount: Int = 0, registers: Int = 1, forStaticMethod: Boolean = true) =
this.toInstructions(parametersCount, registers, forStaticMethod).first()

0 comments on commit ad6c5c8

Please sign in to comment.