Package com.android.dx.dex.code
Class LocalStart
java.lang.Object
com.android.dx.dex.code.DalvInsn
com.android.dx.dex.code.ZeroSizeInsn
com.android.dx.dex.code.LocalStart
Pseudo-instruction which is used to introduce a new local variable. That
is, an instance of this class in an instruction stream indicates that
starting with the subsequent instruction, the indicated variable
is bound.
-
Constructor Summary
ConstructorDescriptionLocalStart
(SourcePosition position, RegisterSpec local) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Gets the string form for any arguments to this instance.getLocal()
Gets the register spec representing the local variable introduced by this instance.protected String
listingString0
(boolean noteIndices) Helper forDalvInsn.listingString(java.lang.String, int, boolean)
, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting.static String
localString
(RegisterSpec spec) Returns the local variable listing string for a single register spec.withMapper
(RegisterMapper mapper) Returns an instance that is just like this one, except that the register list is mapped by usingmapper
.withRegisterOffset
(int delta) Returns an instance that is just like this one, except that all register references have been offset by the given delta, and its address is reset.withRegisters
(RegisterSpecList registers) Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.Methods inherited from class com.android.dx.dex.code.ZeroSizeInsn
codeSize, withOpcode, writeTo
Methods inherited from class com.android.dx.dex.code.DalvInsn
cstComment, cstString, expandedPrefix, expandedSuffix, expandedVersion, getAddress, getLowRegVersion, getMinimumRegisterRequirement, getNextAddress, getOpcode, getPosition, getRegisters, hasAddress, hasResult, identifierString, listingString, makeMove, setAddress, toString
-
Constructor Details
-
LocalStart
Constructs an instance. The output address of this instance is initially unknown (-1
).- Parameters:
position
-non-null;
source positionlocal
-non-null;
register spec representing the local variable introduced by this instance
-
-
Method Details
-
localString
Returns the local variable listing string for a single register spec.- Parameters:
spec
-non-null;
the spec to convert- Returns:
non-null;
the string form
-
withRegisterOffset
Returns an instance that is just like this one, except that all register references have been offset by the given delta, and its address is reset.- Overrides:
withRegisterOffset
in classZeroSizeInsn
- Parameters:
delta
- the amount to offset register references by- Returns:
non-null;
an appropriately-constructed instance
-
withRegisters
Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset.- Specified by:
withRegisters
in classDalvInsn
- Parameters:
registers
-non-null;
new register list- Returns:
non-null;
an appropriately-constructed instance
-
getLocal
Gets the register spec representing the local variable introduced by this instance.- Returns:
non-null;
the register spec
-
argString
Gets the string form for any arguments to this instance. Subclasses must override this. -
listingString0
Helper forDalvInsn.listingString(java.lang.String, int, boolean)
, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting. This method should returnnull
if this instance should not appear in a listing.- Specified by:
listingString0
in classDalvInsn
- Parameters:
noteIndices
- whether to include an explicit notation of constant pool indices- Returns:
null-ok;
the listing string
-
withMapper
Returns an instance that is just like this one, except that the register list is mapped by usingmapper
.- Overrides:
withMapper
in classDalvInsn
- Parameters:
mapper
-non-null;
used to map registers- Returns:
non-null;
an appropriately-constructed instance
-