From: jfj (John Fountain, Jr.)
Subject: Re: Ada for C30
Date: Tue, 28 Feb 95 04:19:41 GMT
Date: 1995-02-28T04:19:41+00:00 [thread overview]
Message-ID: <3iu8h1$nck@bighorn.accessnv.com> (raw)
In-Reply-To: 1995Feb26.083812.9229@eisner
kilgallen@eisner.decus.org (Larry Kilgallen, LJK Software) wrote:
>In article <3io711$hs5@bighorn.accessnv.com>, jfj (John Fountain, Jr.) writes:
>
>> writing phase at all. This should prove to be interesting.
>> Overall, my intuition tells me if I could do it in C I can
>> do it in Tartan Ada with a little careful construction.
This is a refernce to CODE GENERATION AND OPTIMIZATION.
>> Probably the biggest hurdle is that C's memory allocation
>> are very easy to predict, while in Ada we are not always
>> sure of what the compiler will construct and where things
>> will be allocated from.
THIS IS A REFERENCE TO STACK USAGE.
>
>There have always been problems with people writing a Fortran
>program in some other language, such that no matter what language
>they use it comes out looking like Fortran.
Pretty rude. Where is the reference to FORTRAN? I like it. Used it
for years. Beats Pabst Blue Ribbon.
>
>If you need to know how C or Ada is going to allocate the memory,
>and depend on undocumented (and therefore non-guaranteed) compiler
>behavior, you may be in for a rude awakening with the next version
>of any language compiler from any vendor.
YES. I NEED TO KNOW. I ALWAYS WANT TO KNOW.
I am new to Ada. I do not know if the LRM states that static objects
(static is a C'ism for never moves) in the declarative section of a
package, will be allocated off the stack when the package is
elaborated at run time.
This is what Tartan does. Being caught off guard by this, I was just
stating that I needed to be CAREFUL as to where I assume objects
will be allocated from...
>
>If you require a particular memory layout, you should depend on
>documented features of the language. In Ada the Representation
>Clauses are the major mechanism for accomplishing this. In some
>cases Address Clauses may also be relevant.
I am well aware of the FOR USE AT clause. This is very useful for
those objects like UARTS, but I think it would be un-Ada to use
this to overcome stack allocations.
>
>Whatever your language, you should rely on documented (and therefore
>guaranteed) compiler features to produce particular memory usage.
I always strive to use every undocumented feature of every OS and
language I come by, as evidenced by my posting. In fact, I have
written a letter to Mr. Bill Gates stating that I would be the premier
Windows programmer since I am so good at doing this. (Novell
has made an offer but they don't do it like Windoze does.)
>
>Larry Kilgallen
>whose representation clauses
>"just worked" when DEC released Alpha AXP :-)
Nice machine. Try it on a DSP with local/global/cache that change
size from board to board and change wait state just to aggravate you.
pleasently insulted,
John Fountain, Jr.
jfj@accessnv.com
*************************************************************************
This is just filler. I hope you don't bother reading it.
**************************************************************************
next prev parent reply other threads:[~1995-02-28 4:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-23 20:10 Ada for C30 John L. Kollig
1995-02-24 13:33 ` Gentle
1995-02-24 17:46 ` Garlington KE
1995-02-25 21:17 ` jfj
1995-02-25 23:04 ` Michael Hirasuna
1995-02-26 13:38 ` Larry Kilgallen, LJK Software
1995-02-28 4:19 ` jfj [this message]
1995-02-28 0:02 ` Bill Priest
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox