comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Garlington <73672.2025@COMPUSERVE.COM>
Subject: Re: Static in 9X
Date: Thu, 15 Sep 1994 23:03:24 EDT
Date: 1994-09-15T23:03:24-04:00	[thread overview]
Message-ID: <940916030323_73672.2025_DHR67-3@CompuServe.COM> (raw)

Robert Dewar <dewar@CS.NYU.EDU> writes on Thu, 15 Sep 1994 09:37:32:

<< I don't see that an Ada vendor is particularly in the business of
interpreting language rules like this >>

Our vendor decides whether or not to put objects in ROM via the definition of
static (in part). We're trying to get better performance in this area for
composite objects.

<< What would be useful is for you to explain why you thought that the
other cases were possibly covered >>

Good question. I don't have the standard in front of me, so I'll have to rely
on memory for some things. I think it says that a name which denotes a scalar
object of a static type with a static value is static. What if the scalar is a
record component?

The discussion on static functions describes predefined functions which have
static arguments. I thought maybe an instantiation of UNCHECKED_CONVERSION
could possibly fit that definition, since UNCHECKED_CONVERSION is predefined.

Most of it was just wishful thinking; that I might not have read something
completely. Records such as:

     type MY_TYPE is record
        X : INTEGER;
        Y : INTEGER;
     end record;

     MY : constant MY_TYPE := (1,2);

just seem so obviously static, in the general (non-Ada) sense of the term, that
I thought there had to be something I'm missing. Similarly, when I look at a
function like

    function ADD ( VALUE : INTEGER ) return INTEGER is
    begin
       return VALUE + 1;
    end;

    V : constant INTEGER := ADD(0);

it seems like ADD(0) should be a static expression. I understand that "static"
in the Ada sense probably wasn't meant to be related to ROMability, but that's
where we are with the vendor at the moment.

The question about type conversions is a little different. The vendor says that
a type conversion that requires manipulation of the data representation can't
be put in ROM. However, 9X seemed to me to define this as static in some cases.
I just wanted to make sure I read it right.



             reply	other threads:[~1994-09-16  3:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-16  3:03 Ken Garlington [this message]
1994-09-17  3:13 ` Static in 9X Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1994-09-19 23:40 Ken Garlington
     [not found] <940914130023_73672.2025_DHR31-2@compuserve.com>
1994-09-15 15:05 ` Tucker Taft
1994-09-16 10:26   ` Tucker Taft
1994-09-14 13:00 Ken Garlington
1994-09-15 13:37 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox