Class CodeWriter.ClonedRange

  • Enclosing class:
    CodeWriter

    public static final class CodeWriter.ClonedRange
    extends Object
    A cloned instruction range.
    • Method Detail

      • instructions

        public List<Instruction> instructions()
        Returns:
        the cloned instructions in order
      • bindLabel

        public CodeWriter.ClonedRange bindLabel​(String name,
                                                Instruction hostTarget)
        Binds an external label (declared via CodeBuilder.externalLabel) to a host-method instruction; must be called before splicing.
        Parameters:
        name - the external label name
        hostTarget - the host instruction the label resolves to
        Returns:
        this range
      • redirectReturns

        public CodeWriter.ClonedRange redirectReturns()
        Rewrites every cloned return into a continuation exit (a placeholder goto recorded as a continuation branch), so an inlined body's returns fall through to the splice successor instead of returning from the host.
        Returns:
        this range