Commits

Maciej Fijalkowski committed 68c4c8d

small cleanup here

  • Participants
  • Parent commits 222ce19
  • Branches remove-globals-in-jit

Comments (0)

Files changed (1)

File pypy/rpython/annlowlevel.py

 The code needed to flow and annotate low-level helpers -- the ll_*() functions
 """
 
-import types
 from pypy.tool.sourcetools import valid_identifier
 from pypy.annotation import model as annmodel
 from pypy.annotation.policy import AnnotatorPolicy, Sig
 from pypy.objspace.flow.model import Constant
 from pypy.translator.simplify import get_functype
 from pypy.rpython.rmodel import warning
+from pypy.rlib.objectmodel import specialize
 
 class KeyComp(object):
     def __init__(self, val):
     else:
         raise NotImplementedError("cast_object_to_ptr(%r, ...)" % PTR)
 
+@specialize.argtype(0)
 def cast_instance_to_base_ptr(instance):
     return cast_object_to_ptr(base_ptr_lltype(), instance)
-cast_instance_to_base_ptr._annspecialcase_ = 'specialize:argtype(0)'
 
+@specialize.argtype(0)
 def cast_instance_to_base_obj(instance):
     return cast_object_to_ptr(base_obj_ootype(), instance)
-cast_instance_to_base_obj._annspecialcase_ = 'specialize:argtype(0)'
 
 def base_ptr_lltype():
     from pypy.rpython.lltypesystem.rclass import OBJECTPTR