public override bool Equals(object obj)
{
var rhs = obj as FunctionDefinition;
if (rhs == null) return false;
if (Instructions == null)
{
return rhs.Instructions == null;
}
if (rhs.Instructions == null)
{
return false;
}
if (Instructions.Count != rhs.Instructions.Count)
{
return false;
}
return !Instructions.Where((t, i) => t.Opcode != rhs.Instructions[i].Opcode).Any();
// TODO check operands
}