[pypy-svn] r7493 - in pypy/trunk/src/pypy: interpreter objspace/flow objspace/std
arigo at codespeak.net
arigo at codespeak.net
Sat Nov 20 11:06:03 CET 2004
Author: arigo
Date: Sat Nov 20 11:06:02 2004
New Revision: 7493
Modified:
pypy/trunk/src/pypy/interpreter/baseobjspace.py
pypy/trunk/src/pypy/objspace/flow/objspace.py
pypy/trunk/src/pypy/objspace/std/objspace.py
Log:
Some more NOT_RPYTHON annotations. Now classes can have this tag in their
docstring, too, to mean that it's bad if we see the class at all during
translation.
Modified: pypy/trunk/src/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/baseobjspace.py (original)
+++ pypy/trunk/src/pypy/interpreter/baseobjspace.py Sat Nov 20 11:06:02 2004
@@ -32,12 +32,13 @@
full_exceptions = True # full support for exceptions (normalization & more)
def __init__(self):
- "Basic initialization of objects."
+ "NOT_RPYTHON: Basic initialization of objects."
self._gatewaycache = Cache()
# sets all the internal descriptors
self.initialize()
def make_builtins(self, for_builtins):
+ "NOT_RPYTHON: only for initializing the space."
# initializing builtins may require creating a frame which in
# turn already accesses space.w_builtins, provide a dummy one ...
self.w_builtins = self.newdict([])
@@ -68,6 +69,7 @@
self.sys.setbuiltinmodule(self.w_builtin, '__builtin__')
def make_sys(self):
+ "NOT_RPYTHON: only for initializing the space."
from pypy.interpreter.extmodule import BuiltinModule
assert not hasattr(self, 'sys')
self.sys = BuiltinModule(self, 'sys')
@@ -87,8 +89,8 @@
return w_module
def initialize(self):
- """Abstract method that should put some minimal content into the
- w_builtins."""
+ """NOT_RPYTHON: Abstract method that should put some minimal
+ content into the w_builtins."""
def loadfromcache(self, key, builder, cache):
return cache.getorbuild(key, builder, self)
Modified: pypy/trunk/src/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/objspace.py Sat Nov 20 11:06:02 2004
@@ -13,6 +13,12 @@
# ______________________________________________________________________
class FlowObjSpace(ObjSpace):
+ """NOT_RPYTHON.
+ The flow objspace space is used to produce a flow graph by recording
+ the space operations that the interpreter generates when it interprets
+ (the bytecode of) some function.
+ """
+
full_exceptions = False
def initialize(self):
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 Sat Nov 20 11:06:02 2004
@@ -48,6 +48,7 @@
PACKAGE_PATH = 'objspace.std'
def standard_types(self):
+ "NOT_RPYTHON: only for initializing the space."
class result:
"Import here the types you want to have appear in __builtin__."
@@ -68,6 +69,7 @@
if not key.startswith('_')] # don't look
def clone_exception_hierarchy(self):
+ "NOT_RPYTHON: only for initializing the space."
from pypy.objspace.std.typeobject import W_TypeObject
from pypy.interpreter import gateway
w = self.wrap
@@ -136,6 +138,7 @@
return done
def initialize(self):
+ "NOT_RPYTHON: only for initializing the space."
self._typecache = Cache()
# The object implementations that we want to 'link' into PyPy must be
More information about the Pypy-commit
mailing list