Browse Source

Revert "generate overload fields"

This reverts commit 80f51efd8a10504df9bd182bf91cdf6da16a3d92.
Simon Krajewski 12 years ago
parent
commit
c8f90bedf5
1 changed files with 4 additions and 12 deletions
  1. 4 12
      genxml.ml

+ 4 - 12
genxml.ml

@@ -91,14 +91,6 @@ let gen_meta meta =
 		) meta in
 		) meta in
 		[node "meta" [] nodes]
 		[node "meta" [] nodes]
 
 
-let unfold_overloads cfl =
-	let acc = DynArray.create () in
-	List.iter (fun cf ->
-		DynArray.add acc cf;
-		List.iter (fun cf -> DynArray.add acc cf) cf.cf_overloads
-	) cfl;
-	DynArray.to_list acc
-
 let rec gen_type t =
 let rec gen_type t =
 	match t with
 	match t with
 	| TMono m -> (match !m with None -> tag "unknown" | Some t -> gen_type t)
 	| TMono m -> (match !m with None -> tag "unknown" | Some t -> gen_type t)
@@ -165,13 +157,13 @@ let rec gen_type_decl com pos t =
 	let m = (t_infos t).mt_module in
 	let m = (t_infos t).mt_module in
 	match t with
 	match t with
 	| TClassDecl c ->
 	| TClassDecl c ->
-		let stats = List.map (gen_field ["static","1"]) (List.filter (fun cf -> cf.cf_name <> "__meta__") (unfold_overloads c.cl_ordered_statics)) in
+		let stats = List.map (gen_field ["static","1"]) (List.filter (fun cf -> cf.cf_name <> "__meta__") c.cl_ordered_statics) in
 		let fields = (match c.cl_super with
 		let fields = (match c.cl_super with
-			| None -> List.map (fun f -> f,[]) (unfold_overloads c.cl_ordered_fields)
-			| Some (csup,_) -> List.map (fun f -> if exists f csup then (f,["override","1"]) else (f,[])) (unfold_overloads c.cl_ordered_fields)
+			| None -> List.map (fun f -> f,[]) c.cl_ordered_fields
+			| Some (csup,_) -> List.map (fun f -> if exists f csup then (f,["override","1"]) else (f,[])) c.cl_ordered_fields
 		) in
 		) in
 		let fields = List.map (fun (f,att) -> gen_field att f) fields in
 		let fields = List.map (fun (f,att) -> gen_field att f) fields in
-		let constr = (match c.cl_constructor with None -> [] | Some f -> List.map (gen_field []) (unfold_overloads [f])) in
+		let constr = (match c.cl_constructor with None -> [] | Some f -> [gen_field [] f]) in
 		let impl = List.map (gen_class_path (if c.cl_interface then "extends" else "implements")) c.cl_implements in
 		let impl = List.map (gen_class_path (if c.cl_interface then "extends" else "implements")) c.cl_implements in
 		let tree = (match c.cl_super with
 		let tree = (match c.cl_super with
 			| None -> impl
 			| None -> impl