Subject: Re: (Fwd) question on symbol table definition

From: Zheng Gengbing <[email-masked]>
Date: Thu, 13 Jun 1996 16:45:10 +0800 (EAT)

On Mon, 10 Jun 1996, Guansong Zhang wrote:

> Why no one give me some help on this?
> 
> --- Forwarded mail from <[email-masked]> ("Guansong Zhang")
> 
> From: "Guansong Zhang" <[email-masked]>
> Date: Sun, 9 Jun 1996 11:56:14 -0400
> To: [email-masked], [email-masked], [email-masked],
>  [email-masked], [email-masked], [email-masked],
>  [email-masked], [email-masked], [email-masked]
> Subject: question on symbol table definition
> 
> I am puzzled by the definition of symbol table in our project, who can give me
> a specification, even not a complete one?
> 
> For example, I don't understand things listed as below, given the following
> program as an example:
> 
> ++++++++++++++++++++++++++++++++++++++
>       program test
>       real x,y
>       x = 3.14
>       call sub1(x)
>       y = x*2
>       stop
>       contains
>         subroutine sub1(x)
>         real x
>         x = 1.0
>         return
>         end subroutine sub1
>       end
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> 1, If you process this example on 1.57, you will find an entry as PROG_NAME,
> what is the relation between this and test (also an entry in the symbol table)?

	Although , PROG_NAME is unpleasant , it won't effect our work . 
I will adjust it when I have time.

> 
> 2, the attr field is either 0 or as big as 536870912 on my machine. I think
> this is 32-bit number (or 16?), so Gu Zhaojun, could you please print this
> number in Hex with fixed width? It will be more clear to the reader.
> 
> Clear or not, I don't understand the meaning of this field, who can give me
> some idea?
> 

	Please refer to the defintion in defnodes.h :
	#define NOSEQUENCE_BIT     536870912

	That's it.

> 3, sub1 present two times in the ST, one as LOCAL one as PROCEDURE_NAME, what
> does this mean? and especially, what LOCAL mean?
> 

	Again one of this PROCEDURE_NAME is useless . hpfsc pick up the right
one .

	When sub1 first encountered in program test , hpf2dep make a symbol
entry , while in subroutine sub1 , hpf2dep also make a symbol entry. That's
why it presented twice .

> 4, If an entry is a VARIABLE_NAME, it will print out things like "local=????".
> What doest this feild mean? To this program I have:
> 
> x local= 600
> y local= 600
> 
> and
> 
> x local= 603
> 
> What do these mean?
>

	check tags.h , you will get the answer .

> Waiting for your reply.
> 
> 
> Guansong
> 
> 
> ---End of forwarded mail from <[email-masked]> ("Guansong Zhang")
> 
> --- Forwarded mail from <[email-masked]> ("Guansong Zhang")
> 
> From: "Guansong Zhang" <[email-masked]>
> Date: Sun, 9 Jun 1996 12:01:21 -0400
> To: [email-masked], [email-masked], [email-masked],
>  [email-masked], [email-masked], [email-masked],
>  [email-masked], [email-masked], [email-masked]
> Subject: attr bit
> 
> I think the following thing in dumpdep result explain the old attribute value.
> We need a new one once we change the orginal meaning. So who ever def the
> attribute bit, give that information to Gu Zhaojun please, so he can give out
> our own explaination in dumpdep file.
> 
> bits set:
> 
> 0 syn/protected,  1 shared/public,  2 private,  3 future,  4 virtual, 5 inline,
>  6 unsigned,  7 signed,  8 short,  9 long,  10 volatile, 11 const,  12 typedef,
>  13 extern,  14 friend,  15 static,  16 register, 17 auto,  18 global,  19
> Sync,  20 atomic,  21 __private, 22 restrict
> 
> 
> Guansong
> 
> 
> ---End of forwarded mail from <[email-masked]> ("Guansong Zhang")
> 

***************************************************************************
*     Zheng Gengbin                 *                                     *
*                                   *                                     *
*  Dept. of Computer Science        *  Phone:  86-10-2585088              *
*         & Technology              *  Email:                             *
*                                   *      [email-masked]   *
*  Peking University P.R.China      *  Mail:                              *
*                                   *      Room 1077 ,Building 47,        *
*                                   *      Peking University, P.R.China   *
***************************************************************************