|
@@ -54,14 +54,6 @@ let is_var_field f =
|
|
|
| _ ->
|
|
|
false
|
|
|
|
|
|
-let is_special_compare e1 e2 =
|
|
|
- match e1.eexpr, e2.eexpr with
|
|
|
- | TConst TNull, _ | _ , TConst TNull -> None
|
|
|
- | _ ->
|
|
|
- match follow e1.etype, follow e2.etype with
|
|
|
- | TInst ({ cl_path = [],"Xml" } as c,_) , _ | _ , TInst ({ cl_path = [],"Xml" } as c,_) -> Some c
|
|
|
- | _ -> None
|
|
|
-
|
|
|
let protect name =
|
|
|
match name with
|
|
|
| "Error" | "Namespace" -> "_" ^ name
|
|
@@ -586,9 +578,6 @@ and gen_expr ctx e =
|
|
|
spr ctx "[";
|
|
|
gen_value ctx e2;
|
|
|
spr ctx "]";
|
|
|
- | TBinop (Ast.OpEq,e1,e2) when (match is_special_compare e1 e2 with Some c -> true | None -> false) ->
|
|
|
- let c = match is_special_compare e1 e2 with Some c -> c | None -> assert false in
|
|
|
- gen_expr ctx (mk (TCall (mk (TField (mk (TTypeExpr (TClassDecl c)) t_dynamic e.epos,FDynamic "compare")) t_dynamic e.epos,[e1;e2])) ctx.inf.com.basic.tbool e.epos);
|
|
|
(* what is this used for? *)
|
|
|
(* | TBinop (op,{ eexpr = TField (e1,s) },e2) ->
|
|
|
gen_value_op ctx e1;
|