There is the start of official Jasmin HelloWorld example.
.class public NoJad.j
.super java/lang/Object
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit stack 2
...
Why there is aload_0 instruction? What does local var 0 consists?
It is calling a constructor of a base class (
Objectin this case):In non-static methods local variable under index
0is alwaysthisreference soaload_0pushesthisreference at the top of the reference stack. Theninvokenonvirtualcalls designated method (Object/<init>()) on an object at the top of the stack (this).