-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: rework some of the standard gates init logic to accommodate seq gates #809
Bugfix: rework some of the standard gates init logic to accommodate seq gates #809
Conversation
07e47ea
to
c5601f3
Compare
c5601f3
to
b71ead8
Compare
This was in draft because of issues I was encountering for an unrelated reason, I will address these issues in a separate PR |
src/initialize-standard-gates.lisp
Outdated
(parsed-program-gate-definitions parsed-program))) | ||
|
||
(unless (boundp' **default-gate-definitions**) | ||
(eval-when (:compile-toplevel :load-toplevel :execute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this eval-when needs to be on the outside
also please write a comment above this block of code to explain what it's doing anx why it's here. It's unusual to see toplevel code getting evaluated like this.
Lastly, I would wrap this stuff in a function itself, and do the eval-when stuff around a call to it.
(eval-when (...)
(defun read-standard...)
(defun initialize-standard-gate-definitions...)
(initialize-standard-gate-definitions)
) ; eval-when
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented the structural changes.
Did my best to explain what was going on, but I don't know that I was as informative as I could be
b71ead8
to
3ba4154
Compare
3ba4154
to
09d7ad7
Compare
src/initialize-standard-gates.lisp
Outdated
(setf (gethash (gate-definition-name gate-def) table) | ||
gate-def))))))) | ||
|
||
(initialize-standard-gates));eval-when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(initialize-standard-gates));eval-when | |
(initialize-standard-gates) | |
) ; eval-when |
09d7ad7
to
af48e69
Compare
af48e69
to
19f2863
Compare
It was discovered when fiddling with some of the std gate definitions that the recent sequence gate definition validation/resolution aren't fully integrated for sequence gate definitions added to this file