nwagu
nwagu

Reputation: 730

Smali invoke-virtual/range for String

I am studying the smali code from my decompiled apk. I am not used to this but I am getting the hang of it. I have now been stuck for some time at this line:

invoke-virtual/range {p1 .. p1}, Ljava/lang/String;->hashCode()I

Why is range used for String? I also know that p1 contains a String. Why is it not

invoke-virtual {p1}, Ljava/lang/String;->hashCode()I

Upvotes: 0

Views: 1309

Answers (1)

JesusFreke
JesusFreke

Reputation: 20282

The two instructions are equivalent. There's no particular reason to choose one over the other in this specific case.

Upvotes: 1

Related Questions