"Blady" <
p....@orange.fr> wrote in message
news:unucno$89u$1...@dont-email.me...
For a limited with, one only knows the syntactic declarations (we cannot
assume any analysis). Therefore, we cannot know the representation of any
type, including access types.
Specifically, compilers may support multiple representations for access
types, for a variety of reasons (the underlying machine has different
representations, as on the 8086 and U2200 that we did compilers for; because
additional data needs to be carried along to implement Ada semantics - GNAT
did that for access to unconstrained arrays, and so on). The representation
can depend upon aspect specifications, the designated subtype, and more,
none of which is known at the point of a limited with.
We couldn't restrict implementations to a single representation for access
types, and thus limited with has to treat them the same as other types.
It's necessary to declare local access types for entities that are accessed
from a limited view. The reason that anonymous access types were expanded
was to make that less clunky -- but I don't think it succeeded.
...
> Well, I could make some code transferts from unit to another or access
> conversions, that's I actually do but at heavy cost.
Yup, but the alternative is worse - requiring all access types to be the
most general representation (which can have a heavy performance cost).
Randy.