patch 9.0.1134: comparing objects uses identity instead of equality

Problem:    Comparing objects uses identity instead of equality.
Solution:   Compare the object values.
diff --git a/src/vim9instr.c b/src/vim9instr.c
index f5795cd..bd2c1b4 100644
--- a/src/vim9instr.c
+++ b/src/vim9instr.c
@@ -254,11 +254,11 @@
  */
     int
 generate_add_instr(
-	cctx_T *cctx,
-	vartype_T vartype,
-	type_T *type1,
-	type_T *type2,
-	exprtype_T expr_type)
+	cctx_T	    *cctx,
+	vartype_T   vartype,
+	type_T	    *type1,
+	type_T	    *type2,
+	exprtype_T  expr_type)
 {
     isn_T	*isn = generate_instr_drop(cctx,
 		      vartype == VAR_NUMBER ? ISN_OPNR
@@ -416,6 +416,8 @@
 	    case VAR_LIST: isntype = ISN_COMPARELIST; break;
 	    case VAR_DICT: isntype = ISN_COMPAREDICT; break;
 	    case VAR_FUNC: isntype = ISN_COMPAREFUNC; break;
+	    case VAR_CLASS: isntype = ISN_COMPARECLASS; break;
+	    case VAR_OBJECT: isntype = ISN_COMPAREOBJECT; break;
 	    default: isntype = ISN_COMPAREANY; break;
 	}
     }
@@ -455,6 +457,13 @@
 		exprtype == EXPR_IS ? "is" : "isnot" , vartype_name(vartype1));
 	return ISN_DROP;
     }
+    if (!(exprtype == EXPR_IS || exprtype == EXPR_ISNOT
+		|| exprtype == EXPR_EQUAL || exprtype == EXPR_NEQUAL)
+	    && (isntype == ISN_COMPAREOBJECT || isntype == ISN_COMPARECLASS))
+    {
+	semsg(_(e_invalid_operation_for_str), vartype_name(vartype1));
+	return ISN_DROP;
+    }
     if (isntype == ISN_DROP
 	    || ((exprtype != EXPR_EQUAL && exprtype != EXPR_NEQUAL
 		    && (vartype1 == VAR_BOOL || vartype1 == VAR_SPECIAL
@@ -2512,12 +2521,14 @@
 	case ISN_COMPAREANY:
 	case ISN_COMPAREBLOB:
 	case ISN_COMPAREBOOL:
+	case ISN_COMPARECLASS:
 	case ISN_COMPAREDICT:
 	case ISN_COMPAREFLOAT:
 	case ISN_COMPAREFUNC:
 	case ISN_COMPARELIST:
 	case ISN_COMPARENR:
 	case ISN_COMPARENULL:
+	case ISN_COMPAREOBJECT:
 	case ISN_COMPARESPECIAL:
 	case ISN_COMPARESTRING:
 	case ISN_CONCAT: