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
FieldsModifier and TypeFieldDescriptionprotected static final DbgTimer
protected final int
protected final int
protected final List<AssemblyConstructorSemantic>
protected final AssemblyTreeResolver
protected final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractAssemblyState
(AssemblyTreeResolver 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 nodeint
hashCode()
protected abstract Stream<AssemblyResolvedPatterns>
resolve
(AssemblyResolvedPatterns fromRight, Collection<AssemblyResolvedError> errors) Generate machine (partial) code for this node
-
Field Details
-
DBG
-
resolver
-
path
-
shift
protected final int shift -
length
protected final int length -
hash
protected final int hash
-
-
Constructor Details
-
AbstractAssemblyState
protected AbstractAssemblyState(AssemblyTreeResolver 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
-
getLength
public int getLength()Get the length in bytes of the operand represented by this node- Returns:
- the length
-