August 22, 2001
Which brings another interesting point. The preprocessor was the reason why C had #file and #line. Any chance to have that in D (if someone wants, say, a yacc to D or something to D converter) ?

Christophe

Axel Kittenberger wrote:

> Walter wrote:
>
> > Not impossible. You could add the debug info to the generic language. -Walter
>
> Not even impossible if the intermediate is C.
> I just say #file and #line :o)
>
> However investigating variables in the debugger will not work, if there is some additional name mangling applied on them :(

August 22, 2001
Axel Kittenberger wrote:

> I think a major step forward in computing would be not to let the compilers generate native object code, but some intermediate register language. There linker could be allowed to do far improved optimizations, as it could in example scrap unused functions of the image, or is allowed to realize other cross-file depencies.

That's one of the very purposes of the Mozart environment that underlies LX (http://mozart-dev.sf.net) Take a look at the Java-extending plugins.


Christophe

August 23, 2001
Back in the early 80's <cough><cough>, the compiler and its data had to fit in 256Kb. That meant the compiler was split into 3 passes: a parser, optimizer, and code generator. They communicated with a simple text file.


Axel Kittenberger wrote in message <9lu45m$2eg5$1@digitaldaemon.com>...
> Back when the compiler was multi-pass, that's just what it did.

Huh? I'm confused, gcc? Gcc has an intermediate language (RTL) however it's never written to disk, and according to the docentation it's not even really possibly.

I think a major step forward in computing would be not to let the compilers generate native object code, but some intermediate register language. There linker could be allowed to do far improved optimizations, as it could in example scrap unused functions of the image, or is allowed to realize other cross-file depencies.

However as I realize such a thing is beyond this particular project :o) It would in majority go about a new gcc backend/target, and a complety new linker with integrated post-compiler/final-optimizer that creates final imagines of this intermediate format.

Might be possible that such efforts exists already, however at the GNU I
didn't yet hear about it. However from what I understood this one of the
key features microsofts tries to archieve with their.net efforts.
I just hope the OpenSource world doesn't oversleep this tech.

. Axel


August 25, 2001
C has problems as an intermediate language. For example, how do I do exception handling? -Walter

Axel Kittenberger wrote in message <9lu3mu$2e3u$1@digitaldaemon.com>... Walter wrote:

> Not impossible. You could add the debug info to the generic language. -Walter

Not even impossible if the intermediate is C.
I just say #file and #line :o)

However investigating variables in the debugger will not work, if there is some additional name mangling applied on them :(



August 25, 2001
Walter wrote:
> 
> I ran across another solution.
> 
> Have D write an intermediate file out in some simple generic language. Write a front end for gcc that compiles the generic language. There's some effort this way already (the C-- project).

	Woh.  Weren't we poking at early C++ implementations for doing this?  I
really doubt that the gcc folks would include a meta-language front into
the standard gcc just so you could by-pass GPL, and D will never catch
on if folks actually have to build a special gcc.  I also think this
might insult a few people.  It is you're choice, but mind the politics.

Dan
August 25, 2001
"Walter" <walter@digitalmars.com> writes:

> C has problems as an intermediate language. For example, how do I do exception handling? -Walter

Using longjmp()?

There is at least one Ada compiler which uses C as an intermediate language, so this problem can certainly be solved.

-- 
Florian Weimer 	                  Florian.Weimer@RUS.Uni-Stuttgart.DE
University of Stuttgart           http://cert.uni-stuttgart.de/
RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898
August 26, 2001
Dan Hursh wrote in message <3B872C84.10358024@infonet.isl.net>...
>Walter wrote:
>> I ran across another solution.
>> Have D write an intermediate file out in some simple generic language.
Write
>> a front end for gcc that compiles the generic language. There's some
effort
>> this way already (the C-- project).
> Woh.  Weren't we poking at early C++ implementations for doing this?  I
>really doubt that the gcc folks would include a meta-language front into the standard gcc just so you could by-pass GPL, and D will never catch on if folks actually have to build a special gcc.  I also think this might insult a few people.  It is you're choice, but mind the politics.


There actually is a gnu project to do just that, called the C-- project. I'm no stranger to insulting people anyway <g>, just my manifesto listing what's wrong with C++ has offended many.


August 27, 2001
Walter wrote:
> Dan Hursh wrote in message <3B872C84.10358024@infonet.isl.net>...
> 
>>Walter wrote:
>>
>>>I ran across another solution.
>>>Have D write an intermediate file out in some simple generic language.
>>>
> Write
> 
>>>a front end for gcc that compiles the generic language. There's some
>>>
> effort
> 
>>>this way already (the C-- project).
>>>
>>Woh.  Weren't we poking at early C++ implementations for doing this?  I
>>really doubt that the gcc folks would include a meta-language front into
>>the standard gcc just so you could by-pass GPL, and D will never catch
>>on if folks actually have to build a special gcc.  I also think this
>>might insult a few people.  It is you're choice, but mind the politics.
>>
> 
> 
> There actually is a gnu project to do just that, called the C-- project. I'm
> no stranger to insulting people anyway <g>, just my manifesto listing what's
> wrong with C++ has offended many.
> 
> 
> 

I rather like that solution.  Especially if machine dependencies can be kept localized.

August 31, 2001
longjmp()? I hadn't thought of that. Not sure how to make that work.

Florian Weimer wrote in message ...
>"Walter" <walter@digitalmars.com> writes:
>
>> C has problems as an intermediate language. For example, how do I do exception handling? -Walter
>
>Using longjmp()?
>
>There is at least one Ada compiler which uses C as an intermediate language, so this problem can certainly be solved.
>
>--
>Florian Weimer                   Florian.Weimer@RUS.Uni-Stuttgart.DE University of Stuttgart           http://cert.uni-stuttgart.de/ RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898


1 2 3
Next ›   Last »