From: Jocelyn <li...@dj...> - 2008-02-11 17:27:52
|
I first did that, adding a field {GEANT_TARGET}.locals: GEANT_VARIABLES but this doesn't work, since GEANT_TARGET holds static data, when we need execution data. I mean, if you call recursively the same target, then you'll have the locals messed up, since you share the same list of locals for the 2 executions of the same target. Do you see what I mean ? for instance <target name="loc"> <argument name="arg" /> <local name="foo" /> <set name="foo" value="$arg$arg" /> <echo message="1) foo=$foo" /> <geant name="loc" arguments="$foo" unless="$arg=aaaa" <echo message="2) foo=$foo" /> </target> doing the solution with locals attached to the instance of GEANT_TARGET, you would get as output for: <geant target="loc" arguments="a" /> 1) foo=aa 1) foo=aaaa 2) foo=aaaa 2) foo=aaaa when you expect 1) foo=aa 1) foo=aaaa 2) foo=aaaa 2) foo=aa In fact, what would be nicer is to have a GEANT_TARGET_STACK .. which would hold the arguments, and locals stacks. -- Jocelyn. On 2/11/2008 18:11 PM, Sven Ehrke wrote: > Jocelyn wrote: > >> I would say avoid to have zillions of fake targets >> > > OK, I understand now. Thanks for the explanation. > > >> I hope my commit is still welcome. >> > > Yes, very welcome. I am just checking out the diff. I am not > finished yet but one thing which I thought could be done > is to attach the local variables directly to it's target instead > of having to maintain two stacks (one for the targets and the other > one for the locals). Then only the target stack would be needed. > What do you think? > > - Sven > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > gobo-eiffel-develop mailing list > gob...@li... > https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop > > > |