diff options
| author | Camille Mougey <commial@gmail.com> | 2015-09-23 15:09:10 +0200 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2015-09-23 15:09:10 +0200 |
| commit | 4be10d5c341bfef79478483e54301e1abce77202 (patch) | |
| tree | 84bcb8520cca44c819be2da57efaa550612a2057 /miasm2/expression/expression.py | |
| parent | cc20f3d79c641d929865f12471a70a2575b8cf54 (diff) | |
| parent | 44b8b29096b8beaf2c6e26adb6894c27bce5656d (diff) | |
| download | miasm-4be10d5c341bfef79478483e54301e1abce77202.tar.gz miasm-4be10d5c341bfef79478483e54301e1abce77202.zip | |
Merge pull request #219 from serpilliere/expr_is_func
Expression: move is_func_call to expr scr
Diffstat (limited to 'miasm2/expression/expression.py')
| -rw-r--r-- | miasm2/expression/expression.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py index 2b51ef61..c82aec2b 100644 --- a/miasm2/expression/expression.py +++ b/miasm2/expression/expression.py @@ -517,9 +517,6 @@ class ExprAff(Expr): else: return self._dst.get_w() - def is_function_call(self): - return isinstance(self.src, ExprOp) and self.src.op.startswith('call') - def _exprhash(self): return hash((EXPRAFF, hash(self._dst), hash(self._src))) @@ -821,6 +818,9 @@ class ExprOp(Expr): return True return False + def is_function_call(self): + return self._op.startswith('call') + def is_associative(self): "Return True iff current operation is associative" return (self._op in ['+', '*', '^', '&', '|']) |