[pypy-svn] pypy jit-virtual_state: hg merge default

hakanardo commits-noreply at bitbucket.org
Tue Feb 15 20:37:45 CET 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-virtual_state
Changeset: r41995:d262c528bcd2
Date: 2011-02-14 21:02 +0100
http://bitbucket.org/pypy/pypy/changeset/d262c528bcd2/

Log:	hg merge default

diff --git a/pypy/module/readline/c_readline.py b/pypy/module/readline/c_readline.py
deleted file mode 100644
--- a/pypy/module/readline/c_readline.py
+++ /dev/null
@@ -1,77 +0,0 @@
-from pypy.rpython.tool import rffi_platform as platform
-from pypy.rpython.lltypesystem import lltype, rffi
-from pypy.interpreter.error import OperationError
-from pypy.interpreter.gateway import ObjSpace, interp2app
-from pypy.translator.tool.cbuild import ExternalCompilationInfo
-
-# On various platforms, linking only with libreadline is not enough;
-# we also need to link with some variant of curses or libtermcap.
-# We follow the logic of CPython below.
-def try_with_lib(extralibs, **kwds):
-    global most_recent_error
-    # at least on Gentoo Linux, readline.h doesn't compile if stdio.h is not
-    # included before
-    eci = ExternalCompilationInfo(
-        includes = ["stdio.h", "readline/readline.h", "readline/history.h"],
-        libraries = extralibs + ['readline'],
-        )
-    try:
-        platform.verify_eci(eci)
-        return eci
-    except platform.CompilationError, e:
-        most_recent_error = e
-        return None
-
-eci = (try_with_lib([]) or
-       try_with_lib(['ncursesw']) or
-       try_with_lib(['ncurses']) or
-       try_with_lib(['curses']) or
-       try_with_lib(['termcap'], library_dirs=['/usr/lib/termcap']))
-if eci is None:
-    raise most_recent_error
-
-# ____________________________________________________________
-
-def external(name, args, result):
-    return rffi.llexternal(name, args, result, compilation_info=eci)
-
-# get a binding to  c library functions and define their args and return types
-# char *readline(char *)
-c_readline = external('readline', [rffi.CCHARP], rffi.CCHARP)
-
-# void rl_initiliaze(void)
-c_rl_initialize = external('rl_initialize', [], lltype.Void)
-
-# void using_history(void)
-c_using_history = external('using_history', [], lltype.Void)
-
-# void add_history(const char *)
-c_add_history = external('add_history', [rffi.CCHARP], lltype.Void)
-
-#------------------------------------------------------------
-# special initialization of readline 
-
-class ReadlineState(object):
-    lastline = ""        # XXX possibly temporary hack
-readlinestate = ReadlineState()
-
-def setup_readline(space, w_module):
-    c_using_history()
-    # XXX CPython initializes more stuff here
-    c_rl_initialize()
-    # install sys.__raw_input__, a hook that will be used by raw_input()
-    space.setitem(space.sys.w_dict, space.wrap('__raw_input__'),
-                  space.wrap(app_readline_func))
-
-def readline_func(space, prompt):
-    ll_res = c_readline(prompt)
-    if not ll_res:
-        raise OperationError(space.w_EOFError, space.w_None)
-    res = rffi.charp2str(ll_res)
-    if res and res != readlinestate.lastline:
-        readlinestate.lastline = res
-        c_add_history(res)
-    return space.wrap(res)
-
-readline_func.unwrap_spec = [ObjSpace, str]
-app_readline_func = interp2app(readline_func)

diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -15,7 +15,7 @@
 from pypy.jit.metainterp.typesystem import llhelper, oohelper
 from pypy.jit.metainterp.optimizeutil import InvalidLoop
 from pypy.jit.metainterp.resume import NUMBERING
-from pypy.jit.codewriter import heaptracker
+from pypy.jit.codewriter import heaptracker, longlong
 
 def giveup():
     from pypy.jit.metainterp.pyjitpl import SwitchToBlackhole
@@ -528,7 +528,7 @@
 class ResumeGuardCountersFloat(AbstractResumeGuardCounters):
     def __init__(self):
         self.counters = [0] * 5
-        self.values = [0.0] * 5
+        self.values = [longlong.ZEROF] * 5
     see_float = func_with_new_name(_see, 'see_float')
 
 

diff --git a/pypy/module/readline/app_stub.py b/pypy/module/readline/app_stub.py
deleted file mode 100644
--- a/pypy/module/readline/app_stub.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# NOT_RPYTHON
-
-def stub(*args, **kwds):
-    import warnings
-    warnings.warn("the 'readline' module is only a stub so far")
-
-def stub_str(*args, **kwds):
-    stub()
-    return ''
-
-def stub_int(*args, **kwds):
-    stub()
-    return 0

diff --git a/pypy/jit/metainterp/history.py b/pypy/jit/metainterp/history.py
--- a/pypy/jit/metainterp/history.py
+++ b/pypy/jit/metainterp/history.py
@@ -3,12 +3,12 @@
 from pypy.rpython.lltypesystem import lltype, llmemory, rffi
 from pypy.rpython.ootypesystem import ootype
 from pypy.rlib.objectmodel import we_are_translated, r_dict, Symbolic
-from pypy.rlib.objectmodel import compute_hash, compute_unique_id
+from pypy.rlib.objectmodel import compute_unique_id
 from pypy.rlib.rarithmetic import intmask, r_int64
 from pypy.conftest import option
 
 from pypy.jit.metainterp.resoperation import ResOperation, rop
-from pypy.jit.codewriter import heaptracker
+from pypy.jit.codewriter import heaptracker, longlong
 
 # ____________________________________________________________
 
@@ -82,8 +82,15 @@
     def getint(self):
         raise NotImplementedError
 
+    def getfloatstorage(self):
+        raise NotImplementedError
+
     def getfloat(self):
-        raise NotImplementedError
+        return longlong.getrealfloat(self.getfloatstorage())
+
+    def getlonglong(self):
+        assert longlong.supports_longlong
+        return self.getfloatstorage()
 
     def getref_base(self):
         raise NotImplementedError
@@ -137,6 +144,7 @@
     def get_return_type(self):
         """ Implement in call descr.
         Must return INT, REF, FLOAT, or 'v' for void.
+        On 32-bit (hack) it can also be 'L' for longlongs.
         """
         raise NotImplementedError
 
@@ -218,7 +226,7 @@
         elif kind == "ref":
             return cpu.ts.new_ConstRef(x)
         elif kind == "float":
-            return ConstFloat(x)
+            return ConstFloat(longlong.getfloatstorage(x))
         else:
             raise NotImplementedError(kind)
 
@@ -301,26 +309,26 @@
 
 class ConstFloat(Const):
     type = FLOAT
-    value = 0.0
+    value = longlong.ZEROF
     _attrs_ = ('value',)
 
-    def __init__(self, floatval):
-        assert isinstance(floatval, float)
-        self.value = floatval
+    def __init__(self, valuestorage):
+        assert lltype.typeOf(valuestorage) is longlong.FLOATSTORAGE
+        self.value = valuestorage
 
     def clonebox(self):
         return BoxFloat(self.value)
 
     nonconstbox = clonebox
 
-    def getfloat(self):
+    def getfloatstorage(self):
         return self.value
 
     def _get_hash_(self):
-        return compute_hash(self.value)
+        return longlong.gethash(self.value)
 
     def set_future_value(self, cpu, j):
-        cpu.set_future_value_float(j, self.getfloat())
+        cpu.set_future_value_float(j, self.value)
 
     def same_constant(self, other):
         if isinstance(other, ConstFloat):
@@ -328,15 +336,15 @@
         return False
 
     def nonnull(self):
-        return self.value != 0.0
+        return self.value != longlong.ZEROF
 
     def _getrepr_(self):
-        return self.value
+        return self.getfloat()
 
     def repr_rpython(self):
         return repr_rpython(self, 'cf')
 
-CONST_FZERO = ConstFloat(0.0)
+CONST_FZERO = ConstFloat(longlong.ZEROF)
 
 class ConstPtr(Const):
     type = REF
@@ -466,7 +474,7 @@
             ptrval = lltype.cast_opaque_ptr(llmemory.GCREF, x)
             return BoxPtr(ptrval)
         elif kind == "float":
-            return BoxFloat(x)
+            return BoxFloat(longlong.getfloatstorage(x))
         else:
             raise NotImplementedError(kind)
 
@@ -546,12 +554,12 @@
     type = FLOAT
     _attrs_ = ('value',)
 
-    def __init__(self, floatval=0.0):
-        assert isinstance(floatval, float)
-        self.value = floatval
+    def __init__(self, valuestorage=longlong.ZEROF):
+        assert lltype.typeOf(valuestorage) is longlong.FLOATSTORAGE
+        self.value = valuestorage
 
     def forget_value(self):
-        self.value = 0.0
+        self.value = longlong.ZEROF
 
     def clonebox(self):
         return BoxFloat(self.value)
@@ -559,20 +567,20 @@
     def constbox(self):
         return ConstFloat(self.value)
 
-    def getfloat(self):
+    def getfloatstorage(self):
         return self.value
 
     def _get_hash_(self):
-        return compute_hash(self.value)
+        return longlong.gethash(self.value)
 
     def set_future_value(self, cpu, j):
         cpu.set_future_value_float(j, self.value)
 
     def nonnull(self):
-        return self.value != 0.0
+        return self.value != longlong.ZEROF
 
     def _getrepr_(self):
-        return self.value
+        return self.getfloat()
 
     def repr_rpython(self):
         return repr_rpython(self, 'bf')

diff --git a/pypy/jit/metainterp/warmspot.py b/pypy/jit/metainterp/warmspot.py
--- a/pypy/jit/metainterp/warmspot.py
+++ b/pypy/jit/metainterp/warmspot.py
@@ -23,7 +23,7 @@
 from pypy.jit.metainterp.jitprof import Profiler, EmptyProfiler
 from pypy.jit.metainterp.jitexc import JitException
 from pypy.jit.metainterp.jitdriver import JitDriverStaticData
-from pypy.jit.codewriter import support, codewriter
+from pypy.jit.codewriter import support, codewriter, longlong
 from pypy.jit.codewriter.policy import JitPolicy
 
 # ____________________________________________________________
@@ -345,7 +345,7 @@
 
         class DoneWithThisFrameFloat(JitException):
             def __init__(self, result):
-                assert lltype.typeOf(result) is lltype.Float
+                assert lltype.typeOf(result) is longlong.FLOATSTORAGE
                 self.result = result
             def __str__(self):
                 return 'DoneWithThisFrameFloat(%s)' % (self.result,)

diff --git a/pypy/jit/metainterp/pyjitpl.py b/pypy/jit/metainterp/pyjitpl.py
--- a/pypy/jit/metainterp/pyjitpl.py
+++ b/pypy/jit/metainterp/pyjitpl.py
@@ -20,7 +20,7 @@
 from pypy.rlib.rarithmetic import intmask
 from pypy.rlib.objectmodel import specialize
 from pypy.jit.codewriter.jitcode import JitCode, SwitchDictDescr, MissingLiveness
-from pypy.jit.codewriter import heaptracker
+from pypy.jit.codewriter import heaptracker, longlong
 from pypy.jit.metainterp.optimizeutil import RetraceLoop
 
 # ____________________________________________________________
@@ -1473,7 +1473,7 @@
             elif result_type == history.REF:
                 raise sd.DoneWithThisFrameRef(self.cpu, resultbox.getref_base())
             elif result_type == history.FLOAT:
-                raise sd.DoneWithThisFrameFloat(resultbox.getfloat())
+                raise sd.DoneWithThisFrameFloat(resultbox.getfloatstorage())
             else:
                 assert False
 
@@ -2152,7 +2152,7 @@
             # warmstate.py.
             virtualizable_box = self.virtualizable_boxes[-1]
             virtualizable = vinfo.unwrap_virtualizable_box(virtualizable_box)
-            assert not virtualizable.vable_token
+            assert not vinfo.gettoken(virtualizable)
             # fill the virtualizable with the local boxes
             self.synchronize_virtualizable()
         #

diff --git a/pypy/doc/config/objspace.usemodules.readline.txt b/pypy/doc/config/objspace.usemodules.readline.txt
deleted file mode 100644
--- a/pypy/doc/config/objspace.usemodules.readline.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-Use the 'readline' module. 

diff --git a/pypy/jit/metainterp/resume.py b/pypy/jit/metainterp/resume.py
--- a/pypy/jit/metainterp/resume.py
+++ b/pypy/jit/metainterp/resume.py
@@ -1066,17 +1066,16 @@
             return len(numb.nums)
         index = len(numb.nums) - 1
         virtualizable = self.decode_ref(numb.nums[index])
-        virtualizable = vinfo.cast_gcref_to_vtype(virtualizable)
         if self.resume_after_guard_not_forced == 1:
             # in the middle of handle_async_forcing()
-            assert virtualizable.vable_token
-            virtualizable.vable_token = vinfo.TOKEN_NONE
+            assert vinfo.gettoken(virtualizable)
+            vinfo.settoken(virtualizable, vinfo.TOKEN_NONE)
         else:
             # just jumped away from assembler (case 4 in the comment in
             # virtualizable.py) into tracing (case 2); check that vable_token
             # is and stays 0.  Note the call to reset_vable_token() in
             # warmstate.py.
-            assert not virtualizable.vable_token
+            assert not vinfo.gettoken(virtualizable)
         return vinfo.write_from_resume_data_partial(virtualizable, self, numb)
 
     def load_value_of_type(self, TYPE, tagged):
@@ -1217,7 +1216,7 @@
     def decode_float(self, tagged):
         num, tag = untag(tagged)
         if tag == TAGCONST:
-            return self.consts[num].getfloat()
+            return self.consts[num].getfloatstorage()
         else:
             assert tag == TAGBOX
             if num < 0:

diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -12,13 +12,13 @@
 from pypy.rlib.jit import BaseJitCell
 from pypy.rlib.debug import debug_start, debug_stop, debug_print
 from pypy.jit.metainterp import history
-from pypy.jit.codewriter import support, heaptracker
+from pypy.jit.codewriter import support, heaptracker, longlong
 
 # ____________________________________________________________
 
 @specialize.arg(0)
 def specialize_value(TYPE, x):
-    """'x' must be a Signed, a GCREF or a Float.
+    """'x' must be a Signed, a GCREF or a FLOATSTORAGE.
     This function casts it to a more specialized type, like Char or Ptr(..).
     """
     INPUT = lltype.typeOf(x)
@@ -28,15 +28,15 @@
             return rffi.cast(TYPE, x)
         else:
             return lltype.cast_primitive(TYPE, x)
-    elif INPUT is lltype.Float:
+    elif INPUT is longlong.FLOATSTORAGE:
         assert TYPE is lltype.Float
-        return x
+        return longlong.getrealfloat(x)
     else:
         return lltype.cast_opaque_ptr(TYPE, x)
 
 @specialize.ll()
 def unspecialize_value(value):
-    """Casts 'value' to a Signed, a GCREF or a Float."""
+    """Casts 'value' to a Signed, a GCREF or a FLOATSTORAGE."""
     if isinstance(lltype.typeOf(value), lltype.Ptr):
         if lltype.typeOf(value).TO._gckind == 'gc':
             return lltype.cast_opaque_ptr(llmemory.GCREF, value)
@@ -46,7 +46,7 @@
     elif isinstance(lltype.typeOf(value), ootype.OOType):
         return ootype.cast_to_object(value)
     elif isinstance(value, float):
-        return value
+        return longlong.getfloatstorage(value)
     else:
         return intmask(value)
 
@@ -83,6 +83,7 @@
         else:
             return history.BoxObj(value)
     elif isinstance(value, float):
+        value = longlong.getfloatstorage(value)
         if in_const_box:
             return history.ConstFloat(value)
         else:
@@ -138,7 +139,11 @@
         intvalue = lltype.cast_primitive(lltype.Signed, value)
         cpu.set_future_value_int(j, intvalue)
     elif typecode == 'float':
-        assert isinstance(value, float)
+        if lltype.typeOf(value) is lltype.Float:
+            value = longlong.getfloatstorage(value)
+        else:
+            assert longlong.is_longlong(lltype.typeOf(value))
+            value = rffi.cast(lltype.SignedLongLong, value)
         cpu.set_future_value_float(j, value)
     else:
         assert False

diff --git a/pypy/jit/metainterp/optimizeopt/optimizer.py b/pypy/jit/metainterp/optimizeopt/optimizer.py
--- a/pypy/jit/metainterp/optimizeopt/optimizer.py
+++ b/pypy/jit/metainterp/optimizeopt/optimizer.py
@@ -164,7 +164,7 @@
 CONST_0      = ConstInt(0)
 CONST_1      = ConstInt(1)
 CVAL_ZERO    = ConstantValue(CONST_0)
-CVAL_ZERO_FLOAT = ConstantValue(ConstFloat(0.0))
+CVAL_ZERO_FLOAT = ConstantValue(Const._new(0.0))
 CVAL_UNINITIALIZED_ZERO = ConstantValue(CONST_0)
 llhelper.CVAL_NULLREF = ConstantValue(llhelper.CONST_NULL)
 oohelper.CVAL_NULLREF = ConstantValue(oohelper.CONST_NULL)

diff --git a/pypy/jit/metainterp/test/test_basic.py b/pypy/jit/metainterp/test/test_basic.py
--- a/pypy/jit/metainterp/test/test_basic.py
+++ b/pypy/jit/metainterp/test/test_basic.py
@@ -9,6 +9,7 @@
 from pypy.jit.metainterp import pyjitpl, history
 from pypy.jit.metainterp.warmstate import set_future_value
 from pypy.jit.codewriter.policy import JitPolicy, StopAtXPolicy
+from pypy.jit.codewriter import longlong
 from pypy import conftest
 from pypy.rlib.rarithmetic import ovfcheck
 from pypy.jit.metainterp.typesystem import LLTypeHelper, OOTypeHelper
@@ -86,6 +87,7 @@
             blackholeinterp.setarg_r(count_r, value)
             count_r += 1
         elif T == lltype.Float:
+            value = longlong.getfloatstorage(value)
             blackholeinterp.setarg_f(count_f, value)
             count_f += 1
         else:
@@ -192,6 +194,10 @@
         # try to run it by running the code compiled just before
         result3 = _run_with_machine_code(self, args)
         assert result1 == result3 or result3 == NotImplemented
+        #
+        if (longlong.supports_longlong and
+            isinstance(result1, longlong.r_float_storage)):
+            result1 = longlong.getrealfloat(result1)
         return result1
 
     def check_history(self, expected=None, **isns):

diff --git a/pypy/module/readline/test/__init__.py b/pypy/module/readline/test/__init__.py
deleted file mode 100644
--- a/pypy/module/readline/test/__init__.py
+++ /dev/null
@@ -1,1 +0,0 @@
-#

diff --git a/pypy/module/readline/test/test_with_pypy.py b/pypy/module/readline/test/test_with_pypy.py
deleted file mode 100644
--- a/pypy/module/readline/test/test_with_pypy.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test the readline library on top of PyPy.  The following tests run
-in the PyPy interpreter, itself running on top of CPython
-"""
-
-import py
-from pypy.conftest import gettestobjspace
-from pypy.rpython.tool import rffi_platform as platform
-
-try:
-    from pypy.module.readline import c_readline
-except platform.CompilationError, e:
-    py.test.skip(e)
-
-
-class AppTestReadline:
-
-    def setup_class(cls):
-        # enable usage of the readline mixedmodule
-        space = gettestobjspace(usemodules=('readline',))
-        cls.space = space
-
-    def test_basic_import(self):
-        # this is interpreted by PyPy
-        import readline 
-        readline.readline
-        # XXX test more

diff --git a/pypy/module/readline/interp_readline.py b/pypy/module/readline/interp_readline.py
deleted file mode 100644
--- a/pypy/module/readline/interp_readline.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# this is a sketch of how one might one day be able to define a pretty simple
-# ctypes-using module, suitable for feeding to the ext-compiler
-
-from pypy.interpreter.baseobjspace import ObjSpace
-
-from pypy.module.readline import c_readline
-from pypy.rpython.lltypesystem import rffi
-
-#------------------------------------------------------------
-# exported API  (see interpleveldefs in __init__.py) 
-#
-def readline(space, prompt):
-    return space.wrap(rffi.charp2str(c_readline.c_readline(prompt)))
-readline.unwrap_spec = [ObjSpace, str]
-
-def setcompleter(space, w_callback):
-    """Set or remove the completer function.
-    The function is called as function(text, state),
-    for state in 0, 1, 2, ..., until it returns a non-string.
-    It should return the next possible completion starting with 'text'.
-    """ 
-    # XXX set internal completion function 
-    

diff --git a/pypy/objspace/std/test/helper.py b/pypy/objspace/std/test/helper.py
deleted file mode 100644
--- a/pypy/objspace/std/test/helper.py
+++ /dev/null
@@ -1,69 +0,0 @@
-def raises(excp, func, *args):
-    try:
-        func(*args)
-        assert 1 == 0
-    except excp:pass
-
-def assertEqual(a, b):
-    assert a == b
-
-def assertNotEqual(a, b):
-    assert a != b
-
-def assertIs(a, b):
-    assert a is b
-
-# complex specific tests
-
-EPS = 1e-9
-
-def assertAlmostEqual(a, b):
-    if isinstance(a, complex):
-        if isinstance(b, complex):
-            assert a.real - b.real < EPS
-            assert a.imag - b.imag < EPS
-        else:
-            assert a.real - b < EPS
-            assert a.imag < EPS
-    else:
-        if isinstance(b, complex):
-            assert a - b.real < EPS
-            assert b.imag < EPS
-        else:
-            assert a - b < EPS
-
-def assertCloseAbs(x, y, eps=1e-9):
-    """Return true iff floats x and y "are close\""""
-    # put the one with larger magnitude second
-    if abs(x) > abs(y):
-        x, y = y, x
-    if y == 0:
-        return abs(x) < eps
-    if x == 0:
-        return abs(y) < eps
-    # check that relative difference < eps
-    assert abs((x-y)/y) < eps
-
-def assertClose(x, y, eps=1e-9):
-    """Return true iff complexes x and y "are close\""""
-    assertCloseAbs(x.real, y.real, eps)
-    assertCloseAbs(x.imag, y.imag, eps)
-
-
-def check_div(x, y):
-    """Compute complex z=x*y, and check that z/x==y and z/y==x."""
-    z = x * y
-    if x != 0:
-        q = z / x
-        assertClose(q, y)
-        q = z.__div__(x)
-        assertClose(q, y)
-        q = z.__truediv__(x)
-        assertClose(q, y)
-    if y != 0:
-        q = z / y
-        assertClose(q, x)
-        q = z.__div__(y)
-        assertClose(q, x)
-        q = z.__truediv__(y)
-        assertClose(q, x)

diff --git a/pypy/module/readline/__init__.py b/pypy/module/readline/__init__.py
deleted file mode 100644
--- a/pypy/module/readline/__init__.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# this is a sketch of how one might one day be able to define a pretty simple
-# ctypes-using module, suitable for feeding to the ext-compiler
-
-from pypy.interpreter.mixedmodule import MixedModule
-
-# XXX raw_input needs to check for space.readline_func and use
-# it if its there 
-
-class Module(MixedModule):
-    """Importing this module enables command line editing using GNU readline."""
-    # the above line is the doc string of the translated module  
-
-    def setup_after_space_initialization(self):
-        from pypy.module.readline import c_readline 
-        c_readline.setup_readline(self.space, self)
-
-    interpleveldefs = {
-        'readline'    : 'interp_readline.readline',
-    }
-
-    appleveldefs = {
-        'parse_and_bind':     'app_stub.stub',
-        'get_line_buffer':    'app_stub.stub_str',
-        'insert_text':        'app_stub.stub',
-        'read_init_file':     'app_stub.stub',
-        'read_history_file':  'app_stub.stub',
-        'write_history_file': 'app_stub.stub',
-        'clear_history':      'app_stub.stub',
-        'get_history_length': 'app_stub.stub_int',
-        'set_history_length': 'app_stub.stub',
-        'get_current_history_length': 'app_stub.stub_int',
-        'get_history_item':           'app_stub.stub_str',
-        'remove_history_item':        'app_stub.stub',
-        'replace_history_item':       'app_stub.stub',
-        'redisplay':                  'app_stub.stub',
-        'set_startup_hook':           'app_stub.stub',
-        'set_pre_input_hook':         'app_stub.stub',
-        'set_completer':      'app_stub.stub',
-        'get_completer':      'app_stub.stub',
-        'get_begidx':         'app_stub.stub_int',
-        'get_endidx':         'app_stub.stub_int',
-        'set_completer_delims':       'app_stub.stub',
-        'get_completer_delims':       'app_stub.stub_str',
-        'add_history':        'app_stub.stub',
-    }

diff --git a/pypy/module/readline/test/test_c_readline.py b/pypy/module/readline/test/test_c_readline.py
deleted file mode 100644
--- a/pypy/module/readline/test/test_c_readline.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-Directly test the basic ctypes wrappers.
-"""
-
-import py
-from pypy import conftest; conftest.translation_test_so_skip_if_appdirect()
-from pypy.rpython.tool import rffi_platform as platform
-
-try:
-    from pypy.module.readline import c_readline
-except platform.CompilationError, e:
-    py.test.skip(e)
-
-
-def test_basic_import():
-    c_readline.c_rl_initialize()

diff --git a/pypy/rlib/jit.py b/pypy/rlib/jit.py
--- a/pypy/rlib/jit.py
+++ b/pypy/rlib/jit.py
@@ -272,7 +272,7 @@
 
 # ____________________________________________________________
 
-class JitDriver:    
+class JitDriver(object):    
     """Base class to declare fine-grained user control on the JIT.  So
     far, there must be a singleton instance of JitDriver.  This style
     will allow us (later) to support a single RPython program with


More information about the Pypy-commit mailing list