This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Mutual require bug when compiling?
- From: Per Bothner <per at bothner dot com>
- To: alex mitchell <alexm at nus dot edu dot sg>
- Cc: "kawa at sources dot redhat dot com" <kawa at sources dot redhat dot com>
- Date: Fri, 07 Aug 2009 23:30:26 -0700
- Subject: Re: Mutual require bug when compiling?
- References: <C6A1A4B0.1C898%alexm@nus.edu.sg>
On 08/06/2009 06:30 PM, alex mitchell wrote:
Following up on the earlier duplicate require problems that we were
encountering, we¹ve come across what seems to be a problem with mutual
requires when compiling, which may be related.
I just checked in a patch which might help.
A 'require' at run-time becomes a "find the class"
followed by "run its body". In the case of a cycle
we would end up doing these (i.e. run the body of the
imported module) at the end of the (importing) module.
Which means some initialization didn't happen until too late.
The patch I just checked in makes sure the "run" happens
in teh same place as the "require", so things should be
more as expected.
--
--Per Bothner
per@bothner.com http://per.bothner.com/