[pypy-svn] r14181 - in pypy/branch/pypy-translation-snapshot: interpreter objspace/std
arigo at codespeak.net
arigo at codespeak.net
Sun Jul 3 20:14:25 CEST 2005
Author: arigo
Date: Sun Jul 3 20:14:24 2005
New Revision: 14181
Modified:
pypy/branch/pypy-translation-snapshot/interpreter/eval.py
pypy/branch/pypy-translation-snapshot/interpreter/gateway.py
pypy/branch/pypy-translation-snapshot/objspace/std/fake.py
Log:
Port rev 14180 from the trunk to the snapshot branch.
Modified: pypy/branch/pypy-translation-snapshot/interpreter/eval.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/eval.py (original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/eval.py Sun Jul 3 20:14:24 2005
@@ -9,6 +9,7 @@
class Code(Wrappable):
"""A code is a compiled version of some source code.
Abstract base class."""
+ hidden_applevel = False
def __init__(self, co_name):
self.co_name = co_name
Modified: pypy/branch/pypy-translation-snapshot/interpreter/gateway.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/gateway.py (original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/gateway.py Sun Jul 3 20:14:24 2005
@@ -332,6 +332,7 @@
class BuiltinCode(eval.Code):
"The code object implementing a built-in (interpreter-level) hook."
+ hidden_applevel = True
# When a BuiltinCode is stored in a Function object,
# you get the functionality of CPython's built-in function type.
Modified: pypy/branch/pypy-translation-snapshot/objspace/std/fake.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/objspace/std/fake.py (original)
+++ pypy/branch/pypy-translation-snapshot/objspace/std/fake.py Sun Jul 3 20:14:24 2005
@@ -142,13 +142,17 @@
self.unwrappedargs = self.space.unwrap(w_args)
self.unwrappedkwds = self.space.unwrap(w_kwds)
except UnwrapError, e:
- raise UnwrapError('calling %s: %s' % (self.code.cpy_callable, e))
+ code = self.code
+ assert isinstance(code, CPythonFakeCode)
+ raise UnwrapError('calling %s: %s' % (code.cpy_callable, e))
def getfastscope(self):
raise OperationError(self.space.w_TypeError,
self.space.wrap("cannot get fastscope of a CPythonFakeFrame"))
def run(self):
- fn = self.code.cpy_callable
+ code = self.code
+ assert isinstance(code, CPythonFakeCode)
+ fn = code.cpy_callable
try:
result = apply(fn, self.unwrappedargs, self.unwrappedkwds)
except:
More information about the Pypy-commit
mailing list