本文整理汇总了Python中pypy.translator.c.database.LowLevelDatabase.getcontainernode方法的典型用法代码示例。如果您正苦于以下问题:Python LowLevelDatabase.getcontainernode方法的具体用法?Python LowLevelDatabase.getcontainernode怎么用?Python LowLevelDatabase.getcontainernode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pypy.translator.c.database.LowLevelDatabase
的用法示例。
在下文中一共展示了LowLevelDatabase.getcontainernode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build_database
# 需要导入模块: from pypy.translator.c.database import LowLevelDatabase [as 别名]
# 或者: from pypy.translator.c.database.LowLevelDatabase import getcontainernode [as 别名]
def build_database(self):
translator = self.translator
gcpolicyclass = self.get_gcpolicyclass()
if self.config.translation.gcrootfinder == "asmgcc":
if not self.standalone:
raise NotImplementedError("--gcrootfinder=asmgcc requires standalone")
if self.config.translation.stackless:
if not self.standalone:
raise Exception("stackless: only for stand-alone builds")
from pypy.translator.stackless.transform import StacklessTransformer
stacklesstransformer = StacklessTransformer(
translator, self.originalentrypoint,
stackless_gc=gcpolicyclass.requires_stackless)
self.entrypoint = stacklesstransformer.slp_entry_point
else:
stacklesstransformer = None
db = LowLevelDatabase(translator, standalone=self.standalone,
gcpolicyclass=gcpolicyclass,
stacklesstransformer=stacklesstransformer,
thread_enabled=self.config.translation.thread,
sandbox=self.config.translation.sandbox)
self.db = db
# give the gc a chance to register interest in the start-up functions it
# need (we call this for its side-effects of db.get())
list(db.gcpolicy.gc_startup_code())
# build entrypoint and eventually other things to expose
pf = self.getentrypointptr()
if isinstance(pf, list):
for one_pf in pf:
db.get(one_pf)
self.c_entrypoint_name = None
else:
pfname = db.get(pf)
for func, _ in self.secondary_entrypoints:
bk = translator.annotator.bookkeeper
db.get(getfunctionptr(bk.getdesc(func).getuniquegraph()))
self.c_entrypoint_name = pfname
for obj in exports.EXPORTS_obj2name.keys():
db.getcontainernode(obj)
exports.clear()
db.complete()
self.collect_compilation_info(db)
return db