本文整理匯總了Python中rpython.jit.metainterp.history.TreeLoop._jitcelltoken方法的典型用法代碼示例。如果您正苦於以下問題:Python TreeLoop._jitcelltoken方法的具體用法?Python TreeLoop._jitcelltoken怎麽用?Python TreeLoop._jitcelltoken使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rpython.jit.metainterp.history.TreeLoop
的用法示例。
在下文中一共展示了TreeLoop._jitcelltoken方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: build_random_loop
# 需要導入模塊: from rpython.jit.metainterp.history import TreeLoop [as 別名]
# 或者: from rpython.jit.metainterp.history.TreeLoop import _jitcelltoken [as 別名]
def build_random_loop(self, cpu, builder_factory, r, startvars,
allow_delay):
loop = TreeLoop('test_random_function')
loop.inputargs = startvars[:]
loop.operations = []
loop._jitcelltoken = JitCellToken()
builder = builder_factory(cpu, loop, startvars[:])
if allow_delay:
needs_a_label = True
else:
self.insert_label(loop, 0, r)
needs_a_label = False
self.generate_ops(builder, r, loop, startvars, needs_a_label=needs_a_label)
self.builder = builder
self.loop = loop
dump(loop)
cpu.compile_loop(loop.inputargs, loop.operations, loop._jitcelltoken)
if self.output:
builder.print_loop(self.output)