static function and access frame

Alex sascha.orlov at gmail.com
Tue Jan 23 23:38:35 UTC 2018


On Tuesday, 23 January 2018 at 23:22:09 UTC, Steven Schveighoffer 
wrote:
>> 
>> So, if change the fun to static, it cannot pickup the pointer 
>> and therefore can't call anything of the aliased object. If I 
>> get it right...
>
> I think so. But this is a guess, as the generated call clearly 
> never uses that 'this' member. Interesting to me that it calls 
> that member 'this', when 'this' is already defined!
>
Hmm... yes, I see...

>> 
>> cool option, by the way... didn't know anything about it. What 
>> does -ast do?
>
> -vcg-ast means take the generated AST before optimization (I 
> think), and output a d-source-like file (called file.d.cg) that 
> shows the representation. Super useful when you are trying to 
> figure out what the compiler does to your code. It only happens 
> if compilation succeeds.
>
> -ast, I don't think does anything, but not sure if that's what 
> your question was.
>
> The reason you don't know anything about it is because it's a 
> debugging option and not documented :) At least, that's what I 
> was told...
>
:)

> If you click on the AST button on run.dlang.io, you get the 
> same thing.
>

bug filed
https://issues.dlang.org/show_bug.cgi?id=18289

Thanks a lot.



More information about the Digitalmars-d-learn mailing list