From 0f53d0313912b56be77b267f98daa2569ebb37ea Mon Sep 17 00:00:00 2001 From: Tohava Date: Thu, 5 Aug 2010 03:44:29 +0300 Subject: Added AST logging, and modified AST for consistent handling of alt stmts. - Modified the arm types, instead of a single arm type, there are now 2 (soon to be 3) arm types, one for each type of alt statement - Added AST logging for constrained type (see fmt_constrained) - Added AST logging for STMT_alt_type - Created a generic fmt_arm for use with all alt statements --- src/boot/me/dead.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/boot/me') diff --git a/src/boot/me/dead.ml b/src/boot/me/dead.ml index 61aa846a..7ef4bf8e 100644 --- a/src/boot/me/dead.ml +++ b/src/boot/me/dead.ml @@ -70,7 +70,8 @@ let dead_code_visitor | Ast.STMT_alt_type { Ast.alt_type_arms = arms; Ast.alt_type_else = alt_type_else } -> - let arm_ids = Array.map (fun (_, _, block) -> block.id) arms in + let arm_ids = Array.map (fun { node = (_, _, block) } -> + block.id) arms in let else_ids = begin match alt_type_else with -- cgit v1.2.3