summaryrefslogtreecommitdiff
path: root/retrace.py
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-05-09 21:27:02 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-05-09 21:27:02 +0100
commitc017dded3f1b3ebe3043b0e217bb3cd76a4e1a4e (patch)
tree247dc9a77ad2d2e83981270a8d40f6a9bded367a /retrace.py
parentc90658521fa879fc439608099563ce491b69dfdc (diff)
parent4d7f1fec7a1561d474592b2b05b43685a29e8426 (diff)
Merge branch 'master' into multi-context
Conflicts: glretrace.hpp glretrace_main.cpp
Diffstat (limited to 'retrace.py')
-rw-r--r--retrace.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/retrace.py b/retrace.py
index 9e42be3..81652e5 100644
--- a/retrace.py
+++ b/retrace.py
@@ -186,6 +186,9 @@ class Retracer:
print
def retrace_function_body(self, function):
+ if not function.sideeffects:
+ return
+
success = True
for arg in function.args:
arg_type = ConstRemover().visit(arg.type)
@@ -241,8 +244,7 @@ class Retracer:
functions = filter(self.filter_function, functions)
for function in functions:
- if function.sideeffects:
- self.retrace_function(function)
+ self.retrace_function(function)
print 'void retrace::retrace_call(Trace::Call &call) {'
print ' const char *name = call.name().c_str();'
@@ -252,8 +254,7 @@ class Retracer:
def handle_case(function_name):
function = func_dict[function_name]
- if function.sideeffects:
- print ' retrace_%s(call);' % function.name
+ print ' retrace_%s(call);' % function.name
print ' return;'
string_switch('name', func_dict.keys(), handle_case)