Package io.jawk.intermediate
Class Tuple
java.lang.Object
io.jawk.intermediate.Tuple
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Tuple.AddressTuple,Tuple.BooleanTuple,Tuple.ClassTuple,Tuple.CountTuple,Tuple.DereferenceTuple,Tuple.ExtensionTuple,Tuple.FunctionTuple,Tuple.LongTuple,Tuple.NoOperandTuple,Tuple.PushDoubleTuple,Tuple.PushLongTuple,Tuple.PushStringTuple,Tuple.RegexTuple,Tuple.VariableTuple
Represents one instruction in the tuple stream produced by
AwkTuples.
Concrete subclasses carry only the operands required by their opcode or opcode
group.- Author:
- Danny Daglas
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTuple for an address operand.static final classTuple for boolean operands.static final classTuple for JRT-managed built-in variable operations.static final classTuple for function calls.static final classTuple for a class check.static final classTuple for array compound assignments.static final classTuple for input-field compound assignments.static final classTuple for stack-provided map element compound assignments.static final classTuple for scalar compound assignments.static final classTuple for print/printf redirection with an append flag.static classTuple for opcodes whose single operand is a count.static final classTuple for variable dereference.static final classTuple for extension function invocations.static final classTuple for function definitions.static final classTuple for a constant input-field index.static classTuple for a long operand that is not interpreted by the tuple itself.static classTuple for opcodes without operands.static final classTuple for a double literal.static final classTuple for a long literal.static final classTuple for a string literal.static final classTuple for a precompiled literal regular expression.static final classTuple for sub/gsub against variable-backed values.static classTuple for variable offset/global operands. -
Method Summary
Modifier and TypeMethodDescriptionReturns this tuple's jump/call address, if it has one.intReturns the source line number associated with this tuple.final OpcodeReturns this tuple's opcode.voidResolves deferred operands and validates resolved addresses.
-
Method Details
-
getOpcode
Returns this tuple's opcode.- Returns:
- opcode executed by the AVM
-
getAddress
Returns this tuple's jump/call address, if it has one.- Returns:
- tuple address, or
null
-
touch
Resolves deferred operands and validates resolved addresses.- Parameters:
queue- tuple queue used to validate address targets
-
getLineNumber
public int getLineNumber()Returns the source line number associated with this tuple.- Returns:
- source line number, or
-1when unknown
-