preprocessor pass equivalent?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Mar 16 17:30:51 PDT 2012


On Sat, Mar 17, 2012 at 01:21:56AM +0100, Adam D. Ruppe wrote:
> On Saturday, 17 March 2012 at 00:13:33 UTC, H. S. Teoh wrote:
> >Playing around with it a little, I notice that it doesn't output
> >template bodies, even though calls to template functions are left
> >intact. It also doesn't expand [] into opIndex/opIndexAssign,
> 
> I didn't play with this yet.. but it might not have to do this.
> 
> On arrays, [] is a primitive, not a function. opIndex should
> only show up on custom types.

Yes, but I was testing with my custom AA implementation.


> For the templates, I'd be surprised if they weren't there
> somewhere. My D -> JS code works in the same location
> (after running semantic) and templates just work in there.
> 
> The instantiations might be in a weird place though.

Could be. I didn't really do much, just copied the code from your
previous email as-is. I don't know enough about dmd internals to be able
to do much more (though I'll have to get up to speed soon, if my AA
implementation ends up going into druntime).


T

-- 
IBM = I'll Buy Microsoft!


More information about the Digitalmars-d-learn mailing list