Interface LvarAccessGenerator

All Known Implementing Classes:
FastLvarAccessGenerator, SlowLvarAccessGenerator

public interface LvarAccessGenerator
Generates insns to access local vars.
  • Method Details

    • loadLvar

      List<Insn> loadLvar(LocalVar lvar, Location loc)
      Generates insns to load a local var, checking absence.
      Parameters:
      lvar - the local var.
      loc - the location of the dereference.
      Returns:
      insns to load a local var.
    • loadLvarAllowNull

      List<Insn> loadLvarAllowNull(LocalVar lvar)
      Generates insns to load a local var, not checking absence.
      Parameters:
      lvar - the local var.
      Returns:
      insns to load a local var.
    • storeLvar

      List<Insn> storeLvar(LocalVar lvar)
      Generates insns to store a local var.
      Parameters:
      lvar - the local var.
      Returns:
      insns to store a local var.
    • passRecv

      List<Insn> passRecv(LocalVar lvar)
      Generates insns to pass the recv.
      Parameters:
      lvar - the local var.
      Returns:
      insns to pass recv.
    • passArg

      List<Insn> passArg(LocalVar lvar, int argIndex)
      Generates insns to pass the specified arg.
      Parameters:
      lvar - the local var.
      argIndex - the index of the arg.
      Returns:
      insns to pass arg.
    • isUnused

      boolean isUnused(LocalVar lvar)
      Returns whether lvar is unused.
      Parameters:
      lvar - local var to test.
      Returns:
      whether lvar is unused.
    • checkNull

      static List<Insn> checkNull(String lvarName, Location loc, KeyStrSupplier keySup, TraceAccumulator traceAccum)
      If contParam is null, transition to raise and return.
      Parameters:
      lvarName - the name of the local var.
      loc - the location of dereference.
      keySup - key str supplier.
      traceAccum - trace accumulator.
      Returns:
      insns.