[pypy-svn] r27081 - in pypy/dist/pypy: objspace/std translator/goal
arigo at codespeak.net
arigo at codespeak.net
Thu May 11 16:54:03 CEST 2006
Author: arigo
Date: Thu May 11 16:54:01 2006
New Revision: 27081
Modified:
pypy/dist/pypy/objspace/std/multimethod.py
pypy/dist/pypy/translator/goal/targetpypystandalone.py
Log:
So far, multimethod.py uses the InstallerVersion1 by default
because it is much faster both to initialize and run on top of CPython.
The InstallerVersion2 is optimized for making a translator-friendly
structure. So we patch it in-place from targetpypystandalone...
That's temporary, hopefully.
Modified: pypy/dist/pypy/objspace/std/multimethod.py
==============================================================================
--- pypy/dist/pypy/objspace/std/multimethod.py (original)
+++ pypy/dist/pypy/objspace/std/multimethod.py Thu May 11 16:54:01 2006
@@ -570,7 +570,7 @@
def __init__(self, multimethod, prefix, list_of_typeorders,
baked_perform_call=True, base_typeorder=None):
- print 'InstallerVersion2:', prefix
+ #print 'InstallerVersion2:', prefix
self.multimethod = multimethod
self.prefix = prefix
self.list_of_typeorders = list_of_typeorders
@@ -727,4 +727,4 @@
# ____________________________________________________________
# Selection of the version to use
-Installer = InstallerVersion1
+Installer = InstallerVersion1 # modified by translate.py targetpypystandalone
Modified: pypy/dist/pypy/translator/goal/targetpypystandalone.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetpypystandalone.py (original)
+++ pypy/dist/pypy/translator/goal/targetpypystandalone.py Thu May 11 16:54:01 2006
@@ -1,4 +1,12 @@
import os, sys
+
+# as of revision 27081, multimethod.py uses the InstallerVersion1 by default
+# because it is much faster both to initialize and run on top of CPython.
+# The InstallerVersion2 is optimized for making a translator-friendly
+# structure. So we patch here...
+from pypy.objspace.std import multimethod
+multimethod.Installer = multimethod.InstallerVersion2
+
from pypy.objspace.std.objspace import StdObjSpace
# XXX from pypy.annotation.model import *
# since we are execfile()'ed this would pull some
@@ -9,10 +17,6 @@
from pypy.interpreter.error import OperationError
from pypy.translator.goal.ann_override import PyPyAnnotatorPolicy
-# WARNING: this requires the annotator.
-# There is no easy way to build all caches manually,
-# but the annotator can do it for us for free.
-
try:
this_dir = os.path.dirname(__file__)
except NameError:
More information about the Pypy-commit
mailing list