提交 2e2081fc authored 作者: Ian Goodfellow's avatar Ian Goodfellow

inlined _build_doort_impact

上级 95b0c9a0
......@@ -727,11 +727,6 @@ class DestroyHandler(toolbox.Bookkeeper):
(see docstrings for these properties above)
"""
if self.stale_droot:
self.droot, self.impact, self.root_destroyer = self._build_droot_impact()
self.stale_droot = False
return self.droot, self.impact, self.root_destroyer
def _build_droot_impact(self):
droot = {} # destroyed view + nonview variables -> foundation
impact = {} # destroyed nonview variable -> it + all views of it
root_destroyer = {} # root -> destroyer apply
......@@ -747,8 +742,6 @@ class DestroyHandler(toolbox.Bookkeeper):
raise InconsistencyError("Multiple destroyers of %s" % input_root)
droot[input_root] = input_root
root_destroyer[input_root] = app
#input_impact = set([input_root])
#add_impact(input_root, self.view_o, input_impact)
input_impact = get_impact(input_root, self.view_o)
for v in input_impact:
assert v not in droot
......@@ -756,8 +749,9 @@ class DestroyHandler(toolbox.Bookkeeper):
impact[input_root] = input_impact
impact[input_root].add(input_root)
return droot, impact, root_destroyer
self.droot, self.impact, self.root_destroyer = droot, impact, root_destroyer
self.stale_droot = False
return self.droot, self.impact, self.root_destroyer
def on_detach(self, fgraph):
if fgraph is not self.fgraph:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论