[pypy-svn] r13089 - in pypy/branch/pypy-translation-snapshot: interpreter module/sys objspace/std

pedronis at codespeak.net pedronis at codespeak.net
Mon Jun 6 05:30:18 CEST 2005


Author: pedronis
Date: Mon Jun  6 05:30:14 2005
New Revision: 13089

Modified:
   pypy/branch/pypy-translation-snapshot/interpreter/compiler.py
   pypy/branch/pypy-translation-snapshot/interpreter/error.py
   pypy/branch/pypy-translation-snapshot/interpreter/miscutils.py
   pypy/branch/pypy-translation-snapshot/interpreter/pyframe.py
   pypy/branch/pypy-translation-snapshot/interpreter/typedef.py
   pypy/branch/pypy-translation-snapshot/module/sys/state.py
   pypy/branch/pypy-translation-snapshot/objspace/std/fake.py
   pypy/branch/pypy-translation-snapshot/objspace/std/objspace.py
Log:
merging new override/specialization markup from trunk



Modified: pypy/branch/pypy-translation-snapshot/interpreter/compiler.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/compiler.py	(original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/compiler.py	Mon Jun  6 05:30:14 2005
@@ -112,6 +112,7 @@
             raise OperationError(space.w_TypeError,space.wrap(str(e)))
         from pypy.interpreter.pycode import PyCode
         return space.wrap(PyCode(space)._from_code(c))
+    compile._annspecialcase_ = "override:cpy_compile"
 
     def getcodeflags(self, code):
         from pypy.interpreter.pycode import PyCode

Modified: pypy/branch/pypy-translation-snapshot/interpreter/error.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/error.py	(original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/error.py	Mon Jun  6 05:30:14 2005
@@ -70,6 +70,7 @@
         application."""
         if RECORD_INTERPLEVEL_TRACEBACK:
             self.debug_excs.append(sys.exc_info())
+    record_interpreter_traceback._annspecialcase_ = "override:ignore"
 
     def print_application_traceback(self, space, file=None):
         "NOT_RPYTHON: Dump a standard application-level traceback."

Modified: pypy/branch/pypy-translation-snapshot/interpreter/miscutils.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/miscutils.py	(original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/miscutils.py	Mon Jun  6 05:30:14 2005
@@ -8,7 +8,7 @@
 class Stack:
     """Utility class implementing a stack."""
 
-    _specialize_ = 'location' # polymorphic
+    _annspecialcase_ = "specialize:ctr_location" # polymorphic
 
     def __init__(self):
         self.items = []

Modified: pypy/branch/pypy-translation-snapshot/interpreter/pyframe.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/pyframe.py	(original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/pyframe.py	Mon Jun  6 05:30:14 2005
@@ -19,6 +19,7 @@
    """NOT_RPYTHON"""
    import sys
    return sys.exc_info()[2]   
+cpython_tb._annspecialcase_ = "override:ignore"
 
 class PyFrame(eval.Frame):
     """Represents a frame for a regular Python function

Modified: pypy/branch/pypy-translation-snapshot/interpreter/typedef.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/typedef.py	(original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/typedef.py	Mon Jun  6 05:30:14 2005
@@ -33,7 +33,7 @@
         subcls = _buildusercls(cls, hasdict, wants_slots)
         subclass_cache[key] = subcls
         return subcls
-get_unique_interplevel_subclass._specialize_ = "memo"
+get_unique_interplevel_subclass._annspecialcase_ = "specialize:memo"
 
 def _buildusercls(cls, hasdict, wants_slots):
     "NOT_RPYTHON: initialization-time only"
@@ -109,6 +109,7 @@
         return object.__new__(cls)
     else:
         return new.instance(cls)
+instantiate._annspecialcase_ = "override:instantiate"
 
 def make_descr_typecheck_wrapper(func, extraargs=(), cls=None):
     if func is None:

Modified: pypy/branch/pypy-translation-snapshot/module/sys/state.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/module/sys/state.py	(original)
+++ pypy/branch/pypy-translation-snapshot/module/sys/state.py	Mon Jun  6 05:30:14 2005
@@ -80,6 +80,7 @@
     """NOT_RPYTHON"""
     from pypy.tool.udir import udir
     return space.wrap(str(udir))
+pypy_getudir._annspecialcase_ = "override:ignore"
 
 def getdefaultencoding(space): 
     return space.wrap(sys.getdefaultencoding())

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	Mon Jun  6 05:30:14 2005
@@ -17,7 +17,7 @@
         return space.gettypeobject(ft.typedef)
     ft = fake_type(type(x))
     return ft(space, x)
-
+fake_object._annspecialcase_ = "override:fake_object"
 
 import sys
 
@@ -43,6 +43,7 @@
         w_exc = space.wrap(exc)
         w_value = space.wrap(value)
     raise OperationError, OperationError(w_exc, w_value), tb
+wrap_exception._annspecialcase_ = "override:ignore"
 
 def fake_type(cpy_type):
     assert type(cpy_type) is type

Modified: pypy/branch/pypy-translation-snapshot/objspace/std/objspace.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/objspace/std/objspace.py	(original)
+++ pypy/branch/pypy-translation-snapshot/objspace/std/objspace.py	Mon Jun  6 05:30:14 2005
@@ -234,7 +234,7 @@
         from fake import fake_object
         return fake_object(self, x)
 
-    wrap._specialize_ = "argtypes"
+    wrap._annspecialcase_ = "specialize:argtype1"
 
     def wrap_exception_cls(self, x):
         """NOT_RPYTHON"""
@@ -242,6 +242,7 @@
             w_result = getattr(self, 'w_' + x.__name__)            
             return w_result
         return None
+    wrap_exception_cls._annspecialcase_ = "override:wrap_exception_cls"
         
     def unwrap(self, w_obj):
         if isinstance(w_obj, BaseWrappable):
@@ -320,8 +321,7 @@
             instance.user_setup(self, w_subtype, w_subtype.nslots)
         assert isinstance(instance, cls)
         return instance
-    allocate_instance._specialize_ = "location"
-            
+    allocate_instance._annspecialcase_ = "specialize:arg1"
 
     def unpacktuple(self, w_tuple, expected_length=-1):
         assert isinstance(w_tuple, W_TupleObject)



More information about the Pypy-commit mailing list