Interface SleighPcodeUseropDefinition
- All Superinterfaces:
PcodeUseropLibrary.PcodeUseropDefinition<Object>
- All Known Implementing Classes:
AbstractSleighPcodeUseropDefinition, FixedSleighPcodeUseropDefinition, OverloadedSleighPcodeUseropDefinition
public interface SleighPcodeUseropDefinition
extends PcodeUseropLibrary.PcodeUseropDefinition<Object>
A p-code userop defined using Sleigh source
-
Nested Class Summary
Nested ClassesChangeModifier and TypeInterfaceDescriptionstatic interfaceA function body, as it depends on the given argumentsstatic interfaceStage one of the builder, where any operation is allowedstatic interfaceStage two of the builder, where parameters can no longer be addedstatic enumA factory for buildingSleighPcodeUseropDefinitions.static final recordOne definition for a userop for a given signature (parameters, including output) -
Field Summary
FieldsChangeModifier and TypeFieldDescriptionThe varnode list containing only one nullstatic final SleighPcodeUseropDefinition.FactoryThe factory for defining userops with Sleighstatic final StringThe name of the output symbol -
Method Summary
ChangeModifier and TypeMethodDescriptiondefault <T> PcodeUseropLibrary.PcodeUseropDefinition<T> cast()Cast this Sleigh p-code userop definition to one of the required typestatic SleighPcodeUseropDefinitionCast a userop definition to a Sleigh-defined onedefault StringGet the Sleigh source that defines this useropGet the Sleigh source that defines this useropprogramFor(SleighLanguage language, List<Varnode> args, PcodeUseropLibrary<?> library) Get the p-code program implementing this userop for the given arguments and library.Methods inherited from interface PcodeUseropLibrary.PcodeUseropDefinition
canInlinePcode, canInterrupt, execute, execute, getDefiningLibrary, getInputCount, getJavaMethod, getName, getOutputType, hasSideEffects, isFunctional, isInSigned, isOutSigned, modifiesContext
-
Field Details
-
FACTORY NEW
The factory for defining userops with Sleigh -
OUT_SYMBOL_NAME
-
EMPTY_ARGS
-
-
Method Details
-
getBody
Get the Sleigh source that defines this useropThe body may or may not actually depend on the arguments. Ideally, it does not, but sometimes the body may vary depending on the sizes of the arguments. In cases where it is known the body is fixed, the args parameter may be null or an empty list. When the arguments are required, index 0 must be the output varnode. If the userop has no output, index 0 may be null.
- Parameters:
args- the argument varnodes- Returns:
- the body
-
getBody
-
programFor
Get the p-code program implementing this userop for the given arguments and library.This will compile and cache a program for each new combination of arguments seen.
- Parameters:
language- the language of the executorargs- the operands, output at index 0, and inputs followinglibrary- the complete userop library- Returns:
- the p-code program to be fed to the same executor as invoked this userop, but in a new frame
-
cast NEW
Cast this Sleigh p-code userop definition to one of the required type- Type Parameters:
T- the executor's, library's, etc. type- Returns:
- this same definition
-
cast
Cast a userop definition to a Sleigh-defined oneFor some reason, the usual syntax in Java is forbidden, probably because it's of
<T>and not<?>....- Parameters:
def- the userop definition- Returns:
- the userop definition, if it is a Sleigh-defined one
- Throws:
ClassCastException- if def is not a Sleigh-defined userop
-