[BACKEND] float division is now approximate by default (#446)

This commit is contained in:
Philippe Tillet
2022-01-29 18:29:29 -08:00
committed by GitHub
parent bd52e530a0
commit bef76b142a
9 changed files with 44 additions and 3 deletions

View File

@@ -986,12 +986,14 @@ class JITFunction:
gscope = generator.gscope.copy()
lscope = generator.lscope.copy()
values = generator.module.get_values().copy()
types = generator.module.get_types().copy()
generator.gscope = sys.modules[self.fn.__module__].__dict__
generator.lscope = dict()
ret = generator.visit_FunctionDef(self.parse().body[0], inline=True, arg_values=arg_values)
generator.gscope = gscope
generator.lscope = lscope
generator.module.set_values(values)
generator.module.set_types(types)
return ret
except Exception as e:
node = generator.last_node