Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.rop.code

public final Class ConservativeTranslationAdvice

extends Object
implements TranslationAdvice
Class Inheritance
All Implemented Interfaces
org.droidparts.dexmaker.dx.rop.code.TranslationAdvice

Implementation of TranslationAdvice which conservatively answers false to all methods.

Field Summary

Modifier and TypeField and Description
public static final ConservativeTranslationAdvice
THE_ONE

non-null; standard instance of this class

Constructor Summary

AccessConstructor and Description
private
ConservativeTranslationAdvice()

This class is not publicly instantiable.

Method Summary

Modifier and TypeMethod and Description
public int
getMaxOptimalRegisterCount()

Implements org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.getMaxOptimalRegisterCount.

Gets the maximum register width that can be represented optimally.
public boolean
hasConstantOperation(Rop
non-null; the opcode
opcode
,
RegisterSpec
non-null; the first source
sourceA
,
RegisterSpec
non-null; the second source
sourceB
)

Implements org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.hasConstantOperation.

Returns an indication of whether the target can directly represent an instruction with the given opcode operating on the given arguments, where the last source argument is used as a constant.
public boolean
requiresSourcesInOrder(Rop
non-null; opcode
opcode
,
RegisterSpecList
non-null; source list
sources
)

Implements org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.requiresSourcesInOrder.

Returns true if the translation target requires the sources of the specified opcode to be in order and contiguous (eg, for an invoke-range)
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

THE_ONEback to summary
public static final ConservativeTranslationAdvice THE_ONE

non-null; standard instance of this class

Constructor Detail

ConservativeTranslationAdviceback to summary
private ConservativeTranslationAdvice()

This class is not publicly instantiable. Use THE_ONE.

Method Detail

getMaxOptimalRegisterCountback to summary
public int getMaxOptimalRegisterCount()

Implements org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.getMaxOptimalRegisterCount.

Doc from org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.getMaxOptimalRegisterCount.

Gets the maximum register width that can be represented optimally. For example, Dex bytecode does not have instruction forms that take register numbers larger than 15 for all instructions so DexTranslationAdvice returns 15 here.

Returns:int

register count noted above

hasConstantOperationback to summary
public boolean hasConstantOperation(Rop opcode, RegisterSpec sourceA, RegisterSpec sourceB)

Implements org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.hasConstantOperation.

Doc from org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.hasConstantOperation.

Returns an indication of whether the target can directly represent an instruction with the given opcode operating on the given arguments, where the last source argument is used as a constant. (That is, the last argument must have a type which indicates it is a known constant.) The instruction associated must have exactly two sources.

Parameters
opcode:Rop

non-null; the opcode

sourceA:RegisterSpec

non-null; the first source

sourceB:RegisterSpec

non-null; the second source

Returns:boolean

true iff the target can represent the operation using a constant for the last argument

requiresSourcesInOrderback to summary
public boolean requiresSourcesInOrder(Rop opcode, RegisterSpecList sources)

Implements org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.requiresSourcesInOrder.

Doc from org.droidparts.dexmaker.dx.rop.code.TranslationAdvice.requiresSourcesInOrder.

Returns true if the translation target requires the sources of the specified opcode to be in order and contiguous (eg, for an invoke-range)

Parameters
opcode:Rop

non-null; opcode

sources:RegisterSpecList

non-null; source list

Returns:boolean

true iff the target requires the sources to be in order and contiguous.