本文整理汇总了Python中pypy.jit.metainterp.warmstate.WarmEnterState.make_entry_point方法的典型用法代码示例。如果您正苦于以下问题:Python WarmEnterState.make_entry_point方法的具体用法?Python WarmEnterState.make_entry_point怎么用?Python WarmEnterState.make_entry_point使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pypy.jit.metainterp.warmstate.WarmEnterState
的用法示例。
在下文中一共展示了WarmEnterState.make_entry_point方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_enter_function
# 需要导入模块: from pypy.jit.metainterp.warmstate import WarmEnterState [as 别名]
# 或者: from pypy.jit.metainterp.warmstate.WarmEnterState import make_entry_point [as 别名]
def make_enter_function(self):
from pypy.jit.metainterp.warmstate import WarmEnterState
state = WarmEnterState(self)
maybe_compile_and_run = state.make_entry_point()
self.state = state
def crash_in_jit(e):
if not we_are_translated():
print "~~~ Crash in JIT!"
print '~~~ %s: %s' % (e.__class__, e)
if sys.stdout == sys.__stdout__:
import pdb; pdb.post_mortem(sys.exc_info()[2])
raise
fatalerror('~~~ Crash in JIT! %s' % (e,), traceback=True)
crash_in_jit._dont_inline_ = True
if self.translator.rtyper.type_system.name == 'lltypesystem':
def maybe_enter_jit(*args):
try:
maybe_compile_and_run(*args)
except JitException:
raise # go through
except Exception, e:
crash_in_jit(e)
maybe_enter_jit._always_inline_ = True
示例2: make_enter_function
# 需要导入模块: from pypy.jit.metainterp.warmstate import WarmEnterState [as 别名]
# 或者: from pypy.jit.metainterp.warmstate.WarmEnterState import make_entry_point [as 别名]
def make_enter_function(self, jd):
from pypy.jit.metainterp.warmstate import WarmEnterState
state = WarmEnterState(self, jd)
maybe_compile_and_run = state.make_entry_point()
jd.warmstate = state
def crash_in_jit(e):
tb = not we_are_translated() and sys.exc_info()[2]
try:
raise e
except JitException:
raise # go through
except MemoryError:
raise # go through
except StackOverflow:
raise # go through
except Exception, e:
if not we_are_translated():
print "~~~ Crash in JIT!"
print '~~~ %s: %s' % (e.__class__, e)
if sys.stdout == sys.__stdout__:
import pdb; pdb.post_mortem(tb)
raise e.__class__, e, tb
fatalerror('~~~ Crash in JIT! %s' % (e,), traceback=True)