Gyoji Compiler
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Gyoji::mir::OperationFunctionCall Class Reference

Function call (invoke) operation. More...

#include <operations.hpp>

Inheritance diagram for Gyoji::mir::OperationFunctionCall:
Inheritance graph
[legend]
Collaboration diagram for Gyoji::mir::OperationFunctionCall:
Collaboration graph
[legend]

Public Member Functions

 OperationFunctionCall (const Gyoji::context::SourceReference &_src_ref, size_t _result, size_t _callee_tmpvar, std::vector< size_t > _arg_args)
 Create a function call operation.
 
virtual ~OperationFunctionCall ()
 Move along, nothing to see here.
 
- Public Member Functions inherited from Gyoji::mir::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::SourceReferenceget_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.
 

Additional Inherited Members

- Public Types inherited from Gyoji::mir::Operation
enum  OperationType {
  OP_FUNCTION_CALL , OP_SYMBOL , OP_WIDEN_SIGNED , OP_WIDEN_UNSIGNED ,
  OP_WIDEN_FLOAT , OP_ARRAY_INDEX , OP_DOT , OP_LOCAL_DECLARE ,
  OP_LOCAL_UNDECLARE , OP_LOCAL_VARIABLE , OP_LITERAL_CHAR , OP_LITERAL_STRING ,
  OP_LITERAL_INT , OP_LITERAL_FLOAT , OP_LITERAL_BOOL , OP_LITERAL_NULL ,
  OP_ADDRESSOF , OP_DEREFERENCE , OP_NEGATE , OP_BITWISE_NOT ,
  OP_LOGICAL_NOT , OP_SIZEOF_TYPE , OP_ADD , OP_SUBTRACT ,
  OP_MULTIPLY , OP_DIVIDE , OP_MODULO , OP_LOGICAL_AND ,
  OP_LOGICAL_OR , OP_BITWISE_AND , OP_BITWISE_OR , OP_BITWISE_XOR ,
  OP_SHIFT_LEFT , OP_SHIFT_RIGHT , OP_COMPARE_LESS , OP_COMPARE_GREATER ,
  OP_COMPARE_LESS_EQUAL , OP_COMPARE_GREATER_EQUAL , OP_COMPARE_NOT_EQUAL , OP_COMPARE_EQUAL ,
  OP_ASSIGN , OP_JUMP_CONDITIONAL , OP_JUMP , OP_RETURN ,
  OP_RETURN_VOID
}
 Operations of the MIR virtual-machine. More...
 
- Protected Member Functions inherited from Gyoji::mir::Operation
void add_operand (size_t operand)
 Add an operand.
 

Detailed Description

Function call (invoke) operation.

This subclass of Operation represents a function-call taking an operand for the function and a list of operands, one for each argument of the function.

Constructor & Destructor Documentation

◆ OperationFunctionCall()

OperationFunctionCall::OperationFunctionCall ( const Gyoji::context::SourceReference _src_ref,
size_t  _result,
size_t  _callee_tmpvar,
std::vector< size_t >  _arg_args 
)

Create a function call operation.

This constructor takes the function to be called (callee) and a list of other operands, one for each argument to the function.

◆ ~OperationFunctionCall()

OperationFunctionCall::~OperationFunctionCall ( )
virtual

Move along, nothing to see here.

Move along, nothing to see here.


The documentation for this class was generated from the following files: