Package org.jruby.ir.instructions
Class LineNumberInstr
java.lang.Object
org.jruby.ir.instructions.Instr
org.jruby.ir.instructions.NoOperandInstr
org.jruby.ir.instructions.LineNumberInstr
- All Implemented Interfaces:
FixedArityInstr
- Direct Known Subclasses:
InlinedLineNumberInstr
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanWhether to update coverage data when executing this instruction.final intfinal booleanWhether to disable coverage after the first execution.Fields inherited from class org.jruby.ir.instructions.Instr
EMPTY_OPERANDS -
Constructor Summary
ConstructorsConstructorDescriptionLineNumberInstr(int lineNumber) LineNumberInstr(int lineNumber, int coverageMode) -
Method Summary
Modifier and TypeMethodDescriptionClone 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).static LineNumberInstrvoidintbooleanbooleanString[]voidMethods inherited from class org.jruby.ir.instructions.NoOperandInstr
getOperands, setOperandMethods inherited from class org.jruby.ir.instructions.Instr
canBeDeletedFromScope, canRaiseException, cloneOperands, computeScopeFlags, dumpableFields, getOperation, getUsedVariables, hasSideEffects, interpret, interpretAndGetNewIPC, isDead, isDeletable, markDead, renameVars, simplifyInstr, simplifyOperands, simplifyOperands, toString, transfersControl
-
Field Details
-
lineNumber
public final int lineNumber -
coverage
public boolean coverageWhether to update coverage data when executing this instruction. Note this is non-final so that `oneshot_lines` mode can disable coverage. -
oneshot
public final boolean oneshotWhether to disable coverage after the first execution. This allows lightweight "covered or not" coverage that only updates once per line.
-
-
Constructor Details
-
LineNumberInstr
public LineNumberInstr(int lineNumber, int coverageMode) -
LineNumberInstr
public LineNumberInstr(int lineNumber)
-
-
Method Details
-
getLineNumber
public int getLineNumber() -
isCoverage
public boolean isCoverage() -
isOneshot
public boolean isOneshot() -
toStringNonOperandArgs
- Overrides:
toStringNonOperandArgsin classInstr
-
clone
Description copied from class:InstrClone 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. -
encode
-
decode
-
visit
-