Thread overview | |||||
---|---|---|---|---|---|
|
December 10, 2014 Re: Do everything in Java… | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Pankrath | 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". |
December 10, 2014 Re: Do everything in Java… | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | >> // 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
What information would / could that IR contain besides an AST?
|
December 10, 2014 Re: Do everything in Java… | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 2014-12-10 18:43, H. S. Teoh via Digitalmars-d wrote: > 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. Can't you just put it in a custom section? Or perhaps that what you're saying. Although, I'm not sure if OMF supports custom sections. -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation