Package com.tonic.analysis
Class CodeWriter.ClonedRange
- java.lang.Object
-
- com.tonic.analysis.CodeWriter.ClonedRange
-
- Enclosing class:
- CodeWriter
public static final class CodeWriter.ClonedRange extends Object
A cloned instruction range.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeWriter.ClonedRangebindLabel(String name, Instruction hostTarget)Binds an external label (declared viaCodeBuilder.externalLabel) to a host-method instruction; must be called before splicing.List<Instruction>instructions()CodeWriter.ClonedRangeredirectReturns()Rewrites every clonedreturninto a continuation exit (a placeholdergotorecorded as a continuation branch), so an inlined body's returns fall through to the splice successor instead of returning from the host.
-
-
-
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 viaCodeBuilder.externalLabel) to a host-method instruction; must be called before splicing.- Parameters:
name- the external label namehostTarget- the host instruction the label resolves to- Returns:
- this range
-
redirectReturns
public CodeWriter.ClonedRange redirectReturns()
Rewrites every clonedreturninto a continuation exit (a placeholdergotorecorded 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
-
-