comp.lang.ada
 help / color / mirror / Atom feed
From: Serge Robyns <serge.robyns@gmail.com>
Subject: Re: I'm facing an issue with: call to abstract procedure must be dispatching
Date: Thu, 10 Dec 2015 00:38:28 -0800 (PST)
Date: 2015-12-10T00:38:28-08:00	[thread overview]
Message-ID: <c7533283-04c4-49f6-abe8-4f47d70b86df@googlegroups.com> (raw)
In-Reply-To: <n4abvh$q8e$1@loke.gir.dk>

On Thursday, 10 December 2015 00:03:15 UTC+1, Randy Brukardt  wrote:

> On top of which, it tends to limit how the client can use your package. In 
> particular, the client most likely couldn't put values of your object type 
> into a container, because Ada puts very strict limits on getting an access 
> value into a container. (Additionally, because of the extra runtime 
> accessibility checking, the access version is slower. That effect is small 
> enough that it shouldn't be a major determining factor in deciding which to 
> use, but if all other things are equal, why would anyone want to use the 
> slower version??)
> 
>                                          Randy.

This is an interesting topic.  I've always been wondering when the compiler is generating checks and when it does know he can skip them.  And what kind of test is the compiler doing on an access value.  Especially coming from the C world this is very "counter intuitive" :-P.

If the variable is as following:
  A_Reference : access not null T_something;  -- whereas T_Something is just a plain record type, i.e. not a tagged one.
and the procedure signature
  procedure Do_Something (Reference : not null access T_Something; ....);
What would happen with:
  Do_Something (A_Reference, ...);

My assumption is that the not null checks can be skipped during the call and inside the procedure.  What other checks are performed inside Do_Something for A_Reference?

Regards,
Serge

  reply	other threads:[~2015-12-10  8:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 16:45 I'm facing an issue with: call to abstract procedure must be dispatching Serge Robyns
2015-12-08 16:59 ` G.B.
2015-12-08 17:04 ` Dmitry A. Kazakov
2015-12-08 17:24   ` Serge Robyns
2015-12-08 17:42     ` Dmitry A. Kazakov
2015-12-08 18:00       ` Serge Robyns
2015-12-08 18:22         ` Dmitry A. Kazakov
2015-12-08 20:21           ` Serge Robyns
2015-12-08 21:08             ` Dmitry A. Kazakov
2015-12-08 21:55               ` Serge Robyns
2015-12-08 22:43                 ` Serge Robyns
2015-12-08 22:55                   ` Jeffrey R. Carter
2015-12-09 23:03                     ` Randy Brukardt
2015-12-10  8:38                       ` Serge Robyns [this message]
2015-12-10 23:43                         ` Randy Brukardt
2015-12-09  8:48                 ` Dmitry A. Kazakov
2015-12-09 10:53               ` G.B.
2015-12-09 12:03                 ` Dmitry A. Kazakov
2015-12-09 13:42                   ` G.B.
2015-12-09 14:23                     ` Dmitry A. Kazakov
2015-12-08 22:55             ` Jeffrey R. Carter
2015-12-08 23:04               ` Serge Robyns
2015-12-08 23:42                 ` Jeffrey R. Carter
2015-12-09 13:40                 ` Jere
2015-12-09 13:48                   ` G.B.
2015-12-09 15:33                     ` Jere
2015-12-13 21:37                 ` Shark8
2015-12-14  2:20                   ` Jeffrey R. Carter
2015-12-15  7:26                     ` Shark8
2015-12-08 17:30 ` Jeffrey R. Carter
2015-12-08 17:48   ` Serge Robyns
2015-12-08 18:46     ` Jeffrey R. Carter
2015-12-08 20:28       ` Serge Robyns
2015-12-08 22:20     ` Simon Wright
replies disabled

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