+typedef unsigned CallFlags;
+
+/**
+ * Call flags.
+ *
+ * TODO: It might be better to to record some of these (but not all) into the
+ * trace file.
+ */
+enum {
+
+ /**
+ * Whether a call was really done by the application or not.
+ *
+ * This flag is set for fake calls -- calls not truly done by the application
+ * but emitted and recorded for completeness, to provide contextual information
+ * necessary for retracing, that would not be available through other ways.
+ *
+ * XXX: This one definetely needs to go into the trace file.
+ */
+ CALL_FLAG_FAKE = (1 << 0),
+
+ /**
+ * Whether this call should be retraced or ignored.
+ *
+ * This flag is set for calls which can't be safely replayed (due to incomplete
+ * information) or that have no sideffects.
+ *
+ * Some incomplete calls are unreproduceable, but not all.
+ */
+ CALL_FLAG_NON_REPRODUCIBLE = (1 << 1),
+
+ /**
+ * Whether this call has no side-effects, therefore don't need to be
+ * retraced.
+ *
+ * This flag is set for calls that merely query information which is not
+ * needed for posterior calls.
+ */
+ CALL_FLAG_NO_SIDE_EFFECTS = (1 << 2),
+
+ /**
+ * Whether this call renders into the bound rendertargets.
+ */
+ CALL_FLAG_RENDER = (1 << 3),
+
+ /**
+ * Whether this call causes render target to be swapped.
+ *
+ * This does not mark frame termination by itself -- that's solely the
+ * responsibility of `endOfFrame` bit.
+ *
+ * This mean that snapshots should be take prior to the call, and not
+ * after.
+ */
+ CALL_FLAG_SWAP_RENDERTARGET = (1 << 4),
+
+ /**
+ * Whether this call terminates a frame.
+ *
+ * XXX: This can't always be determined by the function name, so it should also
+ * go into the trace file eventually.
+ */
+ CALL_FLAG_END_FRAME = (1 << 5),
+
+ /**
+ * Whether this call is incomplete, i.e., it never returned.
+ */
+ CALL_FLAG_INCOMPLETE = (1 << 6),
+
+ /**
+ * Whether this call is verbose (i.e., not usually interesting).
+ */
+ CALL_FLAG_VERBOSE = (1 << 7),
+};
+
+
+struct Arg
+{
+ Value *value;
+};