Explorar o código

cancel inlining on TPatMatch for now

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
f3ab2ebfab
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      optimizer.ml

+ 3 - 0
optimizer.ml

@@ -249,6 +249,9 @@ let rec type_inline ctx cf f ethis params tret config p force =
 			) cases in
 			let def = opt (map term) def in
 			{ e with eexpr = TMatch (map false v,en,cases,def); etype = if term && ret_val then unify_min ctx ((List.map (fun (_,_,e) -> e) cases) @ (match def with None -> [] | Some e -> [e])) else e.etype }
+		| TPatMatch _ ->
+			cancel_inlining := true; (* TODO *)
+			e
 		| TSwitch (e1,cases,def) when term ->
 			let term = term && def <> None in
 			let cases = List.map (fun (el,e) ->