[pypy-svn] r23191 - in pypy/dist/pypy/interpreter: . pyparser/test
pedronis at codespeak.net
pedronis at codespeak.net
Fri Feb 10 02:38:44 CET 2006
Author: pedronis
Date: Fri Feb 10 02:38:41 2006
New Revision: 23191
Modified:
pypy/dist/pypy/interpreter/pyopcode.py
pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py
Log:
use our own opcode from lib-python (otherwise compiling on top of 2.3 funny things occured
with microbench.py)
Modified: pypy/dist/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyopcode.py (original)
+++ pypy/dist/pypy/interpreter/pyopcode.py Fri Feb 10 02:38:41 2006
@@ -14,7 +14,17 @@
from pypy.tool.sourcetools import func_with_new_name
from pypy.rpython.objectmodel import we_are_translated
from pypy.rpython.rarithmetic import intmask
-import opcode as pythonopcode # FIXME Needs to be *our* opcode module
+
+# load opcode.py as pythonopcode from our own lib
+def load_opcode():
+ import new, py
+ global pythonopcode
+ pythonopcode = new.module('opcode')
+ opcode_path = py.path.local(__file__).dirpath().dirpath().dirpath('lib-python/2.4.1/opcode.py')
+ execfile(str(opcode_path), pythonopcode.__dict__)
+
+load_opcode()
+
def unaryoperation(operationname):
"""NOT_RPYTHON"""
Modified: pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py (original)
+++ pypy/dist/pypy/interpreter/pyparser/test/stdlib_testall.py Fri Feb 10 02:38:41 2006
@@ -1,6 +1,6 @@
import autopath
import py
-from test_astcompiler import check_compile
+from test_astcompiler import compile_with_astcompiler
def setup_module(mod):
import sys
@@ -12,8 +12,8 @@
def check_file_compile(filename):
print 'Compiling:', filename
source = open(filename).read()
- check_compile(source, 'exec', quiet=True, space=std_space)
-
+ #check_compile(source, 'exec', quiet=True, space=std_space)
+ compile_with_astcompiler(source, target='exec', space=std_space)
def test_all():
p = py.path.local(autopath.pypydir).dirpath().join('lib-python', '2.4.1')
More information about the Pypy-commit
mailing list