-
Notifications
You must be signed in to change notification settings - Fork 14
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
Compiling failed in Racket 6.3 #48
Comments
I hope someone will look into this - in the mean time we are stuck with Racket 6.2. Notes: |
Oh, I see. |
FWIW I added a commit which ignores the extra fields (there was also an error with the "wrapped" struct which was removed, and with the "prefix" and "mod" structs which got an extra field). Here's the commit: With that change, the codebase compiles, but the tests fail. I doubt it will work as-is, anyway: all the extra fields which my commit ignores seem related to the new macro expander, so it is quite possible that some problems related to identifiers which should or should not be equal will arise. Also, I added a new bytecode parser for version 6.3, as this is the version in which @soegaard said the changes were introduced, but the exact version number might need to be adjusted. Hopefully someone with good knowledge of the |
@jsmaniac I happened to reread this today. You say the tests fail on 6.3 - but that might not be a bad sign. Do you know whether the tests fail on 6.2 or not? |
@soegaard How exactly are you supposed to run the tests? |
@soegaard What's missing to get this working with Racket 7.0? It seems this broke awhile ago - 6.1 or so and has been broken since. |
Hi @pmatos , Whalesong is supposed to work on Racket 6.2. The Whalesong compiler uses the standard Racket compiler to compile Racket files into zo-files i.e. to bytecode. Then the bytecode is compiled to JavaScript. This has the effect that each time a change is made to the Racket VM bytecodes, Whalesong needs to be fixed. Normally small changes are reasonable easy to fix, but in the 6.3 the new macro expander arrived. That meant that a fix is more involved - see the comment on qq-and-or.rkt and the change to the compilation-top bytecode. There were some further changed to the VM between 6.3 and 7.0, but the introduction of 7.0 is yet again a major change to the VM and compilation system, so alas Whalesong is stuck with 6.2 for the time being. The new compiler (the one with Chez Scheme backend) produces so-called linklets. The best way to make a Racket to JavaScript compiler would be to reuse the Racket-to-linklet part of the compiler and then figure out how to compile from linklets to JavaScript. Thus avoiding bytecodes altogether. This way a JavaScript compiler won't break at every bytecode change. In https://github.com/soegaard/urlang/tree/master/compiler-rjs I have the beginnings of such a compiler, but it does not support modules (nor linklets) yet. (TCO is supported in browsers with a JavaScript engine that supports TCO (read Safari). Sadly Chrome had TCO support at some time, but removed it). Anyways - if you want to use Whalesong you are unfortunately stuck with 6.2. |
The text was updated successfully, but these errors were encountered: