tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (working)
[personal profile] tim
Today was bug triage day, but after last week's stupendous FIXME revolution (Graydon finished tagging all the FIXMEs and wrote a script that enforces, as part of running the test suite, that every FIXME has an issue number), my usual pastime (annotating FIXMEs) was no longer needed.

Except! There are still TODOs! haHA. Actually, there weren't that many TODOs in the codebase; I guess most people were pretty good about being consistent and using FIXME. Still, there were some, so I got started on fixing or annotating the ones in the libraries. Something drew me into refactoring quite a bit of (older) code in the rope library to use classes where possible, and generally be more concise: for example, call option::map_default, which is equivalent to Haskell's Maybe::maybe function, where possible, instead of explicitly pattern-matching. As an aside, there aren't too many times when I miss laziness, but this was one of them: I can write map_default where the default is an immediate value (like an integer literal), but if it's anything more expensive to compute, or even worse, a fail, I have to write the explicit alt because that's what gives me lazy evaluation. It's true, I could write another version of map_default that takes a thunk for the default, but meh.

On the other laptop, I banged my head against issue 2734 for a while. I have a vague theory that trans re-uses the same type descriptor for the opaque_box (or possibly opaque_iface) type... as the name "opaque" suggests, the ty descs would look the same at compile time but would call different glue to free the contained values at runtime. Combine that with monomorphization, and you get a bug where reordering functions affects whether or not the code tries to free a non-pointer. Fun times! I think I'm close to narrowing it down, though.

Well, somehow that was all I got done in 8 hours. Oh well, there's always tomorrow.


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