Re: [Pharo-dev] Question about closure compilation

2013-06-29 Thread Sven Van Caekenberghe
Hi Marcus, On 29 Jun 2013, at 11:12, Marcus Denker marcus.den...@inria.fr wrote: OK, that seems OK. The reason I was asking was because I wanted to know if this JavaScript bug would hit us as well: http://point.davidglasser.net/2013/06/27/surprising-javascript-memory-leak.html It

Re: [Pharo-dev] Question about closure compilation

2013-06-29 Thread Norbert Hartl
Am 29.06.2013 um 11:12 schrieb Marcus Denker marcus.den...@inria.fr: OK, that seems OK. The reason I was asking was because I wanted to know if this JavaScript bug would hit us as well: http://point.davidglasser.net/2013/06/27/surprising-javascript-memory-leak.html It is slightly

Re: [Pharo-dev] Question about closure compilation

2013-06-29 Thread Marcus Denker
On Jun 29, 2013, at 11:47 AM, Norbert Hartl norb...@hartl.name wrote: Thanks. So please let us separate problems. In the example from Sven there are two problems: - increase of memory per function invocation. That problem we don't have Yes, you are right. I am not really knowledgeable

[Pharo-dev] Question about closure compilation

2013-06-28 Thread Sven Van Caekenberghe
Hi, Does the closure returned from | foo | foo := #( data 1 2 3 ). [ :x | x + 1 ] close over foo ? Since foo is not used, it should not, right ? But it seems that the outer context of the block closure knows about foo, although the value seems nil. And if it closes over foo, foo's

Re: [Pharo-dev] Question about closure compilation

2013-06-28 Thread Marcus Denker
On Jun 28, 2013, at 9:26 PM, Sven Van Caekenberghe s...@stfx.eu wrote: Hi, Does the closure returned from | foo | foo := #( data 1 2 3 ). [ :x | x + 1 ] close over foo ? No. Since foo is not used, it should not, right ? right. if we get the AST of your method ast := (TT#tt)

Re: [Pharo-dev] Question about closure compilation

2013-06-28 Thread Sven Van Caekenberghe
On 28 Jun 2013, at 22:42, Marcus Denker marcus.den...@inria.fr wrote: On Jun 28, 2013, at 9:26 PM, Sven Van Caekenberghe s...@stfx.eu wrote: Hi, Does the closure returned from | foo | foo := #( data 1 2 3 ). [ :x | x + 1 ] close over foo ? No. Since foo is not used, it