-
Notifications
You must be signed in to change notification settings - Fork 1
/
alu.asd
207 lines (200 loc) · 6.55 KB
/
alu.asd
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
(asdf:defsystem :alu
:depends-on (:trivia :alexandria :sycamore :serapeum :closer-mop :command-line-arguments
(:version "asdf" "3.3.5")
:swank :slynk
:cl-environments
:verbose)
:version "0.0.0"
:description "Powering Vamp-IR with the power of the original lineage"
:author "Mariari"
:license "MIT"
:pathname "src/"
:build-pathname "../build/alu.image"
:entry-point "alu::main"
:build-operation ;; #+(or ecl ccl)
"program-op"
;; #-(or ecl ccl) "image-op"
:components
((:module util
:serial t
:description "Internal utility functions"
:components ((:file "package")
(:file "bit")
(:file "utils")))
(:module reference
:serial t
:description "Defines a mutable pass by reference module"
:depends-on ()
:components ((:file "package")
(:file "ref")))
(:module stack
:serial t
:description "Defines a simple stack data structure designed for stack traces"
:depends-on ("reference")
:components ((:file "package")
(:file "stack")))
(:module closure
:serial t
:description "Closure data type and utilities"
:depends-on ("util")
:pathname #P"closure/"
:components ((:file "package")
(:file "closure")
(:file "dependency")))
(:module specification
:serial t
:description "Internal Alucard Specification"
:depends-on ("util" "closure" "stack")
:pathname #P"spec/"
:components ((:file "package")
(:file "data-traversal")
(:file "meta")
(:file "term")
(:file "type")
(:file "global")
(:file "storage")
(:file "type-op")
(:file "term-op")
(:file "emit")))
(:module vampir
:serial t
:description "The Vampir Extraction Module"
:components ((:file "package")
(:file "spec")
(:file "vampir")))
(:module intermediate-representation
:serial t
:description "The various IR's of the Alucard compiler"
:depends-on ("util" "specification")
:pathname #p"intermediate/"
:components ((:file "package")
(:file "primitive-global")
(:file "new-terms")
(:file "spec")))
(:module typechecker
:serial t
:description "The type checker of the Alucard compiler"
:depends-on ("util" "closure" "intermediate-representation" log)
:components ((:file "package")
(:file "types")
(:file "size")
(:file "unifier")
(:file "typecheck")
(:file "intro")))
(:module pass
:serial t
:depends-on ("intermediate-representation"
"closure"
"vampir"
"util"
typechecker
log)
:description "Alucard Passes"
:components ((:file "package")
(:file "evaluate-body")
(:file "expand")
(:file "relocation")
(:file "anf")
(:file "extract")
(:file "redundant-let")
(:file "pack")
(:file "pass")
(:file "array")
(:file "dependencies")
(:file "pipeline")))
(:module stepper
:serial t
;; we need symbols like `alu:def' in scope, in the future we
;; should remove the dependency on package and have a way of
;; extending our stepper with new primitives, and ways of stepping
;; through it. So we can instrument our specials in (:file alu)
;; instead.
:depends-on (package stack)
:description "Provides a syntax stepper that can step through the
syntax of common lisp and allow instrumenting syntax such that a
stack can be implemented."
:components ((:file "package")
(:file "stepper")
(:file "define")))
(:module log
:serial t
:depends-on (specification)
:components ((:file "package")
(:file "log")))
;; only folder without a package
(:module prelude
:serial t
:description "Alucard Prelude"
:depends-on (alu pass)
:pathname #P"../alu/"
:components ((:file "package")
(:file "prelude")))
(:file "package" :depends-on ("specification"))
(:file "alu" :depends-on (package stepper))
(:file "../app/main" :depends-on ("alu" "prelude")))
:in-order-to ((asdf:test-op (asdf:test-op :alu/test))))
(asdf:defsystem :alu/test
:depends-on (:alu :fiveam)
:description "Testing alu"
:pathname "test/"
:serial t
:components
((:file "package")
;; we setup our table with global-examples
(:file "global-examples")
(:file "alu")
(:file "spec")
(:file "anf")
(:file "expand")
(:file "relocation")
(:file "evaluate-body")
(:file "dependencies")
(:file "typecheck")
(:file "packing")
(:file "pass")
(:file "vampir")
(:file "stack")
(:file "step")
(:file "run-tests"))
:perform (asdf:test-op (o s)
(uiop:symbol-call :alu-test :run-tests)))
;; Big TODO, figure out how to get good docs for Our project!
(asdf:defsystem :alu/documentation
:depends-on (:fiveam
:swank :slynk
:staple
:staple-server :asdf-package-system
:staple-restructured-text)
:description "Documenting alu"
:pathname "test/"
:serial t
:components
()
:perform (asdf:test-op (o s)
(uiop:symbol-call :alu-test :run-tests)))
;; #-clpm-client
(defun activate-project ()
"Activates the projects clmpfile after `clpm-client' is loaded as the
default project. Note that the repl must be in the ALU directory for
the fileplath to work!"
(uiop:symbol-call :clpm-client '#:activate-context (truename "clpmfile")
:activate-asdf-integration t))
(uiop/image:register-image-restore-hook
(lambda ()
(uiop:symbol-call :verbose 'restart-global-controller)
(setf *package* (find-package :aluser))
(setf *print-pretty* t))
nil)
(uiop/image:register-image-dump-hook
(lambda ()
(uiop:symbol-call :verbose 'remove-global-controller))
nil)
#+sb-core-compression
(defmethod asdf:perform ((o asdf:image-op) (c asdf:system))
(uiop:dump-image (asdf:output-file o c) :executable t :compression t))
(defun make-system ()
(handler-case (asdf:load-system :alu)
(error (c)
(declare (ignorable c))
(ql:quickload :alu)))
(asdf:make :alu))