hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
IR Class Reference

#include <IR.h>

Collaboration diagram for IR:

Public Types

enum class  Opcode {
  unknown = 0 , load_local , negate , bitwise_not ,
  mul , mod , div , increment ,
  decrement , add , sub , right_shift ,
  less_than , less_equal , greater_than , greater_equal ,
  equal , direct_assign , not_equal , left_shift ,
  bitwise_and , bitwise_xor , bitwise_or , jump ,
  jump_if_true , jump_if_false , load_member , load_global ,
  bind_elements_pred , bind_elements_post , bind_fields_pred , bind_fields_post ,
  ret , ret_none , push_integer , push_decimal ,
  push_boolean , push_character , push_null , push_short ,
  push_unsigned , pop , basic_cast_int , basic_cast_deci ,
  basic_cast_bool , basic_cast_char , basic_cast_short , basic_cast_unsigned ,
  pointer_cast , push_string , store_global , store_local ,
  store_member , store_field , load_field , initialize_field ,
  invoke , new_struct , construct_interface_impl , invoke_virtual ,
  invoke_imported , invoke_dangling , store_element , load_element ,
  new_array_int , new_array_deci , new_array_bool , new_array_char ,
  new_array_str , new_array_short , new_array_unsigned , new_array_struct ,
  new_array_interface , new_dynamic_array_int , new_dynamic_array_deci , new_dynamic_array_bool ,
  new_dynamic_array_char , new_dynamic_array_str , new_dynamic_array_short , new_dynamic_array_unsigned ,
  new_dynamic_array_struct , new_dynamic_array_interface , array_length , interfaceof ,
  throws , push_exception_handler , pop_exception_handler , typeid_object_non_stack ,
  typeid_interface_impl , dyn_cast_any , new_datastruct , yield ,
  yield_none , resume , nop , FINAL
}
 

Public Member Functions

 IR ()=default
 
 IR (Opcode opcode, const yoi::vec< IROperand > &operands, IRDebugInfo debugInfo)
 
yoi::wstr to_string () const
 

Public Attributes

enum yoi::IR::Opcode opcode
 
yoi::vec< IROperandoperands
 
IRDebugInfo debugInfo
 

Static Public Attributes

static enum_range< OpcodeIROpCodeEnumRange
 

Detailed Description

Definition at line 264 of file IR.h.

Member Enumeration Documentation

◆ Opcode

enum class Opcode
strong
Enumerator
unknown 
load_local 
negate 
bitwise_not 
mul 
mod 
div 
increment 
decrement 
add 
sub 
right_shift 
less_than 
less_equal 
greater_than 
greater_equal 
equal 
direct_assign 
not_equal 
left_shift 
bitwise_and 
bitwise_xor 
bitwise_or 
jump 
jump_if_true 
jump_if_false 
load_member 
load_global 
bind_elements_pred 
bind_elements_post 
bind_fields_pred 
bind_fields_post 
ret 
ret_none 
push_integer 
push_decimal 
push_boolean 
push_character 
push_null 
push_short 
push_unsigned 
pop 
basic_cast_int 
basic_cast_deci 
basic_cast_bool 
basic_cast_char 
basic_cast_short 
basic_cast_unsigned 
pointer_cast 
push_string 
store_global 
store_local 
store_member 
store_field 
load_field 
initialize_field 
invoke 
new_struct 
construct_interface_impl 
invoke_virtual 
invoke_imported 
invoke_dangling 
store_element 
load_element 
new_array_int 
new_array_deci 
new_array_bool 
new_array_char 
new_array_str 
new_array_short 
new_array_unsigned 
new_array_struct 
new_array_interface 
new_dynamic_array_int 
new_dynamic_array_deci 
new_dynamic_array_bool 
new_dynamic_array_char 
new_dynamic_array_str 
new_dynamic_array_short 
new_dynamic_array_unsigned 
new_dynamic_array_struct 
new_dynamic_array_interface 
array_length 
interfaceof 
throws 
push_exception_handler 
pop_exception_handler 
typeid_object_non_stack 
typeid_interface_impl 
dyn_cast_any 
new_datastruct 
yield 
yield_none 
resume 
nop 
FINAL 

Definition at line 266 of file IR.h.

Constructor & Destructor Documentation

◆ IR() [1/2]

IR ( )
default

◆ IR() [2/2]

IR ( IR::Opcode  opcode,
const yoi::vec< IROperand > &  operands,
IRDebugInfo  debugInfo 
)

Definition at line 72 of file IR.cpp.

Member Function Documentation

◆ to_string()

yoi::wstr to_string ( ) const

Definition at line 74 of file IR.cpp.

References IR::opcode, IR::operands, and yoi::string2wstring().

Referenced by LLVMCodegen::generateInstruction().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ debugInfo

◆ IROpCodeEnumRange

enum_range<Opcode> IROpCodeEnumRange
static

Definition at line 365 of file IR.h.

◆ opcode

◆ operands


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