process imported forms as toplevel, not as text

1. register imported types
2. protect against multiple imports (diamond, circular)
This commit is contained in:
2026-09-16 01:11:53 +03:00
parent 85bf1c163c
commit d0d0ea8e84
5 changed files with 32 additions and 13 deletions

View File

@@ -7,6 +7,9 @@
;;; as a prototype and `greet-count' as an extern. Both keep external
;;; linkage, so they refer to the one definition in greet.o rather than
;;; to private copies.
;;;
;;; Also check that import populates type-database, by means of
;;; describe-fields macro, which should work on imported type.
(include stdio.h)
@@ -16,4 +19,6 @@
(greet "world")
(greet "sex")
(printf "%d greetings\n" greet-count)
(describe-fields greeting)
(printf "\n")
(return 0))