ArkScript
A small, lisp-inspired, functional scripting language
InstLoc.hpp
Go to the documentation of this file.
1#ifndef ARK_COMPILER_INTERMEDIATEREPRESENTATION_INSTLOC_HPP
2#define ARK_COMPILER_INTERMEDIATEREPRESENTATION_INSTLOC_HPP
3
4#include <cstdint>
5
6namespace Ark::internal
7{
8 // pp (2 bytes), ip (2 bytes), filename id (2 bytes), line (4 bytes) -> 10 bytes per record
9 struct InstLoc
10 {
11 uint16_t page_pointer;
12 uint16_t inst_pointer;
13 uint16_t filename_id;
14 uint32_t line;
15
16 std::strong_ordering operator<=>(const InstLoc&) const = default;
17 };
18}
19
20#endif // ARK_COMPILER_INTERMEDIATEREPRESENTATION_INSTLOC_HPP
std::strong_ordering operator<=>(const InstLoc &) const =default