Package ghidra.pcode.emu.jit

# Enum Class JitPassage.Reachability

java.lang.Object
java.lang.Enum<JitPassage.Reachability>
ghidra.pcode.emu.jit.JitPassage.Reachability

All Implemented Interfaces:
  `Serializable`, `Comparable<JitPassage.Reachability>`, `Constable`

Enclosing class:
  `JitPassage`

public static enum JitPassage.Reachability extends Enum<JitPassage.Reachability>
Describes the manner in which something is reachable, wrt. dynamic context changes within an instruction step.

At the moment, the only way context can be changed dynamically is via a p-code userop. Such ops must have the `AnnotatedPcodeUseropLibrary.PcodeUserop.modifiesContext()` attribute set. If such an op is known to have been executed when finishing an instruction (either by branch or fall-through), we must exit the compiled passage.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `MAYBE_CTXMOD`
  There are at least two paths to reach it.
  `WITH_CTXMOD`
  There is at least one path to reach it.
  `WITHOUT_CTXMOD`
  There is at least one path to reach it.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract boolean`
  `canReachWithoutCtxMod()`
  Check if it is possible for this block to be reached without a context modification.
  `abstract JitPassage.Reachability`
  `combine(JitPassage.Reachability that)`
  Consider this and another reachability as "or"
  `static JitPassage.Reachability`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static JitPassage.Reachability[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### WITHOUT_CTXMOD

    public static final JitPassage.Reachability WITHOUT_CTXMOD
    There is at least one path to reach it. None of them modify the context dynamically.

  - ### MAYBE_CTXMOD

    public static final JitPassage.Reachability MAYBE_CTXMOD
    There are at least two paths to reach it. Some modify the context dynamically, and some do not.

  - ### WITH_CTXMOD

    public static final JitPassage.Reachability WITH_CTXMOD
    There is at least one path to reach it. All of them modify the context dynamically.

- ## Method Details

  - ### values

    public static JitPassage.Reachability[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static JitPassage.Reachability valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### combine

    public abstract JitPassage.Reachability combine(JitPassage.Reachability that)
    Consider this and another reachability as "or"
    Parameters:
      `that` - the other reachability
    Returns:
      the "or" of both

  - ### canReachWithoutCtxMod

    public abstract boolean canReachWithoutCtxMod()
    Check if it is possible for this block to be reached without a context modification.

    This is true if there exists any path to this block that doesn't include a possible context modification.

    Returns:
      true if reachable without context modification, false otherwise.