本文整理汇总了Python中pypy.interpreter.baseobjspace.ObjSpace.createexecutioncontext方法的典型用法代码示例。如果您正苦于以下问题:Python ObjSpace.createexecutioncontext方法的具体用法?Python ObjSpace.createexecutioncontext怎么用?Python ObjSpace.createexecutioncontext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pypy.interpreter.baseobjspace.ObjSpace
的用法示例。
在下文中一共展示了ObjSpace.createexecutioncontext方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createexecutioncontext
# 需要导入模块: from pypy.interpreter.baseobjspace import ObjSpace [as 别名]
# 或者: from pypy.interpreter.baseobjspace.ObjSpace import createexecutioncontext [as 别名]
def createexecutioncontext(self):
# add space specific fields to execution context
# note that this method must not call space methods that might need an
# execution context themselves (e.g. nearly all space methods)
ec = ObjSpace.createexecutioncontext(self)
ec._py_repr = None
return ec
示例2: createexecutioncontext
# 需要导入模块: from pypy.interpreter.baseobjspace import ObjSpace [as 别名]
# 或者: from pypy.interpreter.baseobjspace.ObjSpace import createexecutioncontext [as 别名]
def createexecutioncontext(self):
# add space specific fields to execution context
ec = ObjSpace.createexecutioncontext(self)
ec._py_repr = self.newdict()
if self.config.objspace.std.withmethodcache:
SIZE = 1 << self.config.objspace.std.methodcachesizeexp
ec.method_cache_versions = [None] * SIZE
ec.method_cache_names = [None] * SIZE
ec.method_cache_lookup_where = [(None, None)] * SIZE
if self.config.objspace.std.withmethodcachecounter:
ec.method_cache_hits = {}
ec.method_cache_misses = {}
return ec
示例3: createexecutioncontext
# 需要导入模块: from pypy.interpreter.baseobjspace import ObjSpace [as 别名]
# 或者: from pypy.interpreter.baseobjspace.ObjSpace import createexecutioncontext [as 别名]
def createexecutioncontext(self):
# add space specific fields to execution context
# note that this method must not call space methods that might need an
# execution context themselves (e.g. nearly all space methods)
ec = ObjSpace.createexecutioncontext(self)
ec._py_repr = None
if self.config.objspace.std.withmethodcache:
SIZE = 1 << self.config.objspace.std.methodcachesizeexp
ec.method_cache_versions = [None] * SIZE
ec.method_cache_names = [None] * SIZE
ec.method_cache_lookup_where = [(None, None)] * SIZE
if self.config.objspace.std.withmethodcachecounter:
ec.method_cache_hits = {}
ec.method_cache_misses = {}
return ec