SayoriOS  0.3.3
ubsan.h
1 //
2 // Created by ndraey on 23.09.23.
3 //
4 
5 #pragma once
6 
7 #include "common.h"
8 
9 #define is_aligned(value, alignment) !((value) & ((alignment) - 1))
10 
12  const char *file;
13  uint32_t line;
14  uint32_t column;
15 };
16 
18  uint16_t kind;
19  uint16_t info;
20  char name[];
21 };
22 
24  struct source_location location;
25  struct type_descriptor *type;
26  size_t alignment;
27  uint8_t type_check_kind;
28 };
29 
31  struct source_location location;
32  struct type_descriptor left_type;
33 // struct type_descriptor right_type;
34 };
35 
36 static const char *Type_Check_Kinds[] = {
37  "load of",
38  "store to",
39  "reference binding to",
40  "member access within",
41  "member call on",
42  "constructor call on",
43  "downcast of",
44  "downcast of",
45  "upcast of",
46  "cast to virtual base of",
47 };
Основные определения ядра