void visit(Visitor &visitor);
const EnumSig *sig;
+
+ const EnumValue *
+ lookup() {
+ // TODO: use a std::map
+ for (const EnumValue *it = sig->values; it != sig->values + sig->num_values; ++it) {
+ if (it->value == value) {
+ return it;
+ }
+ }
+ return NULL;
+ }
};
};
+struct Arg
+{
+ Value *value;
+};
+
class Call
{
unsigned thread_id;
unsigned no;
const FunctionSig *sig;
- std::vector<Value *> args;
+ std::vector<Arg> args;
Value *ret;
CallFlags flags;
inline Value & arg(unsigned index) {
assert(index < args.size());
- return *(args[index]);
+ return *(args[index].value);
}
};