blob: 467196e59c4fc183c49d693c7abd99d02f70cf2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/*
* This is the only header included in any c source file
*/
#pragma once
#define KPL_VERSION "0.0.0"
#define KPL_FILE_EXTENSION ".kpl"
#define KPL_WEBSITE "https://kpl.dev"
// System includes
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <sched.h>
#include <pthread.h>
#include <semaphore.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/uio.h>
#include <sys/param.h>
#include <linux/fs.h>
#include <linux/io_uring.h>
#ifdef KPL_VALGRIND
#include <valgrind/valgrind.h>
#include <valgrind/memcheck.h>
#endif
// KPL forward declarations
typedef struct _kpl_object_gc kpl_object_gc;
typedef struct _kpl_object_native kpl_object_native;
typedef struct _kpl_object_task kpl_object_task;
typedef struct _kpl_thread kpl_thread;
typedef struct _kpl_env kpl_env;
// KPL includes
#include "kpl/color.h"
#include "kpl/value.h"
#include "kpl/class.h"
#include "kpl/object.h"
#include "kpl/tree.h"
#include "kpl/identifier.h"
#include "kpl/type.h"
#include "kpl/storage.h"
#include "kpl/ast.h"
#include "kpl/memory.h"
#include "kpl/io.h"
#include "kpl/gc.h"
#include "kpl/string.h"
#include "kpl/array.h"
#include "kpl/error.h"
#include "kpl/task.h"
#include "kpl/env.h"
|