|
@@ -749,6 +749,8 @@ let configure gen =
|
|
let rec real_type t =
|
|
let rec real_type t =
|
|
let t = gen.gfollow#run_f t in
|
|
let t = gen.gfollow#run_f t in
|
|
match t with
|
|
match t with
|
|
|
|
+ | TAbstract ({ a_impl = Some _ } as a, pl) ->
|
|
|
|
+ real_type (Codegen.get_underlying_type a pl)
|
|
| TInst( { cl_path = (["haxe"], "Int32") }, [] ) -> gen.gcon.basic.tint
|
|
| TInst( { cl_path = (["haxe"], "Int32") }, [] ) -> gen.gcon.basic.tint
|
|
| TInst( { cl_path = (["haxe"], "Int64") }, [] ) -> ti64
|
|
| TInst( { cl_path = (["haxe"], "Int64") }, [] ) -> ti64
|
|
| TAbstract( { a_path = ([], "Class") }, p )
|
|
| TAbstract( { a_path = ([], "Class") }, p )
|
|
@@ -1419,7 +1421,12 @@ let configure gen =
|
|
print w "%s %s%s %s %s %s" (visibility) v_n (String.concat " " modifiers) params (if is_new then "" else rett_s cf.cf_pos (run_follow gen ret_type)) (change_field name);
|
|
print w "%s %s%s %s %s %s" (visibility) v_n (String.concat " " modifiers) params (if is_new then "" else rett_s cf.cf_pos (run_follow gen ret_type)) (change_field name);
|
|
|
|
|
|
(* <T>(string arg1, object arg2) with T : object *)
|
|
(* <T>(string arg1, object arg2) with T : object *)
|
|
- print w "(%s)" (String.concat ", " (List.map (fun (name, _, t) -> sprintf "%s %s" (t_s cf.cf_pos (run_follow gen t)) (change_id name)) args));
|
|
|
|
|
|
+ (match cf.cf_expr with
|
|
|
|
+ | Some { eexpr = TFunction tf } ->
|
|
|
|
+ print w "(%s)" (String.concat ", " (List.map (fun (var,_) -> sprintf "%s %s" (t_s cf.cf_pos (run_follow gen var.v_type)) (change_id var.v_name)) tf.tf_args))
|
|
|
|
+ | _ ->
|
|
|
|
+ print w "(%s)" (String.concat ", " (List.map (fun (name, _, t) -> sprintf "%s %s" (t_s cf.cf_pos (run_follow gen t)) (change_id name)) args))
|
|
|
|
+ );
|
|
if is_interface then
|
|
if is_interface then
|
|
write w ";"
|
|
write w ";"
|
|
else begin
|
|
else begin
|
|
@@ -1658,6 +1665,8 @@ let configure gen =
|
|
|
|
|
|
StubClosureImpl.configure gen (StubClosureImpl.default_implementation gen float_cl 10 (fun e _ _ -> e));*)
|
|
StubClosureImpl.configure gen (StubClosureImpl.default_implementation gen float_cl 10 (fun e _ _ -> e));*)
|
|
|
|
|
|
|
|
+ AbstractImplementationFix.configure gen;
|
|
|
|
+
|
|
IteratorsInterface.configure gen (fun e -> e);
|
|
IteratorsInterface.configure gen (fun e -> e);
|
|
|
|
|
|
ClosuresToClass.configure gen (ClosuresToClass.default_implementation closure_t (get_cl (get_type gen (["haxe";"lang"],"Function")) ));
|
|
ClosuresToClass.configure gen (ClosuresToClass.default_implementation closure_t (get_cl (get_type gen (["haxe";"lang"],"Function")) ));
|
|
@@ -2009,8 +2018,6 @@ let configure gen =
|
|
|
|
|
|
TypeParams.RenameTypeParameters.run gen;
|
|
TypeParams.RenameTypeParameters.run gen;
|
|
|
|
|
|
- (*Codegen.dump_types gen.gcon;*)
|
|
|
|
-
|
|
|
|
let t = Common.timer "code generation" in
|
|
let t = Common.timer "code generation" in
|
|
|
|
|
|
generate_modules_t gen "java" "src" change_path module_gen;
|
|
generate_modules_t gen "java" "src" change_path module_gen;
|