[pypy-svn] r67005 - pypy/branch/pyjitpl5/pypy/interpreter

cfbolz at codespeak.net cfbolz at codespeak.net
Wed Aug 19 21:52:06 CEST 2009


Author: cfbolz
Date: Wed Aug 19 21:52:05 2009
New Revision: 67005

Modified:
   pypy/branch/pyjitpl5/pypy/interpreter/gateway.py
   pypy/branch/pyjitpl5/pypy/interpreter/typedef.py
Log:
(pedronis, cfbolz): sprinkle sprinkle little star


Modified: pypy/branch/pyjitpl5/pypy/interpreter/gateway.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/gateway.py	(original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/gateway.py	Wed Aug 19 21:52:05 2009
@@ -533,6 +533,7 @@
 # (verbose) performance hack below
 
 class BuiltinCodePassThroughArguments0(BuiltinCode):
+    _immutable_ = True
 
     def funcrun(self, func, args):
         space = func.space
@@ -557,6 +558,7 @@
         return w_result
 
 class BuiltinCodePassThroughArguments1(BuiltinCode):
+    _immutable_ = True
     fast_natural_arity = -1
 
     def funcrun_obj(self, func, w_obj, args):
@@ -582,10 +584,10 @@
         return w_result
 
 class BuiltinCode0(BuiltinCode):
+    _immutable_ = True
     fast_natural_arity = 0
     
     def fastcall_0(self, space, w_func):
-        #self = hint(self, deepfreeze=True)
         try:
             w_result = self.fastfunc_0(space)
         except KeyboardInterrupt: 
@@ -602,10 +604,10 @@
         return w_result
 
 class BuiltinCode1(BuiltinCode):
+    _immutable_ = True
     fast_natural_arity = 1
     
     def fastcall_1(self, space, w_func, w1):
-        #self = hint(self, deepfreeze=True)
         try:
             w_result = self.fastfunc_1(space, w1)
         except KeyboardInterrupt: 
@@ -627,10 +629,10 @@
         return w_result
 
 class BuiltinCode2(BuiltinCode):
+    _immutable_ = True
     fast_natural_arity = 2
     
     def fastcall_2(self, space, w_func, w1, w2):
-        #self = hint(self, deepfreeze=True)
         try:
             w_result = self.fastfunc_2(space, w1, w2)
         except KeyboardInterrupt: 
@@ -652,10 +654,10 @@
         return w_result
 
 class BuiltinCode3(BuiltinCode):
+    _immutable_ = True
     fast_natural_arity = 3
     
     def fastcall_3(self, space, func, w1, w2, w3):
-        #self = hint(self, deepfreeze=True)
         try:
             w_result = self.fastfunc_3(space, w1, w2, w3)
         except KeyboardInterrupt: 
@@ -677,10 +679,10 @@
         return w_result
 
 class BuiltinCode4(BuiltinCode):
+    _immutable_ = True
     fast_natural_arity = 4
     
     def fastcall_4(self, space, func, w1, w2, w3, w4):
-        #self = hint(self, deepfreeze=True)
         try:
             w_result = self.fastfunc_4(space, w1, w2, w3, w4)
         except KeyboardInterrupt: 

Modified: pypy/branch/pyjitpl5/pypy/interpreter/typedef.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/interpreter/typedef.py	(original)
+++ pypy/branch/pyjitpl5/pypy/interpreter/typedef.py	Wed Aug 19 21:52:05 2009
@@ -11,6 +11,7 @@
 from pypy.tool.sourcetools import compile2, func_with_new_name
 from pypy.rlib.objectmodel import instantiate
 from pypy.rlib.rarithmetic import intmask
+from pypy.rlib.jit import hint
 
 class TypeDef:
     def __init__(self, __name, __base=None, **rawdict):
@@ -225,7 +226,7 @@
     if "user" in features:     # generic feature needed by all subcls
         class Proto(object):
             def getclass(self, space):
-                return self.w__class__
+                return hint(self.w__class__, promote=True)
 
             def setclass(self, space, w_subtype):
                 # only used by descr_set___class__



More information about the Pypy-commit mailing list