| 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 REPRESENTATION_STRUCTS = |
| 11 | sig |
| 12 | structure Rssa: RSSA |
| 13 | structure Ssa: SSA2 |
| 14 | sharing Rssa.RealSize = Ssa.RealSize |
| 15 | sharing Rssa.WordSize = Ssa.WordSize |
| 16 | end |
| 17 | |
| 18 | signature REPRESENTATION = |
| 19 | sig |
| 20 | include REPRESENTATION_STRUCTS |
| 21 | |
| 22 | val compute: |
| 23 | Ssa.Program.t |
| 24 | -> {diagnostic: unit -> unit, |
| 25 | genCase: {cases: {con: Ssa.Con.t, |
| 26 | dst: Rssa.Label.t, |
| 27 | dstHasArg: bool} vector, |
| 28 | default: Rssa.Label.t option, |
| 29 | test: unit -> Rssa.Operand.t, |
| 30 | tycon: Ssa.Tycon.t} -> (Rssa.Statement.t list |
| 31 | * Rssa.Transfer.t |
| 32 | * Rssa.Block.t list), |
| 33 | object: {args: 'a vector, |
| 34 | con: Ssa.Con.t option, |
| 35 | dst: Rssa.Var.t * Rssa.Type.t, |
| 36 | objectTy: Ssa.Type.t, |
| 37 | oper: 'a -> Rssa.Operand.t} -> Rssa.Statement.t list, |
| 38 | objectTypes: (Rssa.ObjptrTycon.t * Rssa.ObjectType.t) vector, |
| 39 | select: {base: Rssa.Operand.t Ssa.Base.t, |
| 40 | baseTy: Ssa.Type.t, |
| 41 | dst: Rssa.Var.t * Rssa.Type.t, |
| 42 | offset: int} -> Rssa.Statement.t list, |
| 43 | toRtype: Ssa.Type.t -> Rssa.Type.t option, |
| 44 | update: {base: Rssa.Operand.t Ssa.Base.t, |
| 45 | baseTy: Ssa.Type.t, |
| 46 | offset: int, |
| 47 | value: Rssa.Operand.t} -> Rssa.Statement.t list} |
| 48 | end |