Reputation: 5463
jvm has bytecodes like aload/asotre
, iload/istore
, dload/dstore
, if these instructions appear, we know that they are to read or store local variables, but dalvik vm has a lot of registers. i want to know how to determine which instructions are to read or store local variables?
Or is there any algorithm to determine which registers are local variables?
Can I assume that all register instructions operate on local variables?
Upvotes: 0
Views: 44
Reputation: 5463
All dalvik instruction's read/write operation can be considered on local variables table
like jvm, except invoke
, filled-new-array
which result can not be ignore will follow move-result-xxx
instruction.
local variable can be eliminates by some algorithms like copy propagation, constant folding
the variables can be eliminates by algorithms are variables on jvm operand stack.
Upvotes: 0