|
@@ -84,6 +84,8 @@ type platform_config = {
|
|
|
pf_capture_policy : capture_policy;
|
|
|
(** when calling a method with optional args, do we replace the missing args with "null" constants *)
|
|
|
pf_pad_nulls : bool;
|
|
|
+ (** add a final return to methods not having one already - prevent some compiler warnings *)
|
|
|
+ pf_add_final_return : bool;
|
|
|
}
|
|
|
|
|
|
type context = {
|
|
@@ -149,6 +151,7 @@ let default_config =
|
|
|
pf_can_init_member = (fun _ -> true);
|
|
|
pf_capture_policy = CPNone;
|
|
|
pf_pad_nulls = false;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
|
|
|
let get_config com =
|
|
@@ -166,6 +169,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> true);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
| Js ->
|
|
|
{
|
|
@@ -177,6 +181,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
| Neko ->
|
|
|
{
|
|
@@ -188,6 +193,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPNone;
|
|
|
pf_pad_nulls = true;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
| Flash when defined "as3" ->
|
|
|
{
|
|
@@ -199,6 +205,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> true);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
+ pf_add_final_return = true;
|
|
|
}
|
|
|
| Flash ->
|
|
|
{
|
|
@@ -210,6 +217,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
| Php ->
|
|
|
{
|
|
@@ -226,6 +234,7 @@ let get_config com =
|
|
|
);
|
|
|
pf_capture_policy = CPNone;
|
|
|
pf_pad_nulls = true;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
| Cpp ->
|
|
|
{
|
|
@@ -237,6 +246,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
pf_pad_nulls = true;
|
|
|
+ pf_add_final_return = true;
|
|
|
}
|
|
|
| Cs ->
|
|
|
{
|
|
@@ -248,6 +258,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
pf_pad_nulls = true;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
| Java ->
|
|
|
{
|
|
@@ -259,6 +270,7 @@ let get_config com =
|
|
|
pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
pf_pad_nulls = true;
|
|
|
+ pf_add_final_return = false;
|
|
|
}
|
|
|
|
|
|
let create v args =
|