On 6/14/12 1:54 PM, Graydon Hoare wrote:
No, we need to be able to constant-fold manually in the front- or middle- passes, not just punt the whole task to LLVM. Sad but true.
I did not mean to imply that we would actually use impl machinery for everything. I meant that, internally, we would always use a method_map table (or something like it) to decide what an overloadable-operator meant. Some of the entries would be "an intrinsically defined operation". The idea is just to help centralize the code paths so that we don't have "if it's in the table do one thing, otherwise fall back to the default" but always "check the table and interpret it based on the contents". As a bonus, things that don't care whether this is an intrinsic operation or a method can probably treat them all as methods. Anyway this is still just an idea rattling around in my brain. If I have some spare time (not likely) I may try it and see if it makes the code feel nicer.
Niko _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
