提交 86373ce9 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Make new VM_Linker with same options as the old one

上级 6d33775d
...@@ -32,7 +32,7 @@ class T_bunch_of_modes(unittest.TestCase): ...@@ -32,7 +32,7 @@ class T_bunch_of_modes(unittest.TestCase):
# test that it runs something # test that it runs something
f([[1, 2], [3, 4]], [5, 6]) f([[1, 2], [3, 4]], [5, 6])
linker_classes_involved.append(f.maker.mode.linker.__class__) linker_classes_involved.append(f.maker.mode.linker.__class__)
# print 'MODE:', mode, f.maker.mode.linker, 'stop' #print 'MODE:', mode, f.maker.mode.linker, 'stop'
# regression check: # regression check:
# there should be # there should be
# - VM_Linker # - VM_Linker
......
...@@ -548,7 +548,12 @@ class VM_Linker(link.LocalLinker): ...@@ -548,7 +548,12 @@ class VM_Linker(link.LocalLinker):
if no_recycling is None: if no_recycling is None:
no_recycling = [] no_recycling = []
if self.fgraph is not None and self.fgraph is not fgraph: if self.fgraph is not None and self.fgraph is not fgraph:
return type(self)().accept(fgraph, no_recycling) return type(self)(
allow_gc=self.allow_gc,
use_cloop=self.use_cloop,
callback=self.callback,
lazy=self.lazy
).accept(fgraph, no_recycling)
self.fgraph = fgraph self.fgraph = fgraph
self.no_recycling = no_recycling self.no_recycling = no_recycling
return self return self
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论