|
@@ -83,8 +83,6 @@ type platform_config = {
|
|
|
pf_captured_scope : bool;
|
|
|
(** generated locals must be absolutely unique wrt the current function *)
|
|
|
pf_unique_locals : bool;
|
|
|
- (** which expressions can be generated to initialize member variables (or will be moved into the constructor *)
|
|
|
- pf_can_init_member : tclass_field -> bool;
|
|
|
(** captured variables handling (see before) *)
|
|
|
pf_capture_policy : capture_policy;
|
|
|
(** when calling a method with optional args, do we replace the missing args with "null" constants *)
|
|
@@ -466,7 +464,6 @@ let default_config =
|
|
|
pf_locals_scope = true;
|
|
|
pf_captured_scope = true;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> true);
|
|
|
pf_capture_policy = CPNone;
|
|
|
pf_pad_nulls = false;
|
|
|
pf_add_final_return = false;
|
|
@@ -488,7 +485,6 @@ let get_config com =
|
|
|
pf_locals_scope = com.flash_version > 6.;
|
|
|
pf_captured_scope = false;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> true);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
pf_add_final_return = false;
|
|
@@ -504,7 +500,6 @@ let get_config com =
|
|
|
pf_locals_scope = false;
|
|
|
pf_captured_scope = false;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
pf_add_final_return = false;
|
|
@@ -520,7 +515,6 @@ let get_config com =
|
|
|
pf_locals_scope = true;
|
|
|
pf_captured_scope = true;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPNone;
|
|
|
pf_pad_nulls = true;
|
|
|
pf_add_final_return = false;
|
|
@@ -536,7 +530,6 @@ let get_config com =
|
|
|
pf_locals_scope = false;
|
|
|
pf_captured_scope = true;
|
|
|
pf_unique_locals = true;
|
|
|
- pf_can_init_member = (fun _ -> true);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
pf_add_final_return = true;
|
|
@@ -552,7 +545,6 @@ let get_config com =
|
|
|
pf_locals_scope = true;
|
|
|
pf_captured_scope = true; (* handled by genSwf9 *)
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPLoopVars;
|
|
|
pf_pad_nulls = false;
|
|
|
pf_add_final_return = false;
|
|
@@ -568,12 +560,6 @@ let get_config com =
|
|
|
pf_locals_scope = false; (* some duplicate work is done in genPhp *)
|
|
|
pf_captured_scope = false;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun cf ->
|
|
|
- match cf.cf_kind, cf.cf_expr with
|
|
|
- | Var { v_write = AccCall }, _ -> false
|
|
|
- | _, Some { eexpr = TTypeExpr _ } -> false
|
|
|
- | _ -> true
|
|
|
- );
|
|
|
pf_capture_policy = CPNone;
|
|
|
pf_pad_nulls = true;
|
|
|
pf_add_final_return = false;
|
|
@@ -589,7 +575,6 @@ let get_config com =
|
|
|
pf_locals_scope = true;
|
|
|
pf_captured_scope = true;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
pf_pad_nulls = true;
|
|
|
pf_add_final_return = true;
|
|
@@ -605,7 +590,6 @@ let get_config com =
|
|
|
pf_locals_scope = false;
|
|
|
pf_captured_scope = true;
|
|
|
pf_unique_locals = true;
|
|
|
- pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
pf_pad_nulls = true;
|
|
|
pf_add_final_return = false;
|
|
@@ -621,7 +605,6 @@ let get_config com =
|
|
|
pf_locals_scope = false;
|
|
|
pf_captured_scope = true;
|
|
|
pf_unique_locals = false;
|
|
|
- pf_can_init_member = (fun _ -> false);
|
|
|
pf_capture_policy = CPWrapRef;
|
|
|
pf_pad_nulls = true;
|
|
|
pf_add_final_return = false;
|
|
@@ -855,7 +838,7 @@ let normalize_path p =
|
|
|
|
|
|
let mem_size v =
|
|
|
Objsize.size_with_headers (Objsize.objsize v [] [])
|
|
|
-
|
|
|
+
|
|
|
(* ------------------------- TIMERS ----------------------------- *)
|
|
|
|
|
|
type timer_infos = {
|