about summary refs log tree commit diff stats
path: root/miasm2/core/sembuilder.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/core/sembuilder.py')
-rw-r--r--miasm2/core/sembuilder.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/miasm2/core/sembuilder.py b/miasm2/core/sembuilder.py
index 27401049..6ff390bb 100644
--- a/miasm2/core/sembuilder.py
+++ b/miasm2/core/sembuilder.py
@@ -95,27 +95,16 @@ class MiasmTransformer(ast.NodeTransformer):
         return call
 
     def visit_Set(self, node):
-        "{a, b} -> ExprCompose([(a, 0, a.size)], (b, a.size, a.size + b.size)])"
+        "{a, b} -> ExprCompose(a, b)"
         if len(node.elts) == 0:
             return node
 
         # Recursive visit
         node = self.generic_visit(node)
 
-        new_elts = []
-        index = ast.Num(n=0)
-        for elt in node.elts:
-            new_index = ast.BinOp(op=ast.Add(), left=index,
-                                  right=ast.Attribute(value=elt,
-                                                      attr='size',
-                                                      ctx=ast.Load()))
-            new_elts.append(ast.Tuple(elts=[elt, index, new_index],
-                                     ctx=ast.Load()))
-            index = new_index
         return ast.Call(func=ast.Name(id='ExprCompose',
                                       ctx=ast.Load()),
-                               args=[ast.List(elts=new_elts,
-                                              ctx=ast.Load())],
+                               args=node.elts,
                                keywords=[],
                                starargs=None,
                                kwargs=None)