Gyoji Compiler
|
This subclass of Operation represents a binary operation. More...
#include <operations.hpp>
Public Member Functions | |
OperationBinary (OperationType _type, const Gyoji::context::SourceReference &_src_ref, size_t _result, size_t _operand_a, size_t _operand_b) | |
Construct binary operation with a two operands operand. | |
virtual | ~OperationBinary () |
Move along, nothing to see here. | |
size_t | get_a () const |
Access the first operand (a). | |
size_t | get_b () const |
Access the second operand (b). | |
![]() | |
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 binary operation.
This subclass of Operation is mainly a convenience container for binary operations. It provides convenient methods to access the 'a' and 'b' operands of the operation and is used for most of the ordinary binary operation opcodes such as OP_ADD and OP_MULTIPLY, etc. See those opcodes for details of what types of values are supported and returned.
OperationBinary::OperationBinary | ( | OperationType | _type, |
const Gyoji::context::SourceReference & | _src_ref, | ||
size_t | _result, | ||
size_t | _operand_a, | ||
size_t | _operand_b | ||
) |
Construct binary operation with a two operands operand.
This constructor is used for binary operations which take a two operands and produce a single result.
|
virtual |
Move along, nothing to see here.
Move along, nothing to see here.