From arigo at codespeak.net Thu Aug 12 17:46:30 2004
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Thu, 12 Aug 2004 17:46:30 +0200 (MEST)
Subject: [pypy-svn] r5937 - pypy/trunk/src/pypy/objspace/std/test
Message-ID: <20040812154630.0305B5A4C8@thoth.codespeak.net>
Author: arigo
Date: Thu Aug 12 17:46:30 2004
New Revision: 5937
Modified:
pypy/trunk/src/pypy/objspace/std/test/test_unicodestring.py
Log:
Skip a hopelessly failing test in the trivial object space.
(Patch from Roeland Rengelink.)
Modified: pypy/trunk/src/pypy/objspace/std/test/test_unicodestring.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/test_unicodestring.py (original)
+++ pypy/trunk/src/pypy/objspace/std/test/test_unicodestring.py Thu Aug 12 17:46:30 2004
@@ -5,13 +5,17 @@
from pypy.tool import testit
-class TestUnicodeString(testit.AppTestCase):
+class TestUnicodeStringStdOnly(testit.AppTestCase):
+ def setUp(self):
+ self.space = testit.objspace('std')
+
def test_compares(self):
self.assertEqual(u'a', 'a')
self.assertEqual('a', u'a')
self.assertNotEqual(u'a', 'b')
self.assertNotEqual('a', u'b')
+class TestUnicodeString(testit.AppTestCase):
def test_addition(self):
def check(a, b):
self.assertEqual(a, b)
From mwh at codespeak.net Fri Aug 13 12:30:15 2004
From: mwh at codespeak.net (mwh at codespeak.net)
Date: Fri, 13 Aug 2004 12:30:15 +0200 (MEST)
Subject: [pypy-svn] r5942 - pypy/trunk/src/pypy/tool
Message-ID: <20040813103015.608B95A958@thoth.codespeak.net>
Author: mwh
Date: Fri Aug 13 12:30:14 2004
New Revision: 5942
Modified:
pypy/trunk/src/pypy/tool/option.py
Log:
Make the StdObjSpace the default.
Modified: pypy/trunk/src/pypy/tool/option.py
==============================================================================
--- pypy/trunk/src/pypy/tool/option.py (original)
+++ pypy/trunk/src/pypy/tool/option.py Fri Aug 13 12:30:14 2004
@@ -68,7 +68,7 @@
if Options.spaces:
name = Options.spaces[-1]
else:
- name = os.environ.get('OBJSPACE', 'trivial')
+ name = os.environ.get('OBJSPACE', 'std')
try:
return _spacecache[name]
From arigo at codespeak.net Fri Aug 13 14:46:46 2004
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Fri, 13 Aug 2004 14:46:46 +0200 (MEST)
Subject: [pypy-svn] r5943 - in pypy/trunk/src: goal/translate_pypy
pypy/annotation pypy/objspace/flow pypy/translator
Message-ID: <20040813124646.AD1695A958@thoth.codespeak.net>
Author: arigo
Date: Fri Aug 13 14:46:45 2004
New Revision: 5943
Modified:
pypy/trunk/src/goal/translate_pypy/graphserver.py
pypy/trunk/src/goal/translate_pypy/httpserver.py
pypy/trunk/src/goal/translate_pypy/translate_pypy.py
pypy/trunk/src/pypy/annotation/model.py
pypy/trunk/src/pypy/objspace/flow/model.py
pypy/trunk/src/pypy/translator/annrpython.py
Log:
Small progress for translate_pypy.py.
Modified: pypy/trunk/src/goal/translate_pypy/graphserver.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy/graphserver.py (original)
+++ pypy/trunk/src/goal/translate_pypy/graphserver.py Fri Aug 13 14:46:45 2004
@@ -59,12 +59,12 @@
data = '=== %s ===\n\n%s' % (n, data)
return StringIO(data), 'text/plain'
- def serve(self):
+ def serve(self, port=8000):
httpserver.register('', self.indexloader)
httpserver.register('func', self.funcloader)
httpserver.register('img', self.imgloader)
httpserver.register('var', self.varloader)
- BaseHTTPServer.test(HandlerClass=httpserver.MiniHandler)
+ httpserver.serve(port)
# ____________________________________________________________
Modified: pypy/trunk/src/goal/translate_pypy/httpserver.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy/httpserver.py (original)
+++ pypy/trunk/src/goal/translate_pypy/httpserver.py Fri Aug 13 14:46:45 2004
@@ -169,7 +169,7 @@
f.close()
-def my_host():
- import gamesrv
- port = gamesrv.socketports[gamesrv.openhttpsocket()]
- return '127.0.0.1:%d' % port
+def serve(port=8000):
+ server_address = ('', port)
+ httpd = BaseHTTPServer.HTTPServer(server_address, MiniHandler)
+ httpd.serve_forever()
Modified: pypy/trunk/src/goal/translate_pypy/translate_pypy.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy/translate_pypy.py (original)
+++ pypy/trunk/src/goal/translate_pypy/translate_pypy.py Fri Aug 13 14:46:45 2004
@@ -6,6 +6,7 @@
from pypy.objspace.std.objspace import StdObjSpace, W_Object
from pypy.objspace.std.intobject import W_IntObject
from pypy.translator.translator import Translator
+from pypy.translator.annrpython import AnnotatorError
# __________ Entry point __________
@@ -44,9 +45,15 @@
return
print "don't know about", x
- import graphserver
- def run_server():
- graphserver.Server(t).serve()
+ def run_server(background=False, port=8000):
+ import graphserver
+ server = graphserver.Server(t)
+ print >> sys.stderr, '* View the blocks at http://127.0.0.1:%d/' % port
+ if background:
+ import thread
+ thread.start_new_thread(server.serve, ())
+ else:
+ server.serve()
t = Translator(entry_point, verbose=True, simplifying=True)
try:
@@ -58,7 +65,14 @@
print >> sys.stderr
traceback.print_exception(exc, val, tb)
print >> sys.stderr
- thread.start_new_thread(run_server, ())
+
+ if isinstance(val, AnnotatorError) and hasattr(val, 'block'):
+ print '-'*60
+ about(val.block)
+ print '-'*60
+
+ run_server(background=True)
+ print >> sys.stderr
import pdb
pdb.post_mortem(tb)
else:
Modified: pypy/trunk/src/pypy/annotation/model.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/model.py (original)
+++ pypy/trunk/src/pypy/annotation/model.py Fri Aug 13 14:46:45 2004
@@ -142,6 +142,14 @@
s1 = pair(s1, s2).union()
return s1
+def ishashable(x):
+ try:
+ hash(x)
+ except TypeError:
+ return False
+ else:
+ return True
+
def immutablevalue(x):
"The most precise SomeValue instance that contains the immutable value x."
if isinstance(bool, type) and isinstance(x, bool):
@@ -152,7 +160,7 @@
result = SomeString()
elif isinstance(x, tuple):
result = SomeTuple(items = [immutablevalue(e) for e in x])
- elif x in BUILTIN_FUNCTIONS:
+ elif ishashable(x) and x in BUILTIN_FUNCTIONS:
result = SomeBuiltin(BUILTIN_FUNCTIONS[x])
elif isinstance(x, (type, ClassType)) and x.__module__ != '__builtin__':
result = SomeClass(x)
Modified: pypy/trunk/src/pypy/objspace/flow/model.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/model.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/model.py Fri Aug 13 14:46:45 2004
@@ -99,7 +99,14 @@
return hash(self.value)
def __repr__(self):
- return '(%r)' % (self.value,)
+ # try to limit the size of the repr to make it more readable
+ r = repr(self.value)
+ if (r.startswith('<') and r.endswith('>') and
+ hasattr(self.value, '__name__')):
+ r = '%s %s' % (type(self.value).__name__, self.value.__name__)
+ elif len(r) > 30:
+ r = r[:20] + '...' + r[-8:]
+ return '(%s)' % r
# hack! it is useful to have UNDEFINED be an instance of Constant too.
# PyFrame then automatically uses this Constant as a marker for
Modified: pypy/trunk/src/pypy/translator/annrpython.py
==============================================================================
--- pypy/trunk/src/pypy/translator/annrpython.py (original)
+++ pypy/trunk/src/pypy/translator/annrpython.py Fri Aug 13 14:46:45 2004
@@ -132,8 +132,16 @@
# add default arguments if necessary
missingargs = len(block.inputargs) - len(inputcells)
if missingargs:
- assert missingargs >= 0
- assert missingargs <= len(func.func_defaults or ())
+ nbdefaults = len(func.func_defaults or ())
+ if not (0 <= missingargs <= nbdefaults):
+ if nbdefaults:
+ msg = "%d to %d" % (len(block.inputargs)-nbdefaults,
+ len(block.inputargs))
+ else:
+ msg = "%d" % len(block.inputargs)
+ raise AnnotatorError, (
+ "got %d inputcells in call to %r; expected %s" % (
+ len(inputcells), func, msg))
for extra in func.func_defaults[-missingargs:]:
inputcells.append(annmodel.immutablevalue(extra))
self.addpendingblock(block, inputcells)
@@ -209,6 +217,10 @@
#import traceback, sys
#traceback.print_tb(sys.exc_info()[2])
self.annotated[block] = False # failed, hopefully temporarily
+ except AnnotatorError, e:
+ if not hasattr(e, 'block'):
+ e.block = block
+ raise
def reflowpendingblock(self, block):
self.pendingblocks.append((block, None))
From hpk at codespeak.net Fri Aug 13 15:50:17 2004
From: hpk at codespeak.net (hpk at codespeak.net)
Date: Fri, 13 Aug 2004 15:50:17 +0200 (MEST)
Subject: [pypy-svn] r5946 - pypy/trunk/doc
Message-ID: <20040813135017.2F0BA5A958@thoth.codespeak.net>
Author: hpk
Date: Fri Aug 13 15:50:16 2004
New Revision: 5946
Modified:
pypy/trunk/doc/index.txt
Log:
fix link according to lauras suggestion.
Modified: pypy/trunk/doc/index.txt
==============================================================================
--- pypy/trunk/doc/index.txt (original)
+++ pypy/trunk/doc/index.txt Fri Aug 13 15:50:16 2004
@@ -107,5 +107,5 @@
.. _xhelix: http://codespeak.net/pipermail/pypy-dev/2003q4/002437.html
.. _PyPy-IronPython: http://codespeak.net/pipermail/pypy-dev/2003q4/002474.html
.. _IronPython: http://www.python.org/pycon/dc2004/papers/9/
-.. _pliant: http://codespeak.net/pipermail/pypy-dev/2003q4/002395.html
+.. _pliant: http://pliant.cx
.. _recently-modified: http://codespeak.net/pypy/index.cgi?doc/recent
From arigo at codespeak.net Fri Aug 13 16:02:01 2004
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Fri, 13 Aug 2004 16:02:01 +0200 (MEST)
Subject: [pypy-svn] r5947 - in pypy/trunk/src: goal/translate_pypy
pypy/objspace/std pypy/translator
Message-ID: <20040813140201.0B8F75A958@thoth.codespeak.net>
Author: arigo
Date: Fri Aug 13 16:02:00 2004
New Revision: 5947
Modified:
pypy/trunk/src/goal/translate_pypy/translate_pypy.py
pypy/trunk/src/pypy/objspace/std/fake.py
pypy/trunk/src/pypy/objspace/std/objspace.py
pypy/trunk/src/pypy/translator/annrpython.py
Log:
* shuffled imports and usages of fake.py to be RPython-compliant.
* allow *args in the signature of RPython functions (currently all
functions must be *called* with a known number of arguments, so
this shouldn't be difficult to translate).
* translate_pypy apparently completes, but probably still manages to
miss large parts of the source base.
Modified: pypy/trunk/src/goal/translate_pypy/translate_pypy.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy/translate_pypy.py (original)
+++ pypy/trunk/src/goal/translate_pypy/translate_pypy.py Fri Aug 13 16:02:00 2004
@@ -1,7 +1,7 @@
#
#
#
-import autopath
+import autopath, sys
from pypy.objspace.std.objspace import StdObjSpace, W_Object
from pypy.objspace.std.intobject import W_IntObject
@@ -60,15 +60,16 @@
a = t.annotate([])
a.simplify()
except:
- import sys, traceback, thread
+ import traceback
exc, val, tb = sys.exc_info()
print >> sys.stderr
traceback.print_exception(exc, val, tb)
print >> sys.stderr
- if isinstance(val, AnnotatorError) and hasattr(val, 'block'):
+ block = getattr(val, '__annotator_block', None)
+ if block:
print '-'*60
- about(val.block)
+ about(block)
print '-'*60
run_server(background=True)
Modified: pypy/trunk/src/pypy/objspace/std/fake.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/fake.py (original)
+++ pypy/trunk/src/pypy/objspace/std/fake.py Fri Aug 13 16:02:00 2004
@@ -29,7 +29,7 @@
w_value = space.wrap(value)
raise OperationError, OperationError(w_exc, w_value), tb
-def fake_type(cpy_type):
+def fake_type(cpy_type, ignored=None):
assert type(cpy_type) is type
if cpy_type in _fake_type_cache:
return _fake_type_cache[cpy_type]
Modified: pypy/trunk/src/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/std/objspace.py Fri Aug 13 16:02:00 2004
@@ -153,11 +153,12 @@
from pypy.objspace.std import noneobject
from pypy.objspace.std import iterobject
from pypy.objspace.std import unicodeobject
+ from pypy.objspace.std import fake
# hack to avoid imports in the time-critical functions below
global W_ObjectObject, W_BoolObject, W_IntObject, W_FloatObject
global W_TupleObject, W_ListObject, W_DictObject, W_StringObject
global W_TypeObject, W_SliceObject, W_LongObject, W_NoneObject
- global W_SeqIterObject, W_UnicodeObject
+ global W_SeqIterObject, W_UnicodeObject, fake_type
W_ObjectObject = objectobject.W_ObjectObject
W_BoolObject = boolobject.W_BoolObject
W_IntObject = intobject.W_IntObject
@@ -172,6 +173,7 @@
W_NoneObject = noneobject.W_NoneObject
W_SeqIterObject = iterobject.W_SeqIterObject
W_UnicodeObject = unicodeobject.W_UnicodeObject
+ fake_type = fake.fake_type
# end of hacks
# singletons
self.w_None = W_NoneObject(self)
@@ -248,10 +250,11 @@
if isinstance(x, type(Exception)) and issubclass(x, Exception):
if hasattr(self, 'w_' + x.__name__):
return getattr(self, 'w_' + x.__name__)
- from pypy.objspace.std import fake
if isinstance(x, type):
- return self.gettypeobject(fake.fake_type(x).typedef)
- return fake.fake_type(type(x))(self, x)
+ ft = self.loadfromcache(x, fake_type)
+ return self.gettypeobject(ft.typedef)
+ ft = self.loadfromcache(type(x), fake_type)
+ return ft(self, x)
def newint(self, intval):
return W_IntObject(self, intval)
Modified: pypy/trunk/src/pypy/translator/annrpython.py
==============================================================================
--- pypy/trunk/src/pypy/translator/annrpython.py (original)
+++ pypy/trunk/src/pypy/translator/annrpython.py Fri Aug 13 16:02:00 2004
@@ -7,6 +7,7 @@
from pypy.annotation.factory import BlockedInference, Bookkeeper
from pypy.objspace.flow.model import Variable, Constant, UndefinedConstant
from pypy.objspace.flow.model import SpaceOperation, FunctionGraph
+from pypy.interpreter.pycode import CO_VARARGS, CO_VARKEYWORDS
class AnnotatorError(Exception):
@@ -129,21 +130,35 @@
# generalize the function's input arguments
block = graph.startblock
inputcells = list(args)
+ # process *varargs in the called function
+ expectedargs = len(block.inputargs)
+ if func.func_code.co_flags & CO_VARARGS:
+ expectedargs -= 1
+ if func.func_code.co_flags & CO_VARKEYWORDS:
+ expectedargs -= 1
+ extracells = []
+ if func.func_code.co_flags & CO_VARARGS:
+ s_varargs = annmodel.SomeTuple(inputcells[expectedargs:])
+ extracells = [s_varargs]
+ del inputcells[expectedargs:]
+ if func.func_code.co_flags & CO_VARKEYWORDS:
+ raise AnnotatorError, "** argument of %r unsupported" % (func,)
# add default arguments if necessary
- missingargs = len(block.inputargs) - len(inputcells)
- if missingargs:
+ if len(inputcells) != expectedargs:
+ missingargs = expectedargs - len(inputcells)
nbdefaults = len(func.func_defaults or ())
if not (0 <= missingargs <= nbdefaults):
if nbdefaults:
- msg = "%d to %d" % (len(block.inputargs)-nbdefaults,
- len(block.inputargs))
+ msg = "%d to %d" % (expectedargs-nbdefaults,
+ expectedargs)
else:
- msg = "%d" % len(block.inputargs)
+ msg = "%d" % expectedargs
raise AnnotatorError, (
"got %d inputcells in call to %r; expected %s" % (
len(inputcells), func, msg))
for extra in func.func_defaults[-missingargs:]:
inputcells.append(annmodel.immutablevalue(extra))
+ inputcells.extend(extracells)
self.addpendingblock(block, inputcells)
# get the (current) return value
v = graph.getreturnvar()
@@ -217,9 +232,10 @@
#import traceback, sys
#traceback.print_tb(sys.exc_info()[2])
self.annotated[block] = False # failed, hopefully temporarily
- except AnnotatorError, e:
- if not hasattr(e, 'block'):
- e.block = block
+ except Exception, e:
+ # hack for debug tools only
+ if not hasattr(e, '__annotator_block'):
+ setattr(e, '__annotator_block', block)
raise
def reflowpendingblock(self, block):
From arigo at codespeak.net Fri Aug 13 16:27:57 2004
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Fri, 13 Aug 2004 16:27:57 +0200 (MEST)
Subject: [pypy-svn] r5948 - in pypy/trunk/src: goal/translate_pypy
pypy/translator
Message-ID: <20040813142757.CCE315A958@thoth.codespeak.net>
Author: arigo
Date: Fri Aug 13 16:27:57 2004
New Revision: 5948
Modified:
pypy/trunk/src/goal/translate_pypy/graphserver.py
pypy/trunk/src/pypy/translator/annrpython.py
Log:
Record and display the whole history of the bindings of each variable.
Modified: pypy/trunk/src/goal/translate_pypy/graphserver.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy/graphserver.py (original)
+++ pypy/trunk/src/goal/translate_pypy/graphserver.py Fri Aug 13 16:27:57 2004
@@ -1,6 +1,7 @@
import BaseHTTPServer
from cStringIO import StringIO
import httpserver
+from httpserver import htmlquote
from pypy.translator.tool.pygame.graphviewer import GraphViewer
from pypy.translator.tool.make_dot import make_dot_graphs
@@ -11,8 +12,11 @@
self.translator = translator
self.viewercache = {}
self.binding_by_name = {}
+ self.binding_history = {}
for var, s_value in self.translator.annotator.bindings.items():
self.binding_by_name[var.name] = '%s : %r' % (var.name, s_value)
+ for var, history in self.translator.annotator.bindingshistory.items():
+ self.binding_history[var.name] = history
def getviewer(self, i):
t = self.translator
@@ -54,10 +58,22 @@
def varloader(self, n, **options):
n = n[0]
- import textwrap
- data = textwrap.fill(self.binding_by_name[n])
- data = '=== %s ===\n\n%s' % (n, data)
- return StringIO(data), 'text/plain'
+ s = self.binding_by_name[n]
+ assert s.startswith('%s :' % n)
+ s = s[len('%s :' % n):]
+ data = '
%s' % n
+ data += '%s
' % n
+ data += '%s
' % htmlquote(s)
+ if n in self.binding_history:
+ lines = ['%s' % htmlquote(repr(s))
+ for s in self.binding_history[n]]
+ lines.reverse()
+ data += 'Previous values
'
+ data += ''
+ data += '\n'.join(lines)
+ data += '
'
+ data += ''
+ return StringIO(data), 'text/html'
def serve(self, port=8000):
httpserver.register('', self.indexloader)
Modified: pypy/trunk/src/pypy/translator/annrpython.py
==============================================================================
--- pypy/trunk/src/pypy/translator/annrpython.py (original)
+++ pypy/trunk/src/pypy/translator/annrpython.py Fri Aug 13 16:27:57 2004
@@ -24,6 +24,7 @@
self.bindings = {} # map Variables to SomeValues
self.annotated = {} # set of blocks already seen
self.notify = {} # {block: {factory-to-invalidate-when-done}}
+ self.bindingshistory = {}# map Variables to lists of SomeValues
self.bookkeeper = Bookkeeper(self)
#___ convenience high-level interface __________________
@@ -117,6 +118,14 @@
else:
raise TypeError, 'Variable or Constant expected, got %r' % (arg,)
+ def setbinding(self, arg, s_value):
+ if arg in self.bindings:
+ # for debugging purposes, record the history of bindings that
+ # have been given to this variable
+ history = self.bindingshistory.setdefault(arg, [])
+ history.append(self.bindings[arg])
+ self.bindings[arg] = s_value
+
#___ interface for annotator.factory _______
@@ -246,7 +255,7 @@
def bindinputargs(self, block, inputcells):
# Create the initial bindings for the input args of a block.
for a, cell in zip(block.inputargs, inputcells):
- self.bindings[a] = cell
+ self.setbinding(a, cell)
self.annotated[block] = False # must flowin.
def mergeinputargs(self, block, inputcells):
@@ -288,7 +297,7 @@
raise BlockedInference # the operation cannot succeed
assert isinstance(resultcell, annmodel.SomeObject)
assert isinstance(op.result, Variable)
- self.bindings[op.result] = resultcell # bind resultcell to op.result
+ self.setbinding(op.result, resultcell) # bind resultcell to op.result
def default_consider_op(self, *args):
return annmodel.SomeObject()
From lac at codespeak.net Fri Aug 13 17:40:45 2004
From: lac at codespeak.net (lac at codespeak.net)
Date: Fri, 13 Aug 2004 17:40:45 +0200 (MEST)
Subject: [pypy-svn] r5949 - in pypy/trunk/doc: . devel sprintinfo
Message-ID: <20040813154045.AA61D5A958@thoth.codespeak.net>
Author: lac
Date: Fri Aug 13 17:40:44 2004
New Revision: 5949
Modified:
pypy/trunk/doc/devel/testdesign.txt
pypy/trunk/doc/index.txt
pypy/trunk/doc/sprintinfo/LouvainLaNeuvePlan.txt
pypy/trunk/doc/sprintinfo/LouvainLaNeuveReport.txt
Log:
Changed references to pypy-dev archives so that they work. Stated that
Standard, and not Trivial is the default Object Space in testdesign.txt.
Fixed one reference in sprintinfo/LouvainLaNeuvePlan.txt which was simply
wrong. Added missing link in sprintinfo/LouvainLaNeuveReport.txt (these
are the same links in both files, and don't appear to be used in
SprintPlanning now, perhaps I should have deleted them instead?
Capitalised Micheal's name.
Modified: pypy/trunk/doc/devel/testdesign.txt
==============================================================================
--- pypy/trunk/doc/devel/testdesign.txt (original)
+++ pypy/trunk/doc/devel/testdesign.txt Fri Aug 13 17:40:44 2004
@@ -33,7 +33,7 @@
some preliminary information about a new test module that was recently
developed at the Amsterdam Sprint (Dec. 2003) and still is under development.
-Note that we are using a unittest2 framework
+Note that we are using a unittest2 framework (but not for long)
Command line tool test_all
--------------------------
@@ -42,13 +42,17 @@
python test_all.py
-which will run all tests against the Trivial Object Space. If you want
-to test against the StandardObjectSpace then issue::
+which will run all tests against the Standard Object Space. If you want
+to test against the TrivialObjectSpace then issue::
- python test_all.py -S
+ python test_all.py -T
For more switches invoke "python test_all.py -h".
+This used to be reversed -- the TrivialObjectSpace was the default, and
+you had to specify the StandardObjectSpace. You may find some documentation
+that has not been changed to reflect the new reality.
+
-------------------------------------------------------------------------------
.. _mail: http://codespeak.net/pipermail/pypy-dev/2003q2/000789.html
Modified: pypy/trunk/doc/index.txt
==============================================================================
--- pypy/trunk/doc/index.txt (original)
+++ pypy/trunk/doc/index.txt Fri Aug 13 17:40:44 2004
@@ -80,7 +80,7 @@
* A thread discussing the xhelix_ python C extension implementing Helix encryption and authentication, which may be interesting to use as a pypy performance test at some point.
-* A thread discussing comparison of PyPy-IronPython_ , and a paper for PyCon 2004: "IronPython_ is a new implementation of the Python language targeting the Common Language Runtime (CLR). It compiles python programs into bytecode (IL) that will run on either Microsoft's .NET or the Open Source Mono platform. IronPython includes an interactive interpreter and transparent on-the-fly compilation of source files just like standard Python. In addition, IronPython supports static compilation of Python code to produce static executables (.exe's) that can be run directly or static libraries (.dll's) that can be called from other CLR languages."
+* A paper for PyCon 2004: "IronPython_ is a new implementation of the Python language targeting the Common Language Runtime (CLR). It compiles python programs into bytecode (IL) that will run on either Microsoft's .NET or the Open Source Mono platform. IronPython includes an interactive interpreter and transparent on-the-fly compilation of source files just like standard Python. In addition, IronPython supports static compilation of Python code to produce static executables (.exe's) that can be run directly or static libraries (.dll's) that can be called from other CLR languages."
* A comparison of Python and Pliant_ , an OS written in a python-like language.
@@ -94,18 +94,17 @@
.. _howtosvn: http://codespeak.net/pypy/index.cgi?doc/devel/howtosvn.html
.. _optionaltool: http://codespeak.net/pypy/index.cgi?doc/devel/optionaltool.html
.. _testdesign: http://codespeak.net/pypy/index.cgi?doc/devel/testdesign.html
-.. _feasible: http://codespeak.net/pipermail/pypy-dev/2004q2/002619.html
-.. _rock: http://codespeak.net/pipermail/pypy-dev/2004q1/002585.html
-.. _Scheme: http://codespeak.net/pipermail/pypy-dev/2004q1/002586.html
+.. _feasible: http://codespeak.net/pipermail/pypy-dev/2004q2/001289.html
+.. _rock: http://codespeak.net/pipermail/pypy-dev/2004q1/001255.html
+.. _Scheme: http://codespeak.net/pipermail/pypy-dev/2004q1/001256.html
.. _FlashMob: http://www.flashmobcomputing.org/
-.. _lisp: http://codespeak.net/pipermail/pypy-dev/2003q4/002318.html
+.. _lisp: http://codespeak.net/pipermail/pypy-dev/2003q4/001048.html
.. _repository: http://www2.parc.com/csl/groups/sda/publications.shtml
-.. _lightning: http://codespeak.net/pipermail/pypy-dev/2003q4/002321.html
+.. _lightning: http://codespeak.net/pipermail/pypy-dev/2003q4/001051.html
.. _LLVM: http://llvm.cs.uiuc.edu/
-.. _PyPy-LLVM: http://codespeak.net/pipermail/pypy-dev/2003q4/002398.html
-.. _conversation: http://codespeak.net/pipermail/pypy-dev/2003q4/002411.html
-.. _xhelix: http://codespeak.net/pipermail/pypy-dev/2003q4/002437.html
-.. _PyPy-IronPython: http://codespeak.net/pipermail/pypy-dev/2003q4/002474.html
+.. _PyPy-LLVM: http://codespeak.net/pipermail/pypy-dev/2003q4/001115.html
+.. _conversation: http://codespeak.net/pipermail/pypy-dev/2003q4/001119.html
+.. _xhelix: http://codespeak.net/pipermail/pypy-dev/2003q4/001129.html
.. _IronPython: http://www.python.org/pycon/dc2004/papers/9/
.. _pliant: http://pliant.cx
.. _recently-modified: http://codespeak.net/pypy/index.cgi?doc/recent
Modified: pypy/trunk/doc/sprintinfo/LouvainLaNeuvePlan.txt
==============================================================================
--- pypy/trunk/doc/sprintinfo/LouvainLaNeuvePlan.txt (original)
+++ pypy/trunk/doc/sprintinfo/LouvainLaNeuvePlan.txt Fri Aug 13 17:40:44 2004
@@ -39,5 +39,4 @@
.. _dictobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000515.html
.. _intobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000443.html
.. _instmethod: http://codespeak.net/pipermail/pypy-svn/2003-June/000389.html
-.. _iterobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000999.html
-
+.. _iterobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000529.html
Modified: pypy/trunk/doc/sprintinfo/LouvainLaNeuveReport.txt
==============================================================================
--- pypy/trunk/doc/sprintinfo/LouvainLaNeuveReport.txt (original)
+++ pypy/trunk/doc/sprintinfo/LouvainLaNeuveReport.txt Fri Aug 13 17:40:44 2004
@@ -42,7 +42,7 @@
- refactoring of argument-parsing for tool/test.py
and introduction of the "py.py" tool that unifies
executing commands, files and going interactive.
- (michael)
+ (Michael)
- refactoring, improvements of multimethods (Armin, Samuele)
@@ -51,7 +51,7 @@
Also improvements and crossreferences between the
documents. (Anna)
a trigger was implemented that generates the new html-pages after
- each checkin in the pypy/trunk/doc directory. (holger)
+ each checkin in the pypy/trunk/doc directory. (Holger)
- OSCON-2003 paper was beeing worked on and enhanced!
(Laura, Jacob, Guido, Armin, ...)
@@ -74,5 +74,6 @@
.. _userobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000449.html
.. _dictobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000515.html
.. _intobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000443.html
+.. _instmethod: http://codespeak.net/pipermail/pypy-svn/2003-June/000389.html
.. _iterobject: http://codespeak.net/pipermail/pypy-svn/2003-June/000529.html
From lac at codespeak.net Fri Aug 13 17:56:35 2004
From: lac at codespeak.net (lac at codespeak.net)
Date: Fri, 13 Aug 2004 17:56:35 +0200 (MEST)
Subject: [pypy-svn] r5950 - pypy/trunk/doc
Message-ID: <20040813155635.088485A958@thoth.codespeak.net>
Author: lac
Date: Fri Aug 13 17:56:35 2004
New Revision: 5950
Added:
pypy/trunk/doc/cmodules.txt
Modified:
pypy/trunk/doc/goals.txt
Log:
Add Anthony's helpful list of the Cmodules as its own doc, and refer to
it in goals.txt
Added: pypy/trunk/doc/cmodules.txt
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/cmodules.txt Fri Aug 13 17:56:35 2004
@@ -0,0 +1,116 @@
+Anthony Baxter made us this wonderful list of C modules that we will want
+to make Python versions of. Thank you Anthony.
+
+Probably doable
+---------------
+
+These ones are probably achievable, although you might think
+otherwise.
+
+_bisectmodule - already exists
+_codecsmodule
+_csv - already exists?
+_heapqmodule - already exists
+_hotshot
+_localemodule
+_randommodule
+_sre - already exists?
+_weakref
+arraymodule
+audioop
+binascii
+cPickle - already exists
+cStringIO - already exists
+cgensupport
+cmathmodule
+collectionsmodule
+cryptmodule
+datetimemodule - already exists
+gcmodule
+imageop
+imgfile
+itertoolsmodule
+mathmodule
+md5module
+operator
+parsermodule
+rgbimgmodule
+sgimodule
+shamodule
+stropmodule
+structmodule
+symtablemodule
+syslogmodule
+timingmodule
+unicodedata
+yuvconvert
+zipimport
+
+Deprecated
+----------
+
+These modules are deprecated
+
+regexmodule
+regexpr
+rotormodule
+mpzmodule
+
+Links in an external library
+----------------------------
+
+These are all wrappers around external C libraries. Rewriting them
+from scratch is really not practical.
+
+_bsddb
+_curses_panel
+_cursesmodule
+_ssl
+_tkinter
+almodule
+bsddbmodule
+bz2module
+cdmodule
+clmodule
+dbmmodule
+flmodule
+fmmodule
+gdbmmodule
+glmodule
+nismodule
+puremodule
+pyexpat
+readline (replace with pyrepl?)
+svmodule
+termios
+tkappinit
+zlibmodule
+
+System specific
+---------------
+
+These are modules that are wrappers around system calls
+and the like. Rewriting them in pure Python will still
+need a way to invoke the underlying calls - and will probably
+be different for each platform (pypy, pycore, ironpython, &c).
+A lot of these are also a mass of #ifdefs for various broken
+operating systems.
+
+dlmodule
+errnomodule
+fcntlmodule
+fpectlmodule
+fpetestmodule
+grpmodule
+linuxaudiodev
+mmapmodule
+ossaudiodev
+posixmodule
+pwdmodule
+resource
+selectmodule
+signalmodule
+socketmodule
+sunaudiodev
+threadmodule
+timemodule
Modified: pypy/trunk/doc/goals.txt
==============================================================================
--- pypy/trunk/doc/goals.txt (original)
+++ pypy/trunk/doc/goals.txt Fri Aug 13 17:56:35 2004
@@ -246,7 +246,8 @@
- Port the built-in Python library to PyPy (functions, types and
modules currently implemented in C) -- types needs refactoring,
- the rest is mostly done.
+ the rest is mostly done. Anthony Baxter has given us a very useful
+ list of the CModules_ we need to consider porting.
- Decide on a case-by-case basis which features are to
be implemented using RPython or just general Python. -- moving target.
@@ -324,7 +325,7 @@
- Design and implement a back-end component for dynamically emitting
machine code for multiple processor architectures. Enable dynamic
foreign function calls.
-
+n
- Research optimisation heuristics for the Just-In-Time compiler.
@@ -373,3 +374,4 @@
versions suitable for specialized environments such as small or very large
computing devices.
+ _CModules: /pypy/doc/cmodules.txt
\ No newline at end of file
From lac at codespeak.net Fri Aug 13 18:05:32 2004
From: lac at codespeak.net (lac at codespeak.net)
Date: Fri, 13 Aug 2004 18:05:32 +0200 (MEST)
Subject: [pypy-svn] r5952 - pypy/trunk/doc
Message-ID: <20040813160532.C82AA5A958@thoth.codespeak.net>
Author: lac
Date: Fri Aug 13 18:05:31 2004
New Revision: 5952
Modified:
pypy/trunk/doc/goals.txt
Log:
The CamelCase for WikiWords mixes badly with how I spell Cmodules. See if
this way goes better.
Modified: pypy/trunk/doc/goals.txt
==============================================================================
--- pypy/trunk/doc/goals.txt (original)
+++ pypy/trunk/doc/goals.txt Fri Aug 13 18:05:31 2004
@@ -247,7 +247,7 @@
- Port the built-in Python library to PyPy (functions, types and
modules currently implemented in C) -- types needs refactoring,
the rest is mostly done. Anthony Baxter has given us a very useful
- list of the CModules_ we need to consider porting.
+ list of the cmodules_ we need to consider porting.
- Decide on a case-by-case basis which features are to
be implemented using RPython or just general Python. -- moving target.
@@ -325,9 +325,8 @@
- Design and implement a back-end component for dynamically emitting
machine code for multiple processor architectures. Enable dynamic
foreign function calls.
-n
-- Research optimisation heuristics for the Just-In-Time compiler.
+- Research optimisation heuristics for the Just-In-Time compiler.
- A Just-In-Time compiler for PyPy !!! Outperform the
state-of-the art (Psyco, Stackless).
@@ -374,4 +373,4 @@
versions suitable for specialized environments such as small or very large
computing devices.
- _CModules: /pypy/doc/cmodules.txt
\ No newline at end of file
+ _cmodules: /pypy/doc/cmodules.txt
\ No newline at end of file
From lac at codespeak.net Fri Aug 13 18:07:11 2004
From: lac at codespeak.net (lac at codespeak.net)
Date: Fri, 13 Aug 2004 18:07:11 +0200 (MEST)
Subject: [pypy-svn] r5953 - pypy/trunk/doc
Message-ID: <20040813160711.7D78D5A958@thoth.codespeak.net>
Author: lac
Date: Fri Aug 13 18:07:10 2004
New Revision: 5953
Modified:
pypy/trunk/doc/goals.txt
Log:
Fix stupid error.
Modified: pypy/trunk/doc/goals.txt
==============================================================================
--- pypy/trunk/doc/goals.txt (original)
+++ pypy/trunk/doc/goals.txt Fri Aug 13 18:07:10 2004
@@ -373,4 +373,4 @@
versions suitable for specialized environments such as small or very large
computing devices.
- _cmodules: /pypy/doc/cmodules.txt
\ No newline at end of file
+.. _cmodules: /pypy/doc/cmodules.txt
\ No newline at end of file
From lac at codespeak.net Fri Aug 13 18:10:29 2004
From: lac at codespeak.net (lac at codespeak.net)
Date: Fri, 13 Aug 2004 18:10:29 +0200 (MEST)
Subject: [pypy-svn] r5954 - pypy/trunk/doc
Message-ID: <20040813161029.66BE55A958@thoth.codespeak.net>
Author: lac
Date: Fri Aug 13 18:10:28 2004
New Revision: 5954
Modified:
pypy/trunk/doc/goals.txt
Log:
Ok, perhaps this is the way you are supposed to refer to another file.
Modified: pypy/trunk/doc/goals.txt
==============================================================================
--- pypy/trunk/doc/goals.txt (original)
+++ pypy/trunk/doc/goals.txt Fri Aug 13 18:10:28 2004
@@ -373,4 +373,4 @@
versions suitable for specialized environments such as small or very large
computing devices.
-.. _cmodules: /pypy/doc/cmodules.txt
\ No newline at end of file
+.. _cmodules: http://codespeak.net/pypy/index.cgi?doc/cmodules.html
\ No newline at end of file
From lac at codespeak.net Fri Aug 13 18:19:59 2004
From: lac at codespeak.net (lac at codespeak.net)
Date: Fri, 13 Aug 2004 18:19:59 +0200 (MEST)
Subject: [pypy-svn] r5955 - pypy/trunk/doc
Message-ID: <20040813161959.32C035A958@thoth.codespeak.net>
Author: lac
Date: Fri Aug 13 18:19:59 2004
New Revision: 5955
Modified:
pypy/trunk/doc/cmodules.txt
Log:
see if we get this to format nicely. will probably take another round ...
Modified: pypy/trunk/doc/cmodules.txt
==============================================================================
--- pypy/trunk/doc/cmodules.txt (original)
+++ pypy/trunk/doc/cmodules.txt Fri Aug 13 18:19:59 2004
@@ -8,42 +8,79 @@
otherwise.
_bisectmodule - already exists
+
_codecsmodule
+
_csv - already exists?
+
_heapqmodule - already exists
+
_hotshot
+
_localemodule
+
_randommodule
+
_sre - already exists?
+
_weakref
+
arraymodule
+
audioop
+
binascii
+
cPickle - already exists
+
cStringIO - already exists
+
cgensupport
+
cmathmodule
+
collectionsmodule
+
cryptmodule
+
datetimemodule - already exists
+
gcmodule
+
imageop
+
imgfile
+
itertoolsmodule
+
mathmodule
+
md5module
+
operator
+
parsermodule
+
rgbimgmodule
+
sgimodule
+
shamodule
+
stropmodule
+
structmodule
+
symtablemodule
+
syslogmodule
+
timingmodule
+
unicodedata
+
yuvconvert
+
zipimport
Deprecated
@@ -52,8 +89,11 @@
These modules are deprecated
regexmodule
+
regexpr
+
rotormodule
+
mpzmodule
Links in an external library
@@ -63,27 +103,49 @@
from scratch is really not practical.
_bsddb
+
_curses_panel
+
_cursesmodule
+
_ssl
+
_tkinter
+
almodule
+
bsddbmodule
+
bz2module
+
cdmodule
+
clmodule
+
dbmmodule
+
flmodule
+
fmmodule
+
gdbmmodule
+
glmodule
+
nismodule
+
puremodule
+
pyexpat
+
readline (replace with pyrepl?)
+
svmodule
+
termios
+
tkappinit
+
zlibmodule
System specific
@@ -97,20 +159,37 @@
operating systems.
dlmodule
+
errnomodule
+
fcntlmodule
+
fpectlmodule
+
fpetestmodule
+
grpmodule
+
linuxaudiodev
+
mmapmodule
+
ossaudiodev
+
posixmodule
+
pwdmodule
+
resource
+
selectmodule
+
signalmodule
+
socketmodule
+
sunaudiodev
+
threadmodule
+
timemodule
From arigo at codespeak.net Fri Aug 13 18:30:53 2004
From: arigo at codespeak.net (arigo at codespeak.net)
Date: Fri, 13 Aug 2004 18:30:53 +0200 (MEST)
Subject: [pypy-svn] r5956 - pypy/trunk/src/goal/translate_pypy
Message-ID: <20040813163053.61E4B5A958@thoth.codespeak.net>
Author: arigo
Date: Fri Aug 13 18:30:52 2004
New Revision: 5956
Added:
pypy/trunk/src/goal/translate_pypy/cdef.html
Modified:
pypy/trunk/src/goal/translate_pypy/graphserver.py
pypy/trunk/src/goal/translate_pypy/index.html
Log:
Showing the Classdefs after annotation in the HTTP server.
Added: pypy/trunk/src/goal/translate_pypy/cdef.html
==============================================================================
--- (empty file)
+++ pypy/trunk/src/goal/translate_pypy/cdef.html Fri Aug 13 18:30:52 2004
@@ -0,0 +1,32 @@
+
+
+
+
+
+%(classdef.cls.__module__)s.%(classdef.cls.__name__)s
+
+%(
+if classdef.basedef in t.annotator.getuserclassdefinitions():
+ print 'Parent class %s.
' % (
+ t.annotator.getuserclassdefinitions().index(classdef.basedef),
+ classdef.basedef.cls.__name__)
+)s
+
+Revision %(classdef.revision)d.
+
+Attributes and methods
+
+%(
+attrs = classdef.attrs.items()
+attrs.sort()
+for name, s_value in attrs:
+ print " "
+ print "%s" % htmlquote(name)
+ print " | "
+ print "%s " % htmlquote(repr(s_value))
+ print " |
"
+)s
+
+
+
+
Modified: pypy/trunk/src/goal/translate_pypy/graphserver.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy/graphserver.py (original)
+++ pypy/trunk/src/goal/translate_pypy/graphserver.py Fri Aug 13 18:30:52 2004
@@ -75,11 +75,21 @@
data += '