Temporary @trusted scope
rikki cattermole
rikki at cattermole.co.nz
Wed Dec 19 16:09:06 UTC 2018
On 20/12/2018 5:02 AM, Jonathan M Davis wrote:
> On Wednesday, December 19, 2018 1:19:42 AM MST rikki cattermole via
> Digitalmars-d-learn wrote:
>> On 19/12/2018 7:11 PM, Jonathan M Davis wrote:
>>> Really? I would have thought that that would be a pretty obvious
>>> optimization (especially if inlining is enabled).
>>
>> Assembly doesn't lie.
>
> I'm not saying that you're wrong, just expressing surprise. I've never
> checked to see what code actually got generated. But I do think that it's
> something that the compiler should be smart enough to do even if it isn't
> currently that smart, and the fact that it isn't is most defintely not a
> good thing.
>
> - Jonathan M Davis
I agree, this would be a very simple AST rewrite. Would be well worth
doing since its a common-ish pattern.
More information about the Digitalmars-d-learn
mailing list