Package ghidra.app.plugin.assembler.sleigh.sem

# Class AbstractAssemblyState

java.lang.Object
ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyState

Direct Known Subclasses:
  `AssemblyConstructState`, `AssemblyNopState`, `AssemblyOperandState`

public abstract class AbstractAssemblyState extends Object
Base for a node in an assembly prototype

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final DbgTimer`
  `DBG`
  `protected final int`
  `hash`
  `protected final int`
  `length`
  `protected final List<AssemblyConstructorSemantic>`
  `path`
  `protected final AssemblyTreeResolver`
  `resolver`
  `protected final int`
  `shift`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractAssemblyState(AssemblyTreeResolver resolver, List<AssemblyConstructorSemantic> path, int shift, int length)`
  Construct a node

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract int`
  `computeHash()`
  Pre compute this nodes hash
  `abstract boolean`
  `equals(Object obj)`
  `int`
  `getLength()`
  Get the length in bytes of the operand represented by this node
  `int`
  `hashCode()`
  `protected abstract Stream<AssemblyResolvedPatterns>`
  `resolve(AssemblyResolvedPatterns fromRight, Collection<AssemblyResolvedError> errors)`
  Generate machine (partial) code for this node

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DBG

    protected static final DbgTimer DBG

  - ### resolver

    protected final AssemblyTreeResolver resolver

  - ### path

    protected final List<AssemblyConstructorSemantic> 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 resolver
      `path` - the path to this node for diagnostics
      `shift` - the (right) shift in bytes for this operand
      `length` - the length of this operand

- ## Method Details

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### computeHash

    public abstract int computeHash()
    Pre compute this nodes hash
    Returns:
      the hash

  - ### equals

    public abstract boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### 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 child
      `errors` - 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