Neo
Neo

Reputation: 5463

How to identify dalvik bytecode load or store local variables?

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

Answers (1)

Neo
Neo

Reputation: 5463

  1. local variables

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.

  1. local variable vs stack variable

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

Related Questions