+ def retraceFunction(self, function):
+ print 'static void retrace_%s(trace::Call &call) {' % function.name
+ self.retraceFunctionBody(function)
+ print '}'
+ print
+
+ def retraceInterfaceMethod(self, interface, method):
+ print 'static void retrace_%s__%s(trace::Call &call) {' % (interface.name, method.name)
+ self.retraceInterfaceMethodBody(interface, method)
+ print '}'
+ print
+
+ def retraceFunctionBody(self, function):
+ if not function.sideeffects:
+ print ' (void)call;'
+ return
+
+ self.deserializeArgs(function)
+
+ self.invokeFunction(function)
+
+ self.swizzleValues(function)
+
+ def retraceInterfaceMethodBody(self, interface, method):
+ if not method.sideeffects:
+ print ' (void)call;'
+ return
+
+ self.deserializeThisPointer(interface)
+
+ self.deserializeArgs(method)
+
+ self.invokeInterfaceMethod(interface, method)
+
+ self.swizzleValues(method)
+
+ def deserializeThisPointer(self, interface):
+ print ' %s *_this;' % (interface.name,)
+ # FIXME
+
+ def deserializeArgs(self, function):
+ print ' retrace::ScopedAllocator _allocator;'
+ print ' (void)_allocator;'