Gyoji Compiler
Loading...
Searching...
No Matches
operations.hpp
1/* Copyright 2025 Jonathan S. Arney
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * https://github.com/jarney/gyoji/blob/master/LICENSE
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#pragma once
16
17#include <gyoji-misc/pointers.hpp>
18#include <gyoji-mir/types.hpp>
19#include <gyoji-context.hpp>
20
21#include <string>
22#include <map>
23#include <vector>
24
25namespace Gyoji::mir {
67 class Operation {
68 public:
86 typedef enum {
87 // Global symbols
112
122
154
155 // Cast operations
182 OP_WIDEN_SIGNED, // Widen a signed integer to a larger type.
183
208 OP_WIDEN_UNSIGNED, // Widen an unsigned integer to a larger type.
209
230 OP_WIDEN_FLOAT, // Widen a floating-point to a larger type.
231
252 OP_ARRAY_INDEX, // Pointer types -> Pointer Target type
253
275 OP_DOT, // class types -> Found member type
276
277 // Variable access
308
333
356
357 // Literals
426
439
451
471 OP_ADDRESSOF, // Any type -> Pointer type
487 OP_DEREFERENCE, // Pointer types -> Pointer Target type
488
495 OP_NEGATE, // Numeric types -> Numeric type
496
505 OP_BITWISE_NOT, // Integer types -> Integer Type
513 OP_LOGICAL_NOT, // Boolean types -> Boolean
514
522 OP_SIZEOF_TYPE, // Any type -> u64
523
524 // Binary operations: arithmetic
540 OP_ADD, // Matching Numeric types -> Operand type
556 OP_SUBTRACT, // Matching Numeric types -> Operand type
572 OP_MULTIPLY, // Matching Numeric types -> Operand type
591 OP_DIVIDE, // Matching Integer types -> Operand type
592
611 OP_MODULO, // Matching Integer types -> Operand type
612
613 // Binary operations: logical
622 OP_LOGICAL_AND, // Boolean types -> Boolean
631 OP_LOGICAL_OR, // Boolean types -> Boolean
632
633 // Binary operations: bitwise
646 OP_BITWISE_AND, // Matching integer types -> Integer type
659 OP_BITWISE_OR, // Matching integer types -> Integer type
660
673 OP_BITWISE_XOR, // Matching integer types -> Integer type
688 OP_SHIFT_LEFT, // Matching integer types -> Integer type
703 OP_SHIFT_RIGHT, // Matching integer types -> Integer type
704
705 // Binary operations: comparisons
716 OP_COMPARE_LESS, // Primitive types -> Boolean
727 OP_COMPARE_GREATER, // Primitive types -> Boolean
738 OP_COMPARE_LESS_EQUAL, // Primitive types -> Boolean
749 OP_COMPARE_GREATER_EQUAL, // Primitive types -> Boolean
760 OP_COMPARE_NOT_EQUAL, // Pointer types, Primitive types, recursive for class types.
771 OP_COMPARE_EQUAL, // Pointer types, Primitive types, recursive for class types.
772
773 // Binary operations: assignments
785 OP_ASSIGN, // Primitive types, pointer types, recursive for class types.
786
787 // Branch and flow control
800 OP_JUMP_CONDITIONAL, // Boolean types
833
838 Operation(
839 OperationType _type,
840 const Gyoji::context::SourceReference & _src_ref,
841 size_t _result
842 );
848 Operation(
849 OperationType _type,
850 const Gyoji::context::SourceReference & _src_ref,
851 size_t _result,
852 size_t _operand
853 );
859 Operation(
860 OperationType _type,
861 const Gyoji::context::SourceReference & _src_ref,
862 size_t _result,
863 size_t _operand_a,
864 size_t _operand_b
865 );
872 Operation(
873 OperationType _type,
874 const Gyoji::context::SourceReference & _src_ref,
875 size_t _result,
876 size_t _operand_a,
877 size_t _operand_b,
878 size_t _operand_c
879 );
886 virtual ~Operation();
887
892 void dump(FILE *out, size_t operation_index) const;
893
901 OperationType get_type() const;
902
910 const std::vector<size_t> & get_operands() const;
911
919 size_t get_result() const;
920
929 bool is_terminating() const;
930
951
963 virtual std::string get_description() const;
964
965#if 0
966 // XXX Is this really the way to handle this?
977 bool get_readsfrom(size_t tmpvar) const;
978 bool get_writesto(size_t tmpvar) const;
979#endif
980 protected:
981 OperationType type;
982 const Gyoji::context::SourceReference & src_ref;
983 std::vector<size_t> operands;
984 size_t result;
985
994 void add_operand(size_t operand);
995
996#if 0
997 // XXX Is this really the way to handle this?
998 bool contains(size_t tmpvar) const;
999#endif
1000 };
1001
1012 class OperationUnary : public Operation {
1013 public:
1021 OperationType _type,
1022 const Gyoji::context::SourceReference & _src_ref,
1023 size_t _result,
1024 size_t _operand
1025 );
1032 virtual ~OperationUnary();
1036 size_t get_a() const;
1037 };
1038
1055 public:
1065 OperationType _type,
1066 const Gyoji::context::SourceReference & _src_ref,
1067 size_t _result,
1068 size_t _operand,
1069 const Type *_cast_type
1070 );
1077 virtual ~OperationCast();
1084 const Type* get_cast_type() const;
1085 protected:
1086 virtual std::string get_description() const;
1087 private:
1088 const Type *cast_type;
1089 };
1090
1102 public:
1111 OperationType _type,
1112 const Gyoji::context::SourceReference & _src_ref,
1113 size_t _result,
1114 size_t _operand_a,
1115 size_t _operand_b
1116 );
1123 virtual ~OperationBinary();
1127 size_t get_a() const;
1131 size_t get_b() const;
1132 };
1133
1150 public:
1152 const Gyoji::context::SourceReference & _src_ref,
1153 size_t _result,
1154 size_t _object_to_call,
1155 std::string _method_name
1156 );
1157 virtual ~OperationGetMethod();
1158
1159 const std::string & get_method() const;
1160 protected:
1162 private:
1163 size_t object_to_call;
1164 std::string method_name;
1165 };
1166
1176 public:
1186 OperationType _type,
1187 const Gyoji::context::SourceReference & _src_ref,
1188 size_t _result,
1189 size_t _callee_tmpvar,
1190 std::vector<size_t> _arg_args
1191 );
1198 virtual ~OperationFunctionCall();
1199 };
1200
1210 public:
1219 const Gyoji::context::SourceReference & _src_ref,
1220 size_t _result,
1221 std::vector<size_t> _partial_operands,
1222 std::string _symbol_name
1223 );
1230 virtual ~OperationSymbol();
1235 const std::string & get_symbol_name() const;
1236
1237 protected:
1238 virtual std::string get_description() const;
1239 private:
1240 const std::string symbol_name;
1241 };
1242
1250 public:
1260 const Gyoji::context::SourceReference & _src_ref,
1261 size_t _result,
1262 size_t _array_tmpvar,
1263 size_t _index_tmpvar
1264 );
1271 virtual ~OperationArrayIndex();
1272 private:
1273 };
1274
1286 public:
1297 const Gyoji::context::SourceReference & _src_ref,
1298 size_t _result,
1299 size_t _operand,
1300 std::string _member_name
1301 );
1308 virtual ~OperationDot();
1313 const std::string & get_member_name() const;
1314
1315 protected:
1316 virtual std::string get_description() const;
1317 private:
1318 const std::string member_name;
1319 };
1320
1329 public:
1336 const Gyoji::context::SourceReference & _src_ref,
1337 size_t _result,
1338 std::string _symbol_name,
1339 const Type * _var_type);
1346 virtual ~OperationLocalVariable();
1347 const std::string & get_symbol_name() const;
1348 const Type * get_var_type() const;
1349
1350 protected:
1351 virtual std::string get_description() const;
1352 private:
1353 const std::string symbol_name;
1354 const Type * var_type;
1355 };
1356
1365 public:
1371 const Gyoji::context::SourceReference & _src_ref,
1372 size_t _result,
1373 char _literal_char
1374 );
1381 virtual ~OperationLiteralChar();
1382 char get_literal_char() const;
1383 protected:
1384 virtual std::string get_description() const;
1385 private:
1386 const char literal_char;
1387 };
1396 public:
1404 const Gyoji::context::SourceReference & _src_ref,
1405 size_t _result,
1406 std::string _literal_string
1407 );
1414 virtual ~OperationLiteralString();
1415 const std::string & get_literal_string() const;
1416 protected:
1417 virtual std::string get_description() const;
1418 private:
1419 const std::string literal_string;
1420 };
1434 public:
1442 const Gyoji::context::SourceReference & _src_ref,
1443 size_t _result,
1444 Type::TypeType _literal_type,
1445 unsigned char _literal_u8
1446 );
1454 const Gyoji::context::SourceReference & _src_ref,
1455 size_t _result,
1456 Type::TypeType _literal_type,
1457 unsigned short _literal_u16
1458 );
1466 const Gyoji::context::SourceReference & _src_ref,
1467 size_t _result,
1468 Type::TypeType _literal_type,
1469 unsigned int _literal_u32
1470 );
1478 const Gyoji::context::SourceReference & _src_ref,
1479 size_t _result,
1480 Type::TypeType _literal_type,
1481 unsigned long _literal_u64
1482 );
1490 const Gyoji::context::SourceReference & _src_ref,
1491 size_t _result,
1492 Type::TypeType _literal_type,
1493 char _literal_i8
1494 );
1502 const Gyoji::context::SourceReference & _src_ref,
1503 size_t _result,
1504 Type::TypeType _literal_type,
1505 short _literal_i16
1506 );
1514 const Gyoji::context::SourceReference & _src_ref,
1515 size_t _result,
1516 Type::TypeType _literal_type,
1517 int _literal_i32
1518 );
1526 const Gyoji::context::SourceReference & _src_ref,
1527 size_t _result,
1528 Type::TypeType _literal_type,
1529 long _literal_i64
1530 );
1537 virtual ~OperationLiteralInt();
1538 Type::TypeType get_literal_type() const;
1539 unsigned char get_literal_u8() const;
1540 unsigned short get_literal_u16() const;
1541 unsigned int get_literal_u32() const;
1542 unsigned long get_literal_u64() const;
1543
1544 char get_literal_i8() const;
1545 short get_literal_i16() const;
1546 int get_literal_i32() const;
1547 long get_literal_i64() const;
1548
1549 protected:
1550 virtual std::string get_description() const;
1551 private:
1552 Type::TypeType literal_type;
1553
1554 // Should these be a union?
1555 unsigned char literal_u8;
1556 unsigned short literal_u16;
1557 unsigned int literal_u32;
1558 unsigned long literal_u64;
1559 char literal_i8;
1560 short literal_i16;
1561 int literal_i32;
1562 long literal_i64;
1563 };
1572 public:
1579 const Gyoji::context::SourceReference & _src_ref,
1580 size_t _result,
1581 float _literal_float
1582 );
1589 const Gyoji::context::SourceReference & _src_ref,
1590 size_t _result,
1591 double _literal_float
1592 );
1599 virtual ~OperationLiteralFloat();
1600 float get_literal_float() const;
1601 double get_literal_double() const;
1602 Type::TypeType get_literal_type() const;
1603 protected:
1604 virtual std::string get_description() const;
1605 private:
1606 Type::TypeType literal_type;
1607 float literal_float_f32;
1608 double literal_float_f64;
1609
1610 };
1611
1621 public:
1627 const Gyoji::context::SourceReference & _src_ref,
1628 size_t _result,
1629 bool _literal_bool
1630 );
1637 virtual ~OperationLiteralBool();
1642 bool get_literal_bool() const;
1643 protected:
1644 virtual std::string get_description() const;
1645 private:
1646 bool literal_bool;
1647 };
1648
1658 public:
1664 const Gyoji::context::SourceReference & _src_ref,
1665 size_t _result
1666 );
1673 virtual ~OperationLiteralNull();
1674 protected:
1675 virtual std::string get_description() const;
1676 private:
1677 };
1678
1695 public:
1697 const Gyoji::context::SourceReference & _src_ref,
1698 size_t _result,
1700 );
1702 const std::map<std::string, size_t> & get_fields() const;
1703 protected:
1704 virtual std::string get_description() const;
1705 private:
1707 };
1708
1718 public:
1720 const Gyoji::context::SourceReference & _src_ref,
1721 size_t _result,
1722 const Type *_type
1723 );
1730 virtual ~OperationSizeofType();
1731
1732 const Type * get_type() const;
1733 private:
1734 const Type* type;
1735 };
1736
1758 public:
1760 const Gyoji::context::SourceReference & _src_ref,
1761 size_t _operand,
1762 size_t _if_block,
1763 size_t _else_block
1764 );
1771 virtual ~OperationJumpConditional();
1772 size_t get_if_block() const;
1773 size_t get_else_block() const;
1774 protected:
1775 virtual std::string get_description() const;
1776 size_t if_block;
1777 size_t else_block;
1778 private:
1779 };
1780
1797 class OperationJump : public Operation {
1798 public:
1800 const Gyoji::context::SourceReference & _src_ref,
1801 size_t _block
1802 );
1809 virtual ~OperationJump();
1810 size_t get_jump_block() const;
1811 protected:
1812 virtual std::string get_description() const;
1813 size_t jump_block;
1814 private:
1815 };
1816
1836 public:
1838 const Gyoji::context::SourceReference & _src_ref,
1839 size_t _operand
1840 );
1847 virtual ~OperationReturn();
1848 protected:
1849 virtual std::string get_description() const;
1850 };
1859 public:
1861 const Gyoji::context::SourceReference & _src_ref
1862 );
1869 virtual ~OperationReturnVoid();
1870 protected:
1871 virtual std::string get_description() const;
1872 };
1873
1887 public:
1889 const Gyoji::context::SourceReference & _src_ref,
1890 std::string _variable,
1891 const Type *_variable_type
1892 );
1899 virtual ~OperationLocalDeclare();
1903 const std::string & get_variable() const;
1908 const Type *get_variable_type() const;
1909 protected:
1910 virtual std::string get_description() const;
1911 private:
1912 std::string variable;
1913 const Type *variable_type;
1914 };
1925 public:
1927 const Gyoji::context::SourceReference & _src_ref,
1928 std::string _variable
1929 );
1936 virtual ~OperationLocalUndeclare();
1937 protected:
1938 virtual std::string get_description() const;
1939 private:
1940 std::string variable;
1941 };
1942
1943
1944 void operation_static_init();
1945};
References a location in the source-file.
Definition source-reference.hpp:30
This class represents an anonymous structure.
Definition operations.hpp:1694
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:875
This subclass of OperationBinary represents indexing an array.
Definition operations.hpp:1249
virtual ~OperationArrayIndex()
Move along, nothing to see here.
Definition operation.cpp:378
This subclass of Operation represents a binary operation.
Definition operations.hpp:1101
size_t get_a() const
Access the first operand (a).
Definition operation.cpp:297
virtual ~OperationBinary()
Move along, nothing to see here.
Definition operation.cpp:294
size_t get_b() const
Access the second operand (b).
Definition operation.cpp:301
This subclass of OperationUnary represents a cast operation.
Definition operations.hpp:1054
virtual ~OperationCast()
Move along, nothing to see here.
Definition operation.cpp:261
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:269
const Type * get_cast_type() const
Get type being cast/converted to.
Definition operation.cpp:265
This subclass of Operation is used to access member variables of classes and other aggregate types by...
Definition operations.hpp:1285
virtual ~OperationDot()
Move along, nothing to see here.
Definition operation.cpp:394
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:402
const std::string & get_member_name() const
Definition operation.cpp:398
Function call (invoke) operation.
Definition operations.hpp:1175
virtual ~OperationFunctionCall()
Move along, nothing to see here.
Definition operation.cpp:322
Method call (invoke) preparation.
Definition operations.hpp:1149
virtual std::string get_description() const
Produce a description of the operation.
This operation represents a conditional jump.
Definition operations.hpp:1757
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:911
virtual ~OperationJumpConditional()
Move along, nothing to see here.
Definition operation.cpp:907
Unconditional Jump.
Definition operations.hpp:1797
virtual ~OperationJump()
Move along, nothing to see here.
Definition operation.cpp:940
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:944
Literal bool.
Definition operations.hpp:1620
bool get_literal_bool() const
Definition operation.cpp:819
virtual ~OperationLiteralBool()
Move along, nothing to see here.
Definition operation.cpp:816
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:822
Literal character.
Definition operations.hpp:1364
virtual ~OperationLiteralChar()
Move along, nothing to see here.
Definition operation.cpp:462
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:470
Literal float.
Definition operations.hpp:1571
virtual ~OperationLiteralFloat()
Move along, nothing to see here.
Definition operation.cpp:766
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:781
Literal integer.
Definition operations.hpp:1433
virtual ~OperationLiteralInt()
Move along, nothing to see here.
Definition operation.cpp:659
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:691
Literal null.
Definition operations.hpp:1657
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:843
virtual ~OperationLiteralNull()
Move along, nothing to see here.
Definition operation.cpp:840
Literal string.
Definition operations.hpp:1395
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:504
virtual ~OperationLiteralString()
Move along, nothing to see here.
Definition operation.cpp:496
Declare a local variable in scope.
Definition operations.hpp:1886
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:1023
const Type * get_variable_type() const
Definition operation.cpp:1019
const std::string & get_variable() const
Definition operation.cpp:1016
virtual ~OperationLocalDeclare()
Move along, nothing to see here.
Definition operation.cpp:1013
Un-declare a variable (remove it from scope)
Definition operations.hpp:1924
virtual ~OperationLocalUndeclare()
Move along, nothing to see here.
Definition operation.cpp:1045
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:1049
Load a local variable.
Definition operations.hpp:1328
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:439
virtual ~OperationLocalVariable()
Move along, nothing to see here.
Definition operation.cpp:427
Return from a function without a value.
Definition operations.hpp:1858
virtual ~OperationReturnVoid()
Move along, nothing to see here.
Definition operation.cpp:990
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:994
Return from a function with a value.
Definition operations.hpp:1835
virtual ~OperationReturn()
Move along, nothing to see here.
Definition operation.cpp:967
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:971
The operation for obtaining the storage size of a type.
Definition operations.hpp:1717
virtual ~OperationSizeofType()
Move along, nothing to see here.
Definition operation.cpp:1070
Symbol-table lookup.
Definition operations.hpp:1209
const std::string & get_symbol_name() const
Definition operation.cpp:346
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:350
virtual ~OperationSymbol()
Move along, nothing to see here.
Definition operation.cpp:342
This subclass of Operation represents a unary operation.
Definition operations.hpp:1012
size_t get_a() const
Returns the operand of the unary operation.
Definition operation.cpp:246
virtual ~OperationUnary()
Move along, nothing to see here.
Definition operation.cpp:243
Operations inside basic blocks, the virtual instruction-set of the MIR.
Definition operations.hpp:67
void dump(FILE *out, size_t operation_index) const
Definition operation.cpp:225
virtual ~Operation()
Move along, nothing to see here.
Definition operation.cpp:154
bool is_terminating() const
Returns true if this is a terminating operation for a block.
Definition operation.cpp:178
OperationType get_type() const
Opcode of this operation.
Definition operation.cpp:209
const Gyoji::context::SourceReference & get_source_ref() const
Get the reference to the source which originated this operation.
Definition operation.cpp:221
virtual std::string get_description() const
Produce a description of the operation.
Definition operation.cpp:164
std::vector< size_t > get_connections() const
Returns the list of basic blocks we might connect to.
Definition operation.cpp:189
size_t get_result() const
Get the result of this operation.
Definition operation.cpp:217
void add_operand(size_t operand)
Add an operand.
Definition operation.cpp:158
OperationType
Operations of the MIR virtual-machine.
Definition operations.hpp:86
@ OP_DEREFERENCE
De-references the given pointer.
Definition operations.hpp:487
@ OP_LITERAL_STRING
Loads a string constant.
Definition operations.hpp:388
@ OP_ASSIGN
Assign value.
Definition operations.hpp:785
@ OP_BITWISE_AND
Bitwise AND.
Definition operations.hpp:646
@ OP_LOCAL_UNDECLARE
Undeclare local variable.
Definition operations.hpp:332
@ OP_NEGATE
Negates a signed integer.
Definition operations.hpp:495
@ OP_ADD
Arithmetic add.
Definition operations.hpp:540
@ OP_WIDEN_FLOAT
Widen a floating-point integer to wider type.
Definition operations.hpp:230
@ OP_LITERAL_CHAR
Loads a literal character constant.
Definition operations.hpp:369
@ OP_DESTRUCTOR
Call the destructor for a composite type.
Definition operations.hpp:121
@ OP_MODULO
Modulo.
Definition operations.hpp:611
@ OP_WIDEN_SIGNED
Widen a signed integer to a larger type.
Definition operations.hpp:182
@ OP_ADDRESSOF
Returns the address of the given variable.
Definition operations.hpp:471
@ OP_COMPARE_GREATER
Compare numbers for greater-than.
Definition operations.hpp:727
@ OP_ANONYMOUS_STRUCTURE
Anonymous structures.
Definition operations.hpp:450
@ OP_LITERAL_FLOAT
Loads an integer constant.
Definition operations.hpp:414
@ OP_WIDEN_UNSIGNED
Widen an unsigned integer to a larger type.
Definition operations.hpp:208
@ OP_ARRAY_INDEX
Access a value inside an array.
Definition operations.hpp:252
@ OP_BITWISE_XOR
Bitwise XOR.
Definition operations.hpp:673
@ OP_LOCAL_VARIABLE
Load value from variable.
Definition operations.hpp:355
@ OP_RETURN
Return from function.
Definition operations.hpp:822
@ OP_SUBTRACT
Arithmetic subtract.
Definition operations.hpp:556
@ OP_LOGICAL_NOT
This opcode performs a boolean NOT of the given operand.
Definition operations.hpp:513
@ OP_BITWISE_NOT
Performs a bitwise not on an unsigned integer.
Definition operations.hpp:505
@ OP_COMPARE_EQUAL
Compare numbers for equality.
Definition operations.hpp:771
@ OP_RETURN_VOID
Return from function without supplying a value.
Definition operations.hpp:831
@ OP_BITWISE_OR
Bitwise OR.
Definition operations.hpp:659
@ OP_SYMBOL
Load a symbol from the symbol-table.
Definition operations.hpp:153
@ OP_SIZEOF_TYPE
Returns the size of a specific type.
Definition operations.hpp:522
@ OP_SHIFT_RIGHT
Bitwise Shift Right.
Definition operations.hpp:703
@ OP_LITERAL_INT
Loads an integer constant.
Definition operations.hpp:401
@ OP_JUMP_CONDITIONAL
Conditional Jump.
Definition operations.hpp:800
@ OP_LITERAL_NULL
Loads a null pointer literal constant.
Definition operations.hpp:438
@ OP_COMPARE_LESS_EQUAL
Compare numbers for less-than or equal to.
Definition operations.hpp:738
@ OP_COMPARE_GREATER_EQUAL
Compare numbers for greater-than or equal to.
Definition operations.hpp:749
@ OP_LOCAL_DECLARE
Declare local variable.
Definition operations.hpp:307
@ OP_LOGICAL_AND
Logical AND.
Definition operations.hpp:622
@ OP_DOT
Access a value inside a class.
Definition operations.hpp:275
@ OP_SHIFT_LEFT
Bitwise Shift left.
Definition operations.hpp:688
@ OP_COMPARE_LESS
Compare numbers for less-than.
Definition operations.hpp:716
@ OP_FUNCTION_CALL
Function call.
Definition operations.hpp:111
@ OP_LITERAL_BOOL
Loads a boolean literal value.
Definition operations.hpp:425
@ OP_DIVIDE
Arithmetic multiply.
Definition operations.hpp:591
@ OP_LOGICAL_OR
Logical OR.
Definition operations.hpp:631
@ OP_MULTIPLY
Arithmetic multiply.
Definition operations.hpp:572
@ OP_COMPARE_NOT_EQUAL
Compare numbers for not equal-to.
Definition operations.hpp:760
@ OP_JUMP
Jump (Unconditional)
Definition operations.hpp:809
const std::vector< size_t > & get_operands() const
Get the operands.
Definition operation.cpp:213
This represents a type as declared in a translation unit.
Definition types.hpp:313
TypeType
Type of type.
Definition types.hpp:335
Middle intermediate representation (MIR) of a translation unit.
Definition gyoji-mir.hpp:51