-
Notifications
You must be signed in to change notification settings - Fork 5
/
jitrt.c
84 lines (69 loc) · 4.35 KB
/
jitrt.c
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include "record.h"
#include "variant.h"
#include "buffer.h"
int64_t kvs_jit_rt_record_get(int64_t record, int64_t idx);
int64_t kvs_jit_rt_record_get(int64_t record, int64_t idx) {
return (int64_t)(intptr_t) (kvs_record_get((kvs_record *)(intptr_t) record, (size_t) idx));
}
int64_t kvs_jit_rt_record_get_deref(int64_t record, int64_t idx);
int64_t kvs_jit_rt_record_get_deref(int64_t record, int64_t idx) {
return (int64_t)(intptr_t) (*kvs_record_get((kvs_record *)(intptr_t) record, (size_t) idx));
}
void kvs_jit_rt_buffer_write(int64_t buffer, int64_t data, int64_t size);
void kvs_jit_rt_buffer_write(int64_t buffer, int64_t data, int64_t size) {
kvs_buffer_write((kvs_buffer *)(intptr_t) buffer, (void *)(intptr_t) data, (size_t) size);
}
void kvs_jit_rt_buffer_read(int64_t buffer, int64_t data, int64_t size);
void kvs_jit_rt_buffer_read(int64_t buffer, int64_t data, int64_t size) {
kvs_buffer_read((kvs_buffer *)(intptr_t) buffer, (void *)(intptr_t) data, (size_t) size);
}
void kvs_jit_rt_variant_serialize_comparable_int32(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_serialize_comparable_int32(int64_t variant, int64_t buffer) {
kvs_variant_serialize_comparable_int32(*(kvs_variant **)(intptr_t) variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_serialize_comparable_int64(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_serialize_comparable_int64(int64_t variant, int64_t buffer) {
kvs_variant_serialize_comparable_int64(*(kvs_variant **)(intptr_t) variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_serialize_comparable_float(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_serialize_comparable_float(int64_t variant, int64_t buffer) {
kvs_variant_serialize_comparable_float(*(kvs_variant **)(intptr_t) variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_serialize_comparable_double(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_serialize_comparable_double(int64_t variant, int64_t buffer) {
kvs_variant_serialize_comparable_double(*(kvs_variant **)(intptr_t) variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_serialize_comparable_opaque(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_serialize_comparable_opaque(int64_t variant, int64_t buffer) {
kvs_variant_serialize_comparable_opaque(*(kvs_variant **)(intptr_t) variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_deserialize_comparable_int32(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_deserialize_comparable_int32(int64_t variant, int64_t buffer) {
kvs_variant **real_variant = (kvs_variant **)(intptr_t) variant;
*real_variant = kvs_variant_deserialize_comparable_int32(*real_variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_deserialize_comparable_int64(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_deserialize_comparable_int64(int64_t variant, int64_t buffer) {
kvs_variant **real_variant = (kvs_variant **)(intptr_t) variant;
*real_variant = kvs_variant_deserialize_comparable_int64(*real_variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_deserialize_comparable_float(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_deserialize_comparable_float(int64_t variant, int64_t buffer) {
kvs_variant **real_variant = (kvs_variant **)(intptr_t) variant;
*real_variant = kvs_variant_deserialize_comparable_float(*real_variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_deserialize_comparable_double(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_deserialize_comparable_double(int64_t variant, int64_t buffer) {
kvs_variant **real_variant = (kvs_variant **)(intptr_t) variant;
*real_variant = kvs_variant_deserialize_comparable_double(*real_variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_deserialize_comparable_opaque(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_deserialize_comparable_opaque(int64_t variant, int64_t buffer) {
kvs_variant **real_variant = (kvs_variant **)(intptr_t) variant;
*real_variant = kvs_variant_deserialize_comparable_opaque(*real_variant, (void *)(intptr_t) buffer);
}
void kvs_jit_rt_variant_deserialize_opaque(int64_t variant, int64_t buffer);
void kvs_jit_rt_variant_deserialize_opaque(int64_t variant, int64_t buffer) {
kvs_variant **real_variant = (kvs_variant **)(intptr_t) variant;
*real_variant = kvs_variant_deserialize_opaque(*real_variant, (kvs_buffer *) buffer);
}