-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tests #5
Conversation
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
Mostly failing for the moment.
trivial-cltl2 will give us the native parse-macro, which could expand into gods know what. In particular on SBCL it uses a lot of POP and some internal SBCL functions, which can cause issues.
Important so that macros can actually use macroexpand.
For the truly perverse.
Not sure exactly what was wrong with the DO* loop, but DO* is hard to understand anyway. It was adding special variables called NIL from normal free special declarations somehow, and some of the binding related ANSI tests got really screwy results.
See extensive comment in native-sham
See long comment/apologia in parse-macro.lisp.
It's this or hack the reader, and I don't want to hack the reader. It's nicer if the test files can just be loaded normally without whatever ASDF nonsense is required to use Eclector or something. Majority of macrolet tests now pass. Amazing.
For these tests the same variable needs to be bound inside and outside the macrolet, so the whole thing has to go through the test evaluator, not just the outer part.
Example previous breakage: (funcall (let ((x 0)) (lambda (&optional (x x)) x))) would return an internal unboundedness marker. This is because the default form, X, was compiled in an environment in which all the parameters were already bound. compile-with-lambda-list is getting really unwieldly.
I made some mistakes whiles removing the backquotes.
It checked for local specialness, which doesn't actually mean that a new binding should also be special. Failed ANSI's FLET.40. Also, the stuff about remaking optionals and keys as special that I deleted in this commit is now moot, because default forms are no longer compiled in new-env.
without this, code like (let ((x 0)) ((lambda () (setq x 1))) x) will return a cell (!) instead of the actual value.
Not actually sure why I used catch originally. I mean obviously it's to avoid the nested VM calls thing the native VM does, but catch instead of block, I don't know. Plus I apparently just completely screwed it up so that NLX would never work. There was a problem (besides NLX just totally failing, that was the lack of GO) that didn't trip any of the ANSI tests I'm running: (let ((x 0)) (declare (special x)) (block nil (let ((x 1)) (declare (special x)) (return-from nil))) x) returned 1 instead of 0 because the dynenv stack wasn't getting undone. Also happened with the NLX version (wrap the block in a thunk). Need tests for this.
The compiler should be doing the right thing but the instructions are untested (so far).
the restored ones were causing stack overflows (??) when I first ran the tests. Since I completely redid PARSE-MACRO those seem to have disappeared.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.