tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
[personal profile] tim
I haven't been writing daily research posts in a while, partly because we've been working on getting the Rust 0.4 release ready for quite a while (and it's still not going to be done until early next week at the earliest), and that has involved quite a lot of mind-numbingly routine tasks. The kind of mind-numbing work that's occasionally interspersed with finding some bug that makes you wonder whether the space-time continuum around your desk is flawed. In other words, the usual for working on compilers. My lack of writing is also because of this stuff going on at work, as well as my having spent lots and lots of time working on some loosely related pieces of writing, and thus not having a lot of energy left for writing about work.

I'd like to start writing regularly again, but I also don't want to leave any kind of impression that I'm committing to doing it every day again.

We've got one open bug left for the release. I'm working on that one, or actually, doing nothing at all on it right now while I wait for a snapshot to build. In the meantime, I looked at a typechecking bug that user BigEndian on IRC just reported. The bug is a good reminder that we're still at a point in developing the Rust compiler where some fairly obvious bugs can get found by users who are just experimenting, not trying to test the compiler. In this case, referring to variables such as the self variable, or function arguments, inside of a constant item nested inside a function, causes an internal compiler error in the typechecker. There is a separate pass from the typechecker that checks constants for constant-ness: it would reject this code, since a constant can't refer to non-constant things. But for reasons unknown and undocumented, that pass happens after typechecking. In the meantime, the typechecker assumes that constants are sensible, resulting in an assertion failure when they aren't.

I'm actually not sure what to do here. Typechecking nested constants properly would require some refactoring in the typechecker, and it seems like too much effort to go to in order to typecheck programs we know will fail in the next phase anyway! OTOH, there's probably a good reason why constant checking is after typechecking.
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User (will be screened if not on Access List)
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.


tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

October 2017

8910 11121314
15 161718192021

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags