changeset 200:fe75a99b7b0e

secret_ifs: a missing linenumber on a synthesized BinOp fixed
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 16 Dec 2009 17:35:57 +0100
parents 4bea3c047695
children 934936266ad6
files pysmcl/secret_ifs.py
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/secret_ifs.py	Wed Dec 16 17:24:46 2009 +0100
+++ b/pysmcl/secret_ifs.py	Wed Dec 16 17:35:57 2009 +0100
@@ -141,15 +141,17 @@
                 v1 = loc(ast.Name(id = r1, ctx = ast.Load))
                 v2 = loc(ast.Name(id = r2, ctx = ast.Load))
 
+                right_hand =loc(ast.BinOp(op = ast.Mult(),
+                                          left = loc(ast.BinOp(op = ast.Sub(),
+                                                               left = v2,
+                                                               right = v1)),
+                                                     right = cond_load))
+
                 combine = loc(ast.Assign(targets = [loc(ast.Name(id=id, ctx=ast.Store))],
                                          value =
                                          loc(ast.BinOp(op = ast.Add(),
                                                        left = v1,
-                                                       right = loc(ast.BinOp(op = ast.Mult(),
-                                                                             left = ast.BinOp(op = ast.Sub(),
-                                                                                              left = v2,
-                                                                                              right = v1),
-                                                                             right = cond_load))))))
+                                                       right = right_hand))))
 
                 # combine.syntetic = False the combination of the two
                 # branches is not syntetic, because it replaces the