java.lang.Object
org.kink_lang.kink.internal.compile.javaclassir.TraceAccumulator

public class TraceAccumulator extends Object
Accumulates trace for compilation.
  • Constructor Details

    • TraceAccumulator

      public TraceAccumulator()
  • Method Details

    • add

      public int add(Trace trace)
      Adds the trace with a unique key, which cannot be a program counter.

      If the trace already exists in the mapping, the key is reused.

      Parameters:
      trace - trace to add.
      Returns:
      the key associated with the trace.
    • put

      public void put(int key, Trace trace)
      Associates the trace with the key.
      Parameters:
      key - the key.
      trace - the trace.
    • traces

      public Map<Integer,Trace> traces()
      Returns the result map.
      Returns:
      the result map.