Subject: Re: R&W function

From: Zheng Gengbing <[email-masked]>
Date: Fri, 12 Apr 1996 10:51:01 +0800 (EAT)

On Thu, 11 Apr 1996, Guansong Zhang wrote:

> On Apr 11, 12:10pm, Zheng Gengbing wrote:
> > Subject: Re: R&W function
> >
> > 	It is natrual to expand the information stored in .dep after we add new
> > difintion in node .
> > 	give this example about VARIABLE_NAME:
> > 9-S  503    2-T 131072   ----    2-B            zx1 local= 600 nxt_in=
> > ---- nxt_out=  ----     VARIABLE_NAME
> >
> > 	The only thing diffrent from old one is the attr field from 0 to
> > 131072 .131072 is the attributes of DITRIBUTE_BIT . That's the result of our
> > modification in fD.y , where we add the attribute to symbol nodes .
> >
> 
> Here is a problem, remember my way of experience, I use read&write in 1.25 to
> substitue the one in 1.20. I don't do any thing else. In fact, at this point,
> pku's work is not included.
> 
> Why results reflect pku's changing in fD.y???
>
> Something you must be omitted.
>

	Ok , I mean that is the compare result in 1.27. 

> >
> > 	other example about PROGRAM_NAME :
> > 2-S  505   ----    0   ----    1-B   directive_11 symb_lst=         ---- prog
> > _hedr=    2-B      PROGRAM_NAME
> >
> > 	As to PROGRAM_NAME , I don't know who add 2-B to prog_hedr . We did
> > not change that .
> >
> 
> Please check in def by beida (both of you two), how PROGRAM_NAME is defined. I
> have to admit, I knew little about how to find the definition in that document.
> 
> And again my question to Zheng Gengbin is: Why the r&w can have affects on
> nodes definition? Do you ommit something when you make change on this two file?
> 

> Since same result is also reflect by your machine, I don't think it is a
> portibility problem.
> 

      I don't know how you produce the  *.rec . In fact when compared directly
between the outcome of 1.20 & 1.27 , the examples of PROGRAM_NAME , PROC_HEDR 
I mention before are not exists .. 

	The following may explain your problem !!!

      I have carefully checked the writenodes.c .
compare your two versions of readnodes.c , you will find in line 646 : in  
the version 2.0  , there must be a line like:
                                                   ^^^^   
	symb_ptr->entry.prog_decl.prog_hedr = NULL_CHECK(head_symb,tmp[1]);

which is not present in 2.7 . This is a newly added statement .That's why  
the 'prog_hedr--- 2-B' appeared in the result of dumpdep in PROGRAM_NAME . 

	But since this is not matter very much , I will add this line in our 
version . 

	Another problem about VARIABLE_NAME :
please open the file writenodes.c of 1.20 , see line 384 :
	sym.attr    = (u_short) sy_ptr->attr;
                      ^^^^^^^^
and open filr readnodes.c of 1.20 , see  line 602 :
	symb_ptr->attr      = (int) sym.attr;
                              ^^^^
 the data type is not matched . This cause the trouble . Since the 131072 
is beyond u_short , it did not write .dep properly . HIT must modify this !

> I hope PKU to check this problem immediately please, this is really top
> priority, it already affects our process of merging two version.
> 

	You can get a new 1.27 right now .

Zheng Gengbin