-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcl-cc-javascript.asd
More file actions
211 lines (208 loc) · 8.31 KB
/
Copy pathcl-cc-javascript.asd
File metadata and controls
211 lines (208 loc) · 8.31 KB
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
208
209
210
211
;;;; cl-cc-javascript.asd — JavaScript frontend: lexer, parser, runtime helpers
;;;;
;;;; Both the production system and its test system live in this one file:
;;;; the org does not use a separate cl-cc-javascript-test.asd.
(in-package #:asdf-user)
;;; System names are written as STRINGS, not #:symbols or :keywords. A string
;;; does not depend on the reader's current package state.
;;;
;;; The :depends-on designators below are deliberately left as keywords. They
;;; name systems owned by other repositories (cl-cc's packages/ tree), and
;;; rewriting them is out of scope for this migration.
(defsystem "cl-cc-javascript"
:description "CL-CC JavaScript frontend: lexer, parser, and runtime helpers"
:author "takeokunn <bararararatty@gmail.com>"
:maintainer "takeokunn <bararararatty@gmail.com>"
:license "MIT"
;; Single source of truth for the version: flake.nix reads this form, and
;; release.yml refuses to publish a tag that disagrees with it.
:version "0.2.0"
:homepage "https://github.com/nerima-lisp/cl-cc-javascript"
:bug-tracker "https://github.com/nerima-lisp/cl-cc-javascript/issues"
:source-control (:git "https://github.com/nerima-lisp/cl-cc-javascript.git")
;; cl-date-kit/cl-json-kit/cl-concurrent-kit/cl-host-kit are strings, not
;; keywords: they are plain nerima-lisp sibling systems consumed directly (no
;; adapter), not one of cl-cc's own packages/*/ components, so they do not
;; need the eval-when trick that :cl-cc-ast and friends rely on -- ASDF finds
;; them on the source registry like any other dependency.
:depends-on
(:cl-cc-ast
:cl-cc-bootstrap
:cl-cc-parse
:cl-cc-vm
"cl-date-kit"
"cl-json-kit"
"cl-concurrent-kit"
"cl-host-kit")
:pathname "src"
:serial t
:components
((:file "package")
(:file "macros")
(:file "lexer")
(:file "lexer-operator")
(:file "lexer-number")
(:file "lexer-template")
(:file "lexer-regex")
(:file "parser")
(:file "parser-stmt-binding")
(:file "parser-expr")
(:file "parser-expr-args")
(:file "parser-expr-literal")
(:file "parser-expr-postfix")
(:file "parser-expr-unary")
(:file "parser-expr-primary")
(:file "parser-arrow")
(:file "parser-stmt")
(:file "parser-stmt-fn")
(:file "parser-stmt-control")
(:file "parser-class-helpers")
(:file "parser-stmt-flow")
(:file "parser-stmt-dispatch")
(:file "parser-class")
(:file "parser-class-lower-classify")
(:file "parser-class-lower")
(:file "parser-module")
(:file "parser-module-export")
;; NOTE: there is intentionally no separate ast-lower pass. The parser lowers
;; JS-specific forms inline (e.g. %js-lower-assignment for &&=/||=/??=, %js-this
;; emitted directly), matching the PHP frontend's inline-lowering model. The
;; former ast-lower.lisp was dead, uncalled, and inconsistent — removed.
(:file "runtime")
(:file "runtime-call")
(:file "runtime-property")
(:file "runtime-symbol")
(:file "runtime-control")
(:file "runtime-array")
(:file "runtime-array-core")
(:file "runtime-array-transforms")
(:file "runtime-array-es2023")
(:file "runtime-array-iterators")
(:file "runtime-array-from")
(:file "runtime-object")
(:file "runtime-object-ops")
(:file "runtime-json")
(:file "runtime-string")
(:file "runtime-math")
(:file "runtime-collections")
(:file "runtime-collections-set")
(:file "runtime-collections-zip")
(:file "runtime-collections-iterators")
(:file "runtime-console")
(:file "runtime-promise")
(:file "runtime-generator")
(:file "runtime-map")
(:file "runtime-weak-collections")
(:file "runtime-date")
(:file "runtime-date-methods")
(:file "runtime-regex-combinators")
(:file "runtime-regex")
(:file "runtime-regex-api")
(:file "runtime-typed-arrays")
(:file "runtime-typed-arrays-encoding")
(:file "runtime-typed-arrays-methods")
(:file "runtime-typed-arrays-methods-es2023")
(:file "runtime-class")
(:file "runtime-module")
(:file "runtime-ops")
(:file "runtime-ops-encoding")
(:file "runtime-temporal")
(:file "runtime-temporal-datetime")
(:file "runtime-temporal-duration")
(:file "runtime-temporal-parse")
(:file "runtime-temporal-global")
(:file "runtime-builtins")
(:file "runtime-builtins-globals")
(:file "runtime-builtins-intl")
(:file "runtime-builtins-intl-core")
(:file "runtime-builtins-intl-number-format")
(:file "runtime-builtins-intl-date-time-format")
(:file "runtime-builtins-intl-collator")
(:file "runtime-builtins-intl-list-format")
(:file "runtime-builtins-intl-plural-rules")
(:file "runtime-builtins-platform")
(:file "runtime-builtins-platform-abort")
(:file "runtime-builtins-platform-url")
(:file "runtime-builtins-platform-crypto")
(:file "runtime-builtins-platform-atomics")
(:file "runtime-builtins-object")
(:file "runtime-builtins-table-specs")
(:file "runtime-builtins-table")
(:file "runtime-builtins-table-globals")
(:file "runtime-builtins-prelude")
(:file "runtime-method-resolver")
(:file "runtime-method-resolver-core")
(:file "runtime-method-resolver-tables")
(:file "runtime-method-resolver-dispatch")
;; Registers JS's %JS-* helpers as a backend bridge provider. Must load
;; last, after every %JS-* function is defined.
(:file "runtime-bridge-provider")
;; Installs the JS↔VM closure integration + prelude-global seeder, and
;; self-registers with cl-cc/bootstrap. Depends on the runtime specials
;; (*js-apply-fn* etc.) so it loads after runtime-call.
(:file "vm-integration"))
:in-order-to ((test-op (test-op "cl-cc-javascript/test"))))
;;; The test system is `cl-cc-javascript/test` (singular, slash-separated) with
;;; :pathname "t". It is NOT `cl-cc-javascript-test` and NOT
;;; `cl-cc-javascript/tests`.
(defsystem "cl-cc-javascript/test"
:description "Test system for cl-cc-javascript."
:author "takeokunn <bararararatty@gmail.com>"
:maintainer "takeokunn <bararararatty@gmail.com>"
:license "MIT"
:version "0.2.0"
:homepage "https://github.com/nerima-lisp/cl-cc-javascript"
:bug-tracker "https://github.com/nerima-lisp/cl-cc-javascript/issues"
:source-control (:git "https://github.com/nerima-lisp/cl-cc-javascript.git")
;; cl-weave is the org's test framework everywhere.
:depends-on (:cl-cc :cl-weave :cl-cc-javascript)
:pathname "t"
:serial t
:components
((:file "package")
(:file "lexer-test")
(:file "parser-decl-test")
(:file "parser-stmt-control-flow-test")
(:file "parser-stmt-module-test")
(:file "parser-stmt-misc-test")
(:file "e2e-core-test")
(:file "e2e-ast-test")
(:file "e2e-advanced-test")
(:file "e2e-advanced-builtins-test")
(:file "e2e-modern-test")
(:file "runtime-core-test")
(:file "runtime-array-test")
(:file "runtime-array-coverage-test")
(:file "runtime-string-number-test")
(:file "runtime-collections-set-test")
(:file "runtime-collections-iterators-test")
(:file "runtime-collections-values-test")
(:file "runtime-collections-weak-test")
(:file "runtime-regex-test")
(:file "runtime-method-resolver-dispatch-test")
(:file "runtime-misc-test")
(:file "runtime-temporal-test")
(:file "runtime-date-test")
(:file "runtime-json-test")
(:file "runtime-object-ops-test")
(:file "runtime-ops-test")
(:file "runtime-symbol-test")
(:file "runtime-typed-arrays-methods-test")
(:file "runtime-builtins-promises-test")
(:file "runtime-builtins-iterator-proxy-test")
(:file "runtime-builtins-platform-object-test")
(:file "runtime-console-test")
(:file "runtime-builtins-platform-test"))
;; Not UIOP:SYMBOL-CALL, and not a sibling-package prefix either: a .asd is
;; read by the plain CL reader before :depends-on is ever consulted, so any
;; PKG:SYMBOL token here must resolve against a package already present in
;; the image. UIOP is safe only because ASDF ships it. FIND-SYMBOL/
;; FIND-PACKAGE/FUNCALL are CL, always present, and are what
;; UIOP:SYMBOL-CALL itself reduces to. CL-WEAVE is guaranteed loaded here:
;; this system's own :depends-on includes it.
:perform (asdf:test-op (op system)
(declare (ignore op system))
(unless (funcall (find-symbol "RUN-ALL" (find-package "CL-WEAVE"))
:reporter :spec
:pass-with-no-tests nil)
(error "cl-cc-javascript tests failed"))))