On Mon, Jul 15, 2013 at 2:15 PM, Sandro Magi <[email protected]> wrote:
> On 15/07/2013 3:59 PM, Jonathan S. Shapiro wrote: > > > But straightforward things often take months to debug and implement in > > practice. For a long-term language building exercise, that may be > > fine. For a quick bring-up it isn't, and even for a long-term effort, > > there are major advantages for validating the language and starting to > > build libraries by having a quick bring-up path. > > Hmm, I suppose I just consider "months" to be a quick bring-up timeframe > for a stable BitC compiler! > Probably. But I'm saying that one of those "straightforward" transforms can take months to get right when the AST (or the IL, depending on your point of view) starts to get complicated. :-) > The CLR will probably get you 80% of the way there, but representing > that last 20% of programs is a real pain. In particular, data structures > that need to exploit layout for, eg. cache awareness or > cache-obliviousness, can't be representing straightforwardly in the safe > subset. You'll always have to add indirections unless you want to lose > the benefits of the runtime infrastructure, like GC. > Layout only becomes an issue when the data structures contain references. At that point you need to move to the unsafe subset and you lose essentially *all* of the benefit of CLR. In particular, you lose GC support completely once you cross the line into the unsafe subset. That's particularly painful when *you* know the structure and its use are safe but you can't express that safety to CLR. At that point you might as well go to LLVM and take over full responsibility for GC. The only case where this arose in BitC was unboxed unions containing references, and Eric Northup identified a layout approach for those that CLR would recognize as safe. Right now my goal is to have something that is up and running as quickly as possible. Getting to an implementation that is performant is (for now) Not A Goal. If you're going CLR, let me know if you have any questions or need some > pointers to libraries or something. I've been working with the CLR for > many years now. Thanks! Jonathan
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
