Version 1.2 of acs/ac-00159.txt

Unformatted version of acs/ac-00159.txt version 1.2
Other versions for file acs/ac-00159.txt

!standard 4.1.3(4)          08-03-05 AC95-00159/01
!class Amendment 08-03-05
!status received no action 08-03-05
!status received 08-01-29
!subject An expanded name in a protected body is an internal call
!summary
!appendix

From: Jean-Pierre Rosen
Date: Tuesday, January 29, 2008  7:20 AM

In the following:
    protected P is
       procedure P1;
       procedure P2;
    end Pt2;

    protected body P is
       procedure P1 is
       begin
          P.P2;
       end P1;
       procedure P2 is
       begin
          null;
       end P2;
    end P;

Is P.P2 an expanded name? Intuitively, it seems to designate component
P2 of object P (therefore not an expanded name), but according to
4.1.3(4), P can be interpreted as an "enclosing named construct".

The distinction is important, because if it is an expanded name, then
the call is an internal call, otherwise it is an external call (to the
same protected object, thus a potentially blocking operation - which is
what I am interested in).

****************************************************************

From: Tucker Taft
Date: Wednesday, January 30, 2008  12:27 PM

> Is P.P2 an expanded name? Intuitively, it seems to designate component
> P2 of object P (therefore not an expanded name), but according to
> 4.1.3(4), P can be interpreted as an "enclosing named construct".

It is an expanded name, since at least one interpretation
of P is as the name of an enclosing construct.

>
> The distinction is important, because if it is an expanded name, then
> the call is an internal call, otherwise it is an external call (to the
> same protected object, thus a potentially blocking operation - which is
> what I am interested in).

This is definitely an internal call.

****************************************************************

From: Jean-Pierre Rosen
Date: Thursday, January 31, 2008  3:46 AM

> This is definitely an internal call.
>
Therefore, the call to P1.Proc2 from P2.Proc below is also an internal
call. That would make an interesting C test...

    protected P1 is
       procedure Proc1;
       procedure Proc2;
    end P1;

    protected body P1 is
       procedure Proc1 is
          protected P2 is
             procedure Proc;
          end P2;

          protected body P2 is
             procedure Proc is
             begin
                P1.Proc2;
             end;
          end P2;
       begin
          P2.Proc;
       end;

       procedure Proc2 is
       begin
          null;
       end;
    end P1;

****************************************************************

From: Tucker Taft
Date: Saturday, February 2, 2008 12:55 PM

Yes, you can make an "internal call" from
a highly nested context, and it should not
involve another lock acquisition.

****************************************************************


Questions? Ask the ACAA Technical Agent