Class AbstractAssemblyState
java.lang.Object
ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyState
- Direct Known Subclasses:
AssemblyConstructState
,AssemblyNopState
,AssemblyOperandState
Base for a node in an assembly prototype
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final DbgTimer
protected final AbstractAssemblyResolutionFactory
<?, ?> protected int
protected boolean
protected final int
protected final List
<AssemblyConstructorSemantic> protected final AbstractAssemblyTreeResolver
<?> protected final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAssemblyState
(AbstractAssemblyTreeResolver<?> resolver, List<AssemblyConstructorSemantic> path, int shift, int length) Construct a node -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Pre compute this nodes hashabstract boolean
int
Get the length in bytes of the operand represented by this nodegetPath()
int
getShift()
int
hashCode()
protected abstract Stream
<AssemblyResolvedPatterns> resolve
(AssemblyResolvedPatterns fromRight, Collection<AssemblyResolvedError> errors) Generate machine (partial) code for this node
-
Field Details
-
DBG
-
resolver
-
factory
-
path
-
shift
protected final int shift -
length
protected final int length -
hasHash
protected volatile boolean hasHash -
hash
protected volatile int hash
-
-
Constructor Details
-
AbstractAssemblyState
protected AbstractAssemblyState(AbstractAssemblyTreeResolver<?> resolver, List<AssemblyConstructorSemantic> path, int shift, int length) Construct a node- Parameters:
resolver
- the resolverpath
- the path to this node for diagnosticsshift
- the (right) shift in bytes for this operandlength
- the length of this operand
-
-
Method Details
-
hashCode
public int hashCode() -
computeHash
public abstract int computeHash()Pre compute this nodes hash- Returns:
- the hash
-
equals
-
resolve
protected abstract Stream<AssemblyResolvedPatterns> resolve(AssemblyResolvedPatterns fromRight, Collection<AssemblyResolvedError> errors) Generate machine (partial) code for this node- Parameters:
fromRight
- the accumulated patterns thus far, from the right sibling or left-most childerrors
- a place to collect error reports- Returns:
- the stream of generated patterns, as accumulated
-
getResolver
-
getPath
-
getShift
public int getShift() -
getLength
public int getLength()Get the length in bytes of the operand represented by this node- Returns:
- the length
-