1
0
forked from alex-eg/sex

implement closures

This commit is contained in:
2026-09-29 21:07:16 +03:00
parent 1084b7d266
commit 8a3f51e833
10 changed files with 622 additions and 41 deletions

View File

@@ -175,17 +175,22 @@ status, which is ours to pass on."
(semen-process raw-forms))))
(define prelude
'((include inttypes.h)
(include stdbool.h)
(append
'((include inttypes.h)
(include stdbool.h)
(include stddef.h) ; max_align_t, for closure environments
(typedef u8 uint8-t)
(typedef i8 int8-t)
(typedef u16 uint16-t)
(typedef i16 int16-t)
(typedef u32 uint32-t)
(typedef i32 int32-t)
(typedef u64 uint64-t)
(typedef i64 int64-t))
(typedef u8 uint8-t)
(typedef i8 int8-t)
(typedef u16 uint16-t)
(typedef i16 int16-t)
(typedef u32 uint32-t)
(typedef i32 int32-t)
(typedef u64 uint64-t)
(typedef i64 int64-t)))
;; The closure environment is the part of the ABI, so include it in
;; every module
(list (closure-env-declaration))))
(define (main)
(let* ((argv (command-line-arguments))