tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
[personal profile] tim
It's good to be able to go home on a Friday night having submitted two pull requests: one for #3979 and one for #3860.

I've been working on these two minor bugs for way too long. I guess #3979 isn't all *that* minor, though. It was an aspect of the interaction between default methods and supertraits that was left incomplete -- fixing it required some thought. I wasn't sure at first what was already implemented. It turned out supertraits weren't transitive, plus there was no way to figure out in the compiler what the impl is of a given trait for a given type. It was really easy to make the coherence checking pass spit out a table mapping trait IDs to tables mapping types to impls -- the rest wasn't too bad (except for a hairy bit of code in ty that computes the transitive supertraits for a given list of trait bounds).

I didn't spend as much time on #3860, which involved borrowck and trans having divergent notions of which nodes in the AST introduced new scopes. My first solution was to change trans to introduce a new scope for each statement, because that seemed easier. Unfortunately, this meant creating lots of extra basic blocks and it was a performance loss. So it looked like it would make more sense to change borrowck, which is a static analysis so that's not going to directly mess up performance. My fix is kind of awkward (and best understood by looking at the code), but it works.

I still have more time to make up by working over the weekend, so there's no rest for the weary.
From:
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:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
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.

Profile

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

December 2014

S M T W T F S
 12345 6
78910 111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags