changeset 234:b229f5b732c9

range_analysis: stores ranges with functions
author Sigurd Meldgaard <stm@daimi.au.dk>
date Mon, 04 Jan 2010 14:08:08 +0100
parents b295826e28d3
children b84406fbb267
files pysmcl/range_analysis.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/range_analysis.py	Mon Jan 04 14:07:30 2010 +0100
+++ b/pysmcl/range_analysis.py	Mon Jan 04 14:08:08 2010 +0100
@@ -245,6 +245,13 @@
                             param_range = ast.literal_eval(keyword.value)
                             for (k, r) in param_range.items():
                                 param_range[k] = Range(r[0], r[1])
+                            node.args_ranges = []
+                            for arg in node.args.args:
+                                if arg.id in param_range:
+                                    node.args_ranges.append(
+                                        param_range[arg.id])
+                                else:
+                                    node.args_ranges.append(Bottom())
                             break
                 for arg in node.args.args:
                     if not arg.id in param_range: