Skip to content

Commit

Permalink
Make AST interpreter give up on uninterpretable closures
Browse files Browse the repository at this point in the history
  • Loading branch information
Bike committed Apr 22, 2019
1 parent df191d3 commit 87d1209
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lisp/kernel/cleavir/ast-interpreter.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,20 @@
(let ((body (cleavir-ast:body-ast ast))
(dynenv-out (cleavir-ast:dynamic-environment-out-ast ast))
(ll (cleavir-ast:lambda-list ast)))
;; KLUDGE: If the closure has ASTs we can't interpret, we have
;; to give up now, and there's no way to only compile this
;; possibly-a-closure. We have to check proactively.
(cleavir-ast:map-ast-depth-first-preorder
(lambda (ast)
(when (typep ast '(or #+cst cc-ast:bind-va-list-ast
cc-ast:defcallback-ast
cc-ast:debug-break-ast
cc-ast:debug-message-ast
cc-ast:multiple-value-foreign-call-ast
cc-ast:foreign-call-ast
cc-ast:foreign-call-pointer-ast))
(error 'interpret-ast:cannot-interpret :ast ast)))
body)
(multiple-value-bind (required optional rest va-rest-p keyp key aok-p)
(parse-lambda-list ll)
(lambda (core:&va-rest arguments)
Expand Down

0 comments on commit 87d1209

Please # to comment.