| 1 | (* Copyright (C) 2009 Matthew Fluet. |
| 2 | * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh |
| 3 | * Jagannathan, and Stephen Weeks. |
| 4 | * Copyright (C) 1997-2000 NEC Research Institute. |
| 5 | * |
| 6 | * MLton is released under a BSD-style license. |
| 7 | * See the file MLton-LICENSE for details. |
| 8 | *) |
| 9 | |
| 10 | signature ANALYZE2_STRUCTS = |
| 11 | sig |
| 12 | include SSA_TREE2 |
| 13 | end |
| 14 | |
| 15 | signature ANALYZE2 = |
| 16 | sig |
| 17 | include ANALYZE2_STRUCTS |
| 18 | |
| 19 | val analyze: |
| 20 | {base: 'a Base.t -> 'a, |
| 21 | coerce: {from: 'a, |
| 22 | to: 'a} -> unit, |
| 23 | const: Const.t -> 'a, |
| 24 | (* In filter, the variant is an 'a option because the targets of Case |
| 25 | * branches may ignore the test (by taking 0 args). |
| 26 | *) |
| 27 | filter: {con: Con.t, |
| 28 | test: 'a, |
| 29 | variant: 'a option} -> unit, |
| 30 | filterWord: 'a * WordSize.t -> unit, |
| 31 | fromType: Type.t -> 'a, |
| 32 | inject: {sum: Tycon.t, variant: 'a} -> 'a, |
| 33 | layout: 'a -> Layout.t, |
| 34 | object: {args: 'a Prod.t, |
| 35 | con: Con.t option, |
| 36 | resultType: Type.t} -> 'a, |
| 37 | primApp: {args: 'a vector, |
| 38 | prim: Type.t Prim.t, |
| 39 | resultType: Type.t, |
| 40 | resultVar: Var.t option} -> 'a, |
| 41 | program: Program.t, |
| 42 | select: {base: 'a, |
| 43 | offset: int, |
| 44 | resultType: Type.t} -> 'a, |
| 45 | update: {base: 'a, |
| 46 | offset: int, |
| 47 | value: 'a} -> unit, |
| 48 | useFromTypeOnBinds: bool} |
| 49 | -> {func: Func.t -> {args: 'a vector, |
| 50 | raises: 'a vector option, |
| 51 | returns: 'a vector option}, |
| 52 | label: Label.t -> 'a vector, |
| 53 | value: Var.t -> 'a} |
| 54 | end |