Exemplo n.º 1
0
 def replace_force_quasiimmut_with_direct_call(self, op):
     ARG = op.args[0].concretetype
     mutatefieldname = op.args[1].value
     key = (ARG, mutatefieldname)
     if key in self._cache_force_quasiimmed_funcs:
         cptr = self._cache_force_quasiimmed_funcs[key]
     else:
         from rpython.jit.metainterp import quasiimmut
         func = quasiimmut.make_invalidation_function(ARG, mutatefieldname)
         FUNC = lltype.Ptr(lltype.FuncType([ARG], lltype.Void))
         llptr = self.helper_func(FUNC, func)
         cptr = Constant(llptr, FUNC)
         self._cache_force_quasiimmed_funcs[key] = cptr
     op.opname = 'direct_call'
     op.args = [cptr, op.args[0]]
Exemplo n.º 2
0
 def replace_force_quasiimmut_with_direct_call(self, op):
     ARG = op.args[0].concretetype
     mutatefieldname = op.args[1].value
     key = (ARG, mutatefieldname)
     if key in self._cache_force_quasiimmed_funcs:
         cptr = self._cache_force_quasiimmed_funcs[key]
     else:
         from rpython.jit.metainterp import quasiimmut
         func = quasiimmut.make_invalidation_function(ARG, mutatefieldname)
         FUNC = lltype.Ptr(lltype.FuncType([ARG], lltype.Void))
         llptr = self.helper_func(FUNC, func)
         cptr = Constant(llptr, FUNC)
         self._cache_force_quasiimmed_funcs[key] = cptr
     op.opname = 'direct_call'
     op.args = [cptr, op.args[0]]