-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdata.scm
121 lines (107 loc) · 2.58 KB
/
data.scm
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;This program is distributed under the terms of the ;;;
;;;GNU General Public License. ;;;
;;;Copyright (C) 2011 David Joseph Stith ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;
;;;Data;;;
;;;;;;;;;;
(data)
(for-each
(lambda (x)
(: (car x))
(asciz (cdr x)))
messages)
(if BOOTSTRAP_FILE
(begin
(: 'bootstrap_file)
(asciz BOOTSTRAP_FILE)))
(align 4)
(: 'dream_false)
(: 'false)
(tetra BOOLEAN_FALSE)
(: 'dream_true)
(: 'true)
(tetra BOOLEAN_TRUE)
(: 'eof)
(tetra EOF)
(align 4)
(: 'string_slash)
(tetra (+ IMMUTABLE_STRING #x400))
(tetra 'slash)
(: 'slash)
(asciz "/")
(align 4)
(define (sym t z)
(align 4)
(: (symbol-name z))
(tetra t)
(asciz z))
(for-each
(lambda (s) (sym SYMBOL s))
special-symbols)
(for-each
(lambda (s) (sym SYMBOL s))
syntax)
(for-each
(lambda (s) (sym SYMBOL s))
primitives)
(for-each
(lambda (s) (sym SYMBOL s))
additional-primitives)
(align 4)
(: 'freesymbol) (tetra 'symbols)
(: 'radix) (tetra 10)
(: 'root) (tetra 0)
(: 'mem) (tetra 'mem1)
(: 'dream_memlimit)
(: 'memlimit) (tetra 'memlimit1)
(: 'memnew) (tetra 'mem2)
(: 'memlimitnew) (tetra 'memlimit2)
(: 'memstr) (tetra 'memstr1)
(: 'memstrlimit) (tetra 'memstrlimit1)
(: 'memstrnew) (tetra 'memstr2)
(: 'memstrlimitnew) (tetra 'memstrlimit2)
(if LIBFCGI
(begin
(: 'fcgx_in) (tetra 0)
(: 'fcgx_out) (tetra 0)
(: 'fcgx_err) (tetra 0)
(: 'fcgx_envp) (tetra 0)
(: 'fcgi_name) (asciz LIBFCGI)
(: 'fcgx_finish_name) (asciz "FCGX_Finish")
(: 'fcgx_getchar_name) (asciz "FCGX_GetChar")
(: 'fcgx_putchar_name) (asciz "FCGX_PutChar")
(: 'fcgx_putstr_name) (asciz "FCGX_PutStr")
(: 'fcgx_accept_name) (asciz "FCGX_Accept")
(: 'fcgx_getparam_name) (asciz "FCGX_GetParam")
(: 'fcgx_fflush_name) (asciz "FCGX_FFlush")))
(align 4)
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Built-in Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
(: 'builtins)
(for-each
(lambda (s)
(tetra (symbol-name s))
(: (proc-name s))
(tetra SYNTAX_PRIMITIVE)
(tetra (prim-name s)))
syntax)
(: 'first_primitive)
(for-each
(lambda (p)
(tetra (symbol-name p))
(: (proc-name p))
(tetra PRIMITIVE)
(tetra (prim-name p)))
primitives)
(: 'first_additional_primitive)
(for-each
(lambda (p)
(tetra (symbol-name p))
(: (proc-name p))
(tetra PRIMITIVE)
(tetra (prim-name p)))
additional-primitives)
(tetra 0)