本文整理汇总了Python中pypy.jit.metainterp.warmstate.WarmEnterState.can_never_inline方法的典型用法代码示例。如果您正苦于以下问题:Python WarmEnterState.can_never_inline方法的具体用法?Python WarmEnterState.can_never_inline怎么用?Python WarmEnterState.can_never_inline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pypy.jit.metainterp.warmstate.WarmEnterState
的用法示例。
在下文中一共展示了WarmEnterState.can_never_inline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_make_jitdriver_callbacks_5
# 需要导入模块: from pypy.jit.metainterp.warmstate import WarmEnterState [as 别名]
# 或者: from pypy.jit.metainterp.warmstate.WarmEnterState import can_never_inline [as 别名]
def test_make_jitdriver_callbacks_5():
def can_never_inline(x, y):
assert x == 5
assert y == 42.5
return True
CAN_NEVER_INLINE = lltype.Ptr(lltype.FuncType([lltype.Signed, lltype.Float], lltype.Bool))
class FakeWarmRunnerDesc:
rtyper = None
cpu = None
memory_manager = None
class FakeJitDriverSD:
jitdriver = None
_green_args_spec = [lltype.Signed, lltype.Float]
_get_printable_location_ptr = None
_confirm_enter_jit_ptr = None
_can_never_inline_ptr = llhelper(CAN_NEVER_INLINE, can_never_inline)
_get_jitcell_at_ptr = None
_should_unroll_one_iteration_ptr = None
red_args_types = []
state = WarmEnterState(FakeWarmRunnerDesc(), FakeJitDriverSD())
state.make_jitdriver_callbacks()
res = state.can_never_inline(5, 42.5)
assert res is True