|
@@ -429,6 +429,20 @@ let rec type_inline ctx cf f ethis params tret config p ?(self_calling_closure=f
|
|
l.i_write <- true;
|
|
l.i_write <- true;
|
|
let e2 = map false e2 in
|
|
let e2 = map false e2 in
|
|
{e with eexpr = TBinop(op,{e1 with eexpr = TLocal l.i_subst},e2)}
|
|
{e with eexpr = TBinop(op,{e1 with eexpr = TLocal l.i_subst},e2)}
|
|
|
|
+(* | TCall({eexpr = TLocal v} as e1,el) ->
|
|
|
|
+ let el = List.map (map false) el in
|
|
|
|
+ let l = read_local v in
|
|
|
|
+ let edef() = {e with eexpr = TCall({e1 with eexpr = TLocal l.i_subst},el)} in
|
|
|
|
+ begin try
|
|
|
|
+ begin match List.assq l inlined_vars with
|
|
|
|
+ | {eexpr = TField(_, (FStatic(_,cf) | FInstance(_,_,cf)))} as e' when cf.cf_kind = Method MethInline ->
|
|
|
|
+ make_call ctx e' el e.etype e.epos
|
|
|
|
+ | _ ->
|
|
|
|
+ edef()
|
|
|
|
+ end
|
|
|
|
+ with Not_found ->
|
|
|
|
+ edef()
|
|
|
|
+ end *)
|
|
| TFunction f ->
|
|
| TFunction f ->
|
|
(match f.tf_args with [] -> () | _ -> has_vars := true);
|
|
(match f.tf_args with [] -> () | _ -> has_vars := true);
|
|
let old = save_locals ctx and old_fun = !in_local_fun in
|
|
let old = save_locals ctx and old_fun = !in_local_fun in
|