Author: Manuel Jacob
Branch: py3k
Changeset: r62152:8b8e895b4fcb
Date: 2013-03-07 00:53 +0100
http://bitbucket.org/pypy/pypy/changeset/8b8e895b4fcb/
Log: Remove py3k attribute from base object space. It's not necessary
anymore because the flow object space is independent from the
interpreter now.
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -295,8 +295,6 @@
"""Base class for the interpreter-level implementations of object spaces.
http://pypy.readthedocs.org/en/latest/objspace.html"""
- py3k = True # are we interpreting py3k bytecode?
-
def __init__(self, config=None):
"NOT_RPYTHON: Basic initialization of objects."
self.fromcache = InternalSpaceCache(self).getorbuild
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -534,7 +534,6 @@
self.setdictscope(w_locals)
def POP_EXCEPT(self, oparg, next_instr):
- assert self.space.py3k
block = self.pop_block()
block.cleanup(self)
return
@@ -1327,14 +1326,12 @@
# the stack setup is slightly different than in CPython:
# instead of the traceback, we store the unroller object,
# wrapped.
- if frame.space.py3k:
- # this is popped by POP_EXCEPT, which is present only in py3k
- w_last_exception = W_OperationError(frame.last_exception)
- w_last_exception = frame.space.wrap(w_last_exception)
- frame.pushvalue(w_last_exception)
- block = ExceptHandlerBlock(self.valuestackdepth,
- 0, frame.lastblock)
- frame.lastblock = block
+ # this is popped by POP_EXCEPT, which is present only in py3k
+ w_last_exception = W_OperationError(frame.last_exception)
+ w_last_exception = frame.space.wrap(w_last_exception)
+ frame.pushvalue(w_last_exception)
+ block = ExceptHandlerBlock(self.valuestackdepth, 0, frame.lastblock)
+ frame.lastblock = block
frame.pushvalue(frame.space.wrap(unroller))
frame.pushvalue(operationerr.get_w_value(frame.space))
frame.pushvalue(operationerr.w_type)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit