浏览代码

cancel inlining on TPatMatch for now

Simon Krajewski 12 年之前
父节点
当前提交
f3ab2ebfab
共有 1 个文件被更改,包括 3 次插入0 次删除
  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) ->