Do everything in Java…

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 10 09:43:35 PST 2014


On Wed, Dec 10, 2014 at 05:19:53PM +0000, Tobias Pankrath via Digitalmars-d wrote:
> On Wednesday, 10 December 2014 at 14:16:47 UTC, Paulo  Pinto wrote:
> 
> >
> >Lots of options are possible when the C compiler and linker model
> >aren't being used.
> >
> >..
> >Paulo
> 
> I don't see how symbol table information and relocation meta data is
> sufficient to produce the correct object code if the template
> parameters are unknown.
> 
> // library
> void foo(T, U)(T t, U u) { t.tee(); u.uuuh(); }
> 
> // my code
> foo!(ArcaneType1, DubiousType2)(a, d);

That's why the current object file model doesn't work very well.

You'd have to extend the object file format to include compiler IR for
templates, then the compiler can instantiate templates from that IR
without needing access to the source. Which is a feature I've brought up
several times, but nobody seems to be interested in doing anything about
it.


T

-- 
Real Programmers use "cat > a.out".


More information about the Digitalmars-d mailing list