Procházet zdrojové kódy

[java/cs] Complete Array implementation, several fixes

Caue Waneck před 13 roky
rodič
revize
709ea31cd7

+ 2 - 2
gencs.ml

@@ -959,7 +959,7 @@ let configure gen =
         let ret_type, args = match cf.cf_type with | TFun (strbtl, t) -> (t, strbtl) | _ -> assert false in
         
         (* public static void funcName *)
-        print w "%s %s%s %s %s" (visibility) v_n (String.concat " " modifiers) (if is_new then "" else rett_s (run_follow gen ret_type)) (change_field name);
+        print w "%s %s %s %s %s" (visibility) v_n (String.concat " " modifiers) (if is_new then "" else rett_s (run_follow gen ret_type)) (change_field name);
         let params, params_ext = get_string_params cf.cf_params in
         (* <T>(string arg1, object arg2) with T : object *)
         print w "%s(%s)%s" (params) (String.concat ", " (List.map (fun (name, _, t) -> sprintf "%s %s" (t_s (run_follow gen t)) (change_id name)) args)) (params_ext);
@@ -1126,7 +1126,7 @@ let configure gen =
     let clt, access, modifiers = get_class_modifiers cl.cl_meta (if cl.cl_interface then "interface" else "class") "public" [] in
     let is_final = clt = "struct" || has_meta ":final" cl.cl_meta in
     
-    print w "%s %s%s %s" access (String.concat " " modifiers) clt (change_clname (snd cl.cl_path));
+    print w "%s %s %s %s" access (String.concat " " modifiers) clt (change_clname (snd cl.cl_path));
     (* type parameters *)
     let params, params_ext = get_string_params cl.cl_types in
     let extends_implements = (match cl.cl_super with | None -> [] | Some (cl,p) -> [path_param_s (TClassDecl cl) cl.cl_path p]) @ (List.map (fun (cl,p) -> path_param_s (TClassDecl cl) cl.cl_path p) cl.cl_implements) in

+ 1 - 1
genjava.ml

@@ -1311,7 +1311,7 @@ let configure gen =
     let clt, access, modifiers = get_class_modifiers cl.cl_meta (if cl.cl_interface then "interface" else "class") "public" [] in
     let is_final = has_meta ":final" cl.cl_meta in
     
-    print w "%s %s%s %s" access (String.concat " " modifiers) clt (change_clname (snd cl.cl_path));
+    print w "%s %s %s %s" access (String.concat " " modifiers) clt (change_clname (snd cl.cl_path));
     (* type parameters *)
     let params, _ = get_string_params cl.cl_types in
     let cl_p_to_string (cl,p) = path_param_s (TClassDecl cl) cl.cl_path p in

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
std/cs/_std/Array.hx


+ 2 - 2
std/cs/_std/haxe/lang/FieldLookup.hx

@@ -67,7 +67,7 @@ package haxe.lang;
 				var field = fields[mid];
 				if (field != s)
 					return -(key + 1); //special case
-				return key;
+				return mid;
 			}
 		}
 		//if not found, min holds the value where we should insert the key
@@ -91,7 +91,7 @@ package haxe.lang;
 			} else if (hash > imid) {
 				min = mid + 1;
 			} else {
-				return min;
+				return mid;
 			}
 		}
 		//if not found, return a negative value of where it should be inserted

+ 1 - 1
std/cs/_std/haxe/lang/Runtime.hx

@@ -60,7 +60,7 @@ package haxe.lang;
 				System.TypeCode t1 = v1c.GetTypeCode();
 				System.TypeCode t2 = v2c.GetTypeCode();
 				if (t1 == t2)
-					return t1.Equals(t2);
+					return v1c.Equals(v2c);
 				
 				switch(t1)
 				{

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
std/java/_std/Array.hx


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů