Gyoji Compiler
|
This subclass of Operation represents a unary operation. More...
#include <operations.hpp>
Public Member Functions | |
OperationUnary (OperationType _type, const Gyoji::context::SourceReference &_src_ref, size_t _result, size_t _operand) | |
Construct unary operation with a single operand. | |
virtual | ~OperationUnary () |
Move along, nothing to see here. | |
size_t | get_a () const |
Returns the operand of the unary operation. | |
![]() | |
Operation (OperationType _type, const Gyoji::context::SourceReference &_src_ref, size_t _result) | |
Operation (OperationType _type, const Gyoji::context::SourceReference &_src_ref, size_t _result, size_t _operand) | |
Operation (OperationType _type, const Gyoji::context::SourceReference &_src_ref, size_t _result, size_t _operand_a, size_t _operand_b) | |
Operation (OperationType _type, const Gyoji::context::SourceReference &_src_ref, size_t _result, size_t _operand_a, size_t _operand_b, size_t _operand_c) | |
virtual | ~Operation () |
Move along, nothing to see here. | |
void | dump (FILE *out) const |
OperationType | get_type () const |
Opcode of this operation. | |
const std::vector< size_t > & | get_operands () const |
Get the operands. | |
size_t | get_result () const |
Get the result of this operation. | |
bool | is_terminating () const |
Returns true if this is a terminating operation for a block. | |
const Gyoji::context::SourceReference & | get_source_ref () const |
Get the reference to the source which originated this operation. | |
virtual std::string | get_description () const |
Produce a description of the operation. | |
This subclass of Operation represents a unary operation.
This subclass of Operation is mainly a convenience container for unary operations. It provides convenient methods to access the 'a' operand of the operation and is used for most of the ordinary unary operation opcodes such as OP_NEGATE and OP_LOGICAL_NOT, etc. See those opcodes for details of what types of values are supported and returned.
OperationUnary::OperationUnary | ( | OperationType | _type, |
const Gyoji::context::SourceReference & | _src_ref, | ||
size_t | _result, | ||
size_t | _operand | ||
) |
Construct unary operation with a single operand.
This constructor is used for unary operations which take a single operand and produce a single result.
|
virtual |
Move along, nothing to see here.
Move along, nothing to see here.