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 TypeFieldDescriptionboolean
Whether to update coverage data when executing this instruction.final int
final boolean
Whether 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 LineNumberInstr
void
int
boolean
boolean
String[]
void
Methods inherited from class org.jruby.ir.instructions.NoOperandInstr
getOperands, setOperand
Methods 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:
toStringNonOperandArgs
in classInstr
-
clone
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. -
encode
-
decode
-
visit
-