-
Notifications
You must be signed in to change notification settings - Fork 5
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
Defer unresolvable calls up the call stack until they are resolvable #202
Conversation
34edc4b
to
b79e8b6
Compare
Stable clippy has failed for this run: nightly. A maintainer should check the logs. If known good clippy passed, this is non-fatal to the PR. |
f2a1b92
to
92da203
Compare
This will be helpful for two purposes: 1. Function calls based on macros can't be calculated by CIL, so we need to pull them up the stack and resolve them ourselves. 2. Certain validations CIL does after macro resolution aren't tracked by Cascade's type system (for example object class/perm compatibility), so we need to validate them up the call stack.
A comment here is just a regular Atom that starts with a ';'. sexp_internal surrounds it with newlines, so only that specific atom is commented out. Care should be taken if comments are inserted in lists, because they could change the number of arguments, potentially resulting in invalid CIL. nb sexp doesn't natively support comments. CIL's use of sexp supports lisp-style comments starting with ";"
Put comments in the output at the source of a deferred statement for information and debugging
This comment exists somewhere else where it is accurate
92da203
to
1c57b45
Compare
FYI, I'm seeing a regression in refpolicy3 compile on this branch, probably introduced by 4460f42. Will try to get that sorted out and notify here once it's fixed. |
I think I've got it sorted out. Basically another bug related to the lack of #201. My fix passes initial smoke testing. I'm doing slightly more time-expensive testing now and will push once it passes. |
This allows let bindings to be resolved, and allows for future argument handling. See the update to let.cas in this commit for an example of what this enables by itself
ValidatedStatement list
If we can't resolve the right macro at the call-site, we propagate it up the call stack, resolving arguments as we go, until we can resolve the right call name at compile time.
This commit also fixes a logic bug, where we returned after finding the first end of deferrals, rather than searching for more
1c57b45
to
e53c0ab
Compare
Pushed the fix. The change is in the commit now hashed as 3178681 |
77c87d9
to
f9413d9
Compare
No description provided.