Subject: Re: New problem: module

From: Zheng Gengbing <[email-masked]>
Date: Fri, 19 Apr 1996 11:18:36 +0800 (EAT)

On Thu, 18 Apr 1996, Guansong Zhang wrote:

> Hi,
> 
> We meet a new problem when putting our frontend to real world program --
> modules.
> 
> Most f90 compiler will allow modules defind seperately from the main file, and
> some how include them in when compiling the main program. (I will ask some one
> to see how other compiler do it tommorow.)
> 
> In the following, I will describe possible designs for implementing this.
> 
> The simplest way will be catting all the related files together, then parse. We
> have to admit that our frontend do not support multi files.
> 
> A little superb way will be allowing hpf2dep have more arguments in command
> line, so it can take more files in.
> 
> In this way, we still have two choice to do the work.
> 
> One is to generate a single large .dep file (.dep file for modules may already
> exist, so this is different from the cat method.)
> 
> Another is to generate seperate .dep files for different sourse files without
> overlap. (The proj_obj defined in our internal representation support multi-
> files.)
> 
> In the first choice, we have to deal with id numbers (they have to be numbered
> uninamously in the final .dep file.), while in the second method, we have to
> deal with link feild which points to other files.
> 
> I hope to know your idea about this feature. And how much effort we may take to
> support it. (To deal with real world program is really something we can show
> off in the demo.)
> 

	I am not familar about how sage deal this problem . I think 
your second method is better .  
	We need add a part compile option (like -c in cc ) to produce 
.dep . When link (no -c presents) , we will have a global check , include
symbol , procedure declaration and module declaration , if it passed then
produced a  .proj . This file merge all .dep files .

	That is only my opinion , we will discuss this problem later .

***************************************************************************
*     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   *
***************************************************************************