-
Notifications
You must be signed in to change notification settings - Fork 2.1k
DalvikVSJvm
Bob Pan edited this page Nov 3, 2014
·
1 revision
- AccessFlags: Dalvik remove
ACC_SUPER
, in a non interface classACC_SUPER
should been added. - Signature: Dalvik use a
Ldalvik/annotation/Signature;
annotation to store signature. - MemberClasses: Dalvik use a
Ldalvik/annotation/MemberClasses;
annotation, and*$1,*$2...*$n
not included. -
Ldalvik/annotation/InnerClass;
TODO -
Ldalvik/annotation/EnclosingClass;
TODO -
Ldalvik/annotation/EnclosingMethod;
TODO
- Signature: Dalvik use a
Ldalvik/annotation/Signature;
annotation to store signature.
- Signature: Dalvik use a
Ldalvik/annotation/Signature;
annotation to store signature. - Throws: Dalvik use a
Ldalvik/annotation/Throws;
annotation to declare method throws.
- Register: Dalvik code is register-based, and put 'this' and parameters to the tail of the register array. e.g. a virtual davlik method which has 2 locals and 2 parameters, the register array is
[local1,local2,this,param1,param2]
, but same method in jvm local array is[this,param1,param2,local1,local2]
- Instruction: Dalvik use a 3-address code jvm use stack-based bytecode, more
xLoad
instruction should added. e.g. to call a virtual methodResourceBundle.getString(String)
dalvik use[invoke-virtual {v2, v3};]
, and jvm use[aload 2; aload 3; invokevirtual;]
- Zero and Null: Dalvik treat them as same