Skip to content

Commit

Permalink
deactivate TPatMatch in interp-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed May 31, 2013
1 parent fdd4226 commit f260c23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion genneko.ml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ and gen_expr ctx e =
],p)
)
| TPatMatch dt ->
(* if e.epos.pfile = "Main.hx" then Array.iteri (fun i dt -> print_endline (string_of_int i); print_endline (s_dt "" dt)) dt.dt_dt_lookup; *)
let num_labels = Array.length dt.dt_dt_lookup in
let lc = ctx.label_count in
ctx.label_count <- ctx.label_count + num_labels + 1;
Expand Down
2 changes: 1 addition & 1 deletion typer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ and type_switch ctx e cases def (with_type:with_type) p =
try
if (Common.defined ctx.com Common.Define.NoPatternMatching) then raise Exit;
let dt = match_expr ctx e cases def with_type p in
if not ctx.in_macro && ctx.com.config.pf_pattern_matching then mk (TPatMatch dt) dt.dt_type p else Codegen.PatternMatchConversion.to_typed_ast ctx dt p
if not ctx.in_macro && not (Common.defined ctx.com Define.Interp) && ctx.com.config.pf_pattern_matching then mk (TPatMatch dt) dt.dt_type p else Codegen.PatternMatchConversion.to_typed_ast ctx dt p
with Exit ->
type_switch_old ctx e cases def with_type p

Expand Down

0 comments on commit f260c23

Please sign in to comment.