Skip to content

Commit

Permalink
New component containing function for defining COMPILE in environment…
Browse files Browse the repository at this point in the history
… E5.
  • Loading branch information
robert-strandh committed Sep 17, 2020
1 parent b382fa3 commit e1ad3e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Code/Boot/Phase-8/boot.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(format *trace-output* "Start of phase 8~%")
(with-accessors ((e5 sicl-boot:e5))
boot
(define-compile e5)
(setf (sicl-genv:macro-function 'defpackage e5)
(constantly nil))
(setf (sicl-genv:fdefinition 'host-symbolp e5)
Expand Down
13 changes: 13 additions & 0 deletions Code/Boot/Phase-8/define-compile.lisp
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)))))

0 comments on commit e1ad3e3

Please sign in to comment.