Skip to content

Commit

Permalink
Add 'lisp-toplevel' form to coalton syntax
Browse files Browse the repository at this point in the history
lisp-toplevel may appear at any point in a coalton-toplevel or coalton
file context.

During code generation, lisp forms are merged with coalton definitions
according to the rule:

1. coalton forms are emitted in scc order
2. every time a coalton form is emitted, all lisp forms lexically preceding that form are emitted first

Convert math/num.lisp from interleaved lisp and coalton-toplevel forms
to a single coalton-toplevel form containing multiple lisp-toplevel forms.

Lisp-toplevel is, initially, restricted to library source code.
  • Loading branch information
jbouwman authored and stylewarning committed Aug 13, 2024
1 parent d86ca46 commit 3cb857f
Show file tree
Hide file tree
Showing 13 changed files with 707 additions and 433 deletions.
7 changes: 6 additions & 1 deletion coalton.asd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
:version (:read-file-form "VERSION.txt")
:around-compile (lambda (compile)
(let (#+sbcl (sb-ext:*derive-function-types* t)
#+sbcl (sb-ext:*block-compile-default* :specified))
#+sbcl (sb-ext:*block-compile-default* :specified)
;; The lisp-toplevel form is currently
;; restricted to standard library
;; implementation by checking for the
;; presence of this feature.
(*features* (cons ':coalton-lisp-toplevel *features*)))
(funcall compile)))
:defsystem-depends-on (#:coalton-asdf)
:depends-on (#:coalton-compiler
Expand Down
Loading

0 comments on commit 3cb857f

Please sign in to comment.