Re: [pypy-dev] Compat. in 1.4.1 __del__

2011-02-08 Thread Christian Tismer
On 2/8/11 9:25 PM, Philip Jenvey wrote:
 On Feb 5, 2011, at 9:04 PM, Dino Viehland wrote:

 Christianwrote:
 Howdy,

 studying the differences of PyPy vs. CPython, most seem to be fine; one
 thing where I an unsure is the __del__ behavior.

 I am not addressing its delayed call or the number it is called, this is 
 similar to
 Jython and IronPython.

 But assigning to __del__ after a class is created, is that so hard to 
 implement?
 IronPython also doesn't handle assigning to __del__ after the class is 
 created, and
 I'd be surprised if Jython did as well.  To make this work we'd need to 
 maintain a
 weak reference for every object of a user defined type and I think most users
 would rather not pay that expense for such a corner case.  I've also never 
 actually
 heard of this breaking compatibility anywhere.
 Jython doesn't either. We've been meaning to add the same warning PyPy does 
 when you create a __del__ after the fact.

 The feature is simply not worth the effort.

 --
 Philip Jenvey

Fine with me!
I just wanted to know the reasons why this is more
problematic than I thought. Thanks to all who replied.

cheers - chris

-- 
Christian Tismer :^)mailto:tis...@stackless.com
tismerysoft GmbH : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A :*Starship* http://starship.python.net/
14109 Berlin : PGP key -  http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04   9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
   whom do you want to sponsor today?   http://www.stackless.com/

___
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev


Re: [pypy-dev] [pypy-svn] pypy jit-virtual_state: never retrace a loop more than 5 times

2011-02-08 Thread Maciej Fijalkowski
On Tue, Feb 8, 2011 at 8:42 PM, hakanardo commits-nore...@bitbucket.org wrote:
 Author: Hakan Ardo ha...@debian.org
 Branch: jit-virtual_state
 Changeset: r41714:91586ef4b9c5
 Date: 2011-02-08 19:42 +0100
 http://bitbucket.org/pypy/pypy/changeset/91586ef4b9c5/

 Log:    never retrace a loop more than 5 times

Is this always a good idea? Maybe we should have a configurable
parameter for that (like threshold).


 diff --git a/pypy/jit/metainterp/optimizeopt/unroll.py 
 b/pypy/jit/metainterp/optimizeopt/unroll.py
 --- a/pypy/jit/metainterp/optimizeopt/unroll.py
 +++ b/pypy/jit/metainterp/optimizeopt/unroll.py
 @@ -671,7 +671,10 @@
                                         jumping to preamble instead)
                             self.emit_operation(op)
                         return
 -                if not self.retraced:
 +                retraced_count = len(short)
 +                if descr.failed_states:
 +                    retraced_count += len(descr.failed_states)
 +                if not self.retraced and retraced_count5:
                     if not descr.failed_states:
                         raise RetraceLoop
                     for failed in descr.failed_states:
 ___
 pypy-svn mailing list
 pypy-...@codespeak.net
 http://codespeak.net/mailman/listinfo/pypy-svn

___
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev