|
@@ -98,6 +98,8 @@ type platform_config = {
|
|
|
pf_can_skip_non_nullable_argument : bool;
|
|
|
(** type paths that are reserved on the platform *)
|
|
|
pf_reserved_type_paths : path list;
|
|
|
+ (** transform for in the corresponding while *)
|
|
|
+ pf_for_to_while : bool;
|
|
|
}
|
|
|
|
|
|
type display_mode =
|
|
@@ -555,6 +557,7 @@ let default_config =
|
|
|
pf_pattern_matching = false;
|
|
|
pf_can_skip_non_nullable_argument = true;
|
|
|
pf_reserved_type_paths = [];
|
|
|
+ pf_for_to_while = false;
|
|
|
}
|
|
|
|
|
|
let get_config com =
|
|
@@ -564,6 +567,7 @@ let get_config com =
|
|
|
default_config
|
|
|
| Js ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = false;
|
|
|
pf_sys = false;
|
|
|
pf_locals_scope = false;
|
|
@@ -579,6 +583,7 @@ let get_config com =
|
|
|
}
|
|
|
| Neko ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = false;
|
|
|
pf_sys = true;
|
|
|
pf_locals_scope = true;
|
|
@@ -594,6 +599,7 @@ let get_config com =
|
|
|
}
|
|
|
| Flash when defined Define.As3 ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = true;
|
|
|
pf_sys = false;
|
|
|
pf_locals_scope = false;
|
|
@@ -609,6 +615,7 @@ let get_config com =
|
|
|
}
|
|
|
| Flash ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = true;
|
|
|
pf_sys = false;
|
|
|
pf_locals_scope = true;
|
|
@@ -624,6 +631,7 @@ let get_config com =
|
|
|
}
|
|
|
| Php ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = false;
|
|
|
pf_sys = true;
|
|
|
pf_locals_scope = false; (* some duplicate work is done in genPhp *)
|
|
@@ -639,6 +647,7 @@ let get_config com =
|
|
|
}
|
|
|
| Cpp ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = true;
|
|
|
pf_sys = true;
|
|
|
pf_locals_scope = true;
|
|
@@ -654,6 +663,7 @@ let get_config com =
|
|
|
}
|
|
|
| Cs ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = true;
|
|
|
pf_sys = true;
|
|
|
pf_locals_scope = false;
|
|
@@ -669,6 +679,7 @@ let get_config com =
|
|
|
}
|
|
|
| Java ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = true;
|
|
|
pf_sys = true;
|
|
|
pf_locals_scope = false;
|
|
@@ -684,6 +695,7 @@ let get_config com =
|
|
|
}
|
|
|
| Python ->
|
|
|
{
|
|
|
+ default_config with
|
|
|
pf_static = false;
|
|
|
pf_sys = true;
|
|
|
pf_locals_scope = false;
|
|
@@ -699,18 +711,11 @@ let get_config com =
|
|
|
}
|
|
|
| Hl ->
|
|
|
{
|
|
|
- pf_static = true;
|
|
|
- pf_sys = true;
|
|
|
- pf_locals_scope = true;
|
|
|
- pf_captured_scope = true;
|
|
|
- pf_unique_locals = false;
|
|
|
+ default_config with
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
- pf_pad_nulls = false;
|
|
|
- pf_add_final_return = false;
|
|
|
- pf_overload = false;
|
|
|
- pf_pattern_matching = false;
|
|
|
+ pf_pad_nulls = true;
|
|
|
pf_can_skip_non_nullable_argument = false;
|
|
|
- pf_reserved_type_paths = [];
|
|
|
+ pf_for_to_while = true;
|
|
|
}
|
|
|
|
|
|
let memory_marker = [|Unix.time()|]
|