Class CheckArityInstr

All Implemented Interfaces:
FixedArityInstr

public class CheckArityInstr extends OneOperandInstr implements FixedArityInstr
  • Field Details

    • required

      public final int required
    • opt

      public final int opt
    • rest

      public final boolean rest
    • restKey

      public final int restKey
  • Constructor Details

    • CheckArityInstr

      public CheckArityInstr(int required, int opt, boolean rest, int restKey, Operand keywords)
  • Method Details

    • getKeywords

      public Operand getKeywords()
    • toStringNonOperandArgs

      public String[] toStringNonOperandArgs()
      Overrides:
      toStringNonOperandArgs in class Instr
    • clone

      public Instr clone(CloneInfo info)
      Description copied from class: Instr
      Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). This might renaming variables and labels to eliminate naming conflicts. The implementation might vary on the cloning mode.
      Specified by:
      clone in class Instr
      Parameters:
      info - This object manages renaming of variables and labels, handles args and return values.
      Returns:
      a new instruction that can be used in the target scope.
    • encode

      public void encode(IRWriterEncoder e)
      Overrides:
      encode in class Instr
    • decode

      public static CheckArityInstr decode(IRReaderDecoder d)
    • checkArity

      public void checkArity(ThreadContext context, IRubyObject self, StaticScope scope, DynamicScope dynamicScope, IRubyObject[] args, Block block, Object[] temp)
    • visit

      public void visit(IRVisitor visitor)
      Overrides:
      visit in class Instr