forked from robert-strandh/SICL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New component containing function for defining COMPILE in environment…
… E5.
- Loading branch information
1 parent
b382fa3
commit e1ad3e3
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(cl:in-package #:sicl-boot-phase-8) | ||
|
||
(defun define-compile (e5) | ||
(setf (sicl-genv:fdefinition 'compile e5) | ||
(lambda (name &optional definition) | ||
(assert (null name)) | ||
(assert (not (null definition))) | ||
(let* ((cst (cst:cst-from-expression definition)) | ||
(client (make-instance 'sicl-boot:client)) | ||
(ast (let ((cleavir-cst-to-ast::*origin* nil)) | ||
(cleavir-cst-to-ast:cst-to-ast client cst e5))) | ||
(code-object (sicl-compiler:compile-ast client ast))) | ||
(sicl-boot:tie-code-object client code-object e5 e5))))) |