From dd27f9fbd8192ac3ddfce1267634e8ed455cf434 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 13 Apr 2012 13:57:23 +0100 Subject: [PATCH] Skip functions without sideeffects alltogether. Function body of functions with no sideeffects is no longer necessary, now that glReadPixels is considered to have sideeffects. --- retrace.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/retrace.py b/retrace.py index 5913f56..e4d462a 100644 --- a/retrace.py +++ b/retrace.py @@ -208,9 +208,7 @@ class Retracer: print def retraceFunctionBody(self, function): - if not function.sideeffects: - print ' (void)call;' - return + assert function.sideeffects print ' retrace::ScopedAllocator _allocator;' print ' (void)_allocator;' @@ -285,11 +283,15 @@ class Retracer: functions = filter(self.filterFunction, functions) for function in functions: - self.retraceFunction(function) + if function.sideeffects: + self.retraceFunction(function) print 'const retrace::Entry %s[] = {' % self.table_name for function in functions: - print ' {"%s", &retrace_%s},' % (function.name, function.name) + if function.sideeffects: + print ' {"%s", &retrace_%s},' % (function.name, function.name) + else: + print ' {"%s", &retrace::ignore},' % (function.name,) print ' {NULL, NULL}' print '};' print -- 2.7.4