aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/dead.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-10-12 12:16:35 -0700
committerGraydon Hoare <[email protected]>2010-10-12 12:16:35 -0700
commit76f7b043bc7c5084a6b4b3c900d51e2e66202c93 (patch)
tree44760e8faad2cf69931b21d2b7d40e181bc18503 /src/boot/me/dead.ml
parentrustc: Add the tuple type to the AST (diff)
downloadrust-76f7b043bc7c5084a6b4b3c900d51e2e66202c93.tar.xz
rust-76f7b043bc7c5084a6b4b3c900d51e2e66202c93.zip
Changes to make rustboot compile on OCaml 3.12
Diffstat (limited to 'src/boot/me/dead.ml')
-rw-r--r--src/boot/me/dead.ml18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/boot/me/dead.ml b/src/boot/me/dead.ml
index 29a8d86b..dbd510bb 100644
--- a/src/boot/me/dead.ml
+++ b/src/boot/me/dead.ml
@@ -44,14 +44,14 @@ let dead_code_visitor
if Hashtbl.mem must_exit block.id then
Hashtbl.add must_exit s.id ()
- | Ast.STMT_while { Ast.while_body = body }
- | Ast.STMT_do_while { Ast.while_body = body }
- | Ast.STMT_for_each { Ast.for_each_body = body }
- | Ast.STMT_for { Ast.for_body = body } ->
+ | Ast.STMT_while { Ast.while_body = body; _ }
+ | Ast.STMT_do_while { Ast.while_body = body; _ }
+ | Ast.STMT_for_each { Ast.for_each_body = body; _ }
+ | Ast.STMT_for { Ast.for_body = body; _ } ->
if (Hashtbl.mem must_exit body.id) then
Hashtbl.add must_exit s.id ()
- | Ast.STMT_if { Ast.if_then = b1; Ast.if_else = Some b2 } ->
+ | Ast.STMT_if { Ast.if_then = b1; Ast.if_else = Some b2; _ } ->
if (Hashtbl.mem must_exit b1.id) && (Hashtbl.mem must_exit b2.id)
then Hashtbl.add must_exit s.id ()
@@ -61,16 +61,16 @@ let dead_code_visitor
| Ast.STMT_be _ ->
Hashtbl.add must_exit s.id ()
- | Ast.STMT_alt_tag { Ast.alt_tag_arms = arms } ->
+ | Ast.STMT_alt_tag { Ast.alt_tag_arms = arms; _ } ->
let arm_ids =
- Array.map (fun { node = (_, block) } -> block.id) arms
+ Array.map (fun { node = (_, block); _ } -> block.id) arms
in
if all_must_exit arm_ids
then Hashtbl.add must_exit s.id ()
| Ast.STMT_alt_type { Ast.alt_type_arms = arms;
- Ast.alt_type_else = alt_type_else } ->
- let arm_ids = Array.map (fun { node = ((_, _), block) } ->
+ Ast.alt_type_else = alt_type_else; _ } ->
+ let arm_ids = Array.map (fun { node = ((_, _), block); _ } ->
block.id) arms in
let else_ids =
begin