Beispiel #1
0
 def compile_bridge(self, faildescr, inputargs, operations):
     from pypy.jit.backend.cli.method import Method
     op = faildescr._guard_op
     token = faildescr._loop_token
     token.guard2ops[op] = (inputargs, operations)
     self._attach_token_to_faildescrs(token, operations)
     meth = Method(self, token)
     token.funcbox.holder.SetFunc(meth.compile())
     return token
Beispiel #2
0
 def compile_loop(self, inputargs, operations, looptoken):
     from pypy.jit.backend.cli.method import Method, ConstFunction
     name = 'Loop%d' % self.loopcount
     self.loopcount += 1
     cliloop = CliLoop(name, inputargs, operations)
     looptoken.cliloop = cliloop
     cliloop.funcbox = ConstFunction(cliloop.name)
     self._attach_token_to_faildescrs(cliloop, operations)
     meth = Method(self, cliloop)
     cliloop.funcbox.holder.SetFunc(meth.compile())
Beispiel #3
0
 def getmeth(value):
     oldenv = os.environ.get('PYPYJITOPT')
     os.environ['PYPYJITOPT'] = value
     meth = Method.__new__(Method)  # evil hack not to call __init__
     meth.setoptions()
     if oldenv:
         os.environ['PYPYJITOPT'] = oldenv
     else:
         del os.environ['PYPYJITOPT']
     return meth
Beispiel #4
0
 def getmeth(value):
     oldenv = os.environ.get('PYPYJITOPT')
     os.environ['PYPYJITOPT'] = value
     meth = Method.__new__(Method) # evil hack not to call __init__
     meth.setoptions()
     if oldenv:
         os.environ['PYPYJITOPT'] = oldenv
     else:
         del os.environ['PYPYJITOPT']
     return meth