-
Notifications
You must be signed in to change notification settings - Fork 0
/
ybot_globals.xtm
59 lines (44 loc) · 1.16 KB
/
ybot_globals.xtm
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
(bind-func make_global_double:[double*]*
(lambda ()
(let (($p:double* (halloc)))
$p)))
(bind-func get_global_double:[double,double*]*
(lambda ($x:double*)
(pref $x 0)))
(bind-func make_global_float:[float*]*
(lambda ()
(let (($p:double* (halloc)))
$p)))
(bind-func set_global_double:[void,double*,double]*
(lambda ($p:double* val:double)
(pset! $p 0 val)
void))
(bind-func get_global_float:[float,float*]*
(lambda ($x:float*)
(pref $x 0)))
(bind-func set_global_float:[void,float*,float]*
(lambda ($p:float* val:float)
(pset! $p 0 val)
void))
(bind-func make_global_i64:[i64*]*
(lambda ()
(let (($p:i64* (halloc)))
$p)))
(bind-func get_global_i64:[i64,i64*]*
(lambda ($x:i64*)
(pref $x 0)))
(bind-func set_global_i64:[void,i64*,i64]*
(lambda ($p:i64* val:i64)
(pset! $p 0 val)
void))
(bind-func make_global_data:[i64*,i64]*
(lambda (size_in_bytes:i64)
(let (($data:i64* (halloc size_in_bytes)))
$data)))
(bind-func destroy_global_data:[void,i64*]*
(lambda ($data:i64*)
(free $data)
void))
;(bind-func value:[!a,!a*]*
; (lambda (x:!a*)
; (bitcast (pref x 0) !a*)))