[MLton-commit] r5162
Matthew Fluet
fluet at mlton.org
Fri Feb 9 16:06:18 PST 2007
Eliminate many unused values; these aren't caught by 'warnUnused true' because they are either functor results or used in functor arguments (which are implicitly 'forceUsed')
----------------------------------------------------------------------
U mlton/trunk/mlton/ast/ast-atoms.fun
U mlton/trunk/mlton/ast/ast-atoms.sig
U mlton/trunk/mlton/ast/ast-const.fun
U mlton/trunk/mlton/ast/ast-const.sig
U mlton/trunk/mlton/ast/ast-core.fun
U mlton/trunk/mlton/ast/ast-core.sig
U mlton/trunk/mlton/ast/int-size.fun
U mlton/trunk/mlton/ast/int-size.sig
U mlton/trunk/mlton/ast/real-size.fun
U mlton/trunk/mlton/ast/real-size.sig
U mlton/trunk/mlton/ast/record.fun
U mlton/trunk/mlton/ast/record.sig
U mlton/trunk/mlton/ast/word-size.fun
U mlton/trunk/mlton/ast/word-size.sig
U mlton/trunk/mlton/atoms/atoms.fun
U mlton/trunk/mlton/atoms/atoms.sig
U mlton/trunk/mlton/atoms/c-type.fun
U mlton/trunk/mlton/atoms/c-type.sig
U mlton/trunk/mlton/atoms/con-.fun
U mlton/trunk/mlton/atoms/const-type.fun
U mlton/trunk/mlton/atoms/const-type.sig
U mlton/trunk/mlton/atoms/const.fun
U mlton/trunk/mlton/atoms/const.sig
U mlton/trunk/mlton/atoms/generic-scheme.fun
U mlton/trunk/mlton/atoms/generic-scheme.sig
U mlton/trunk/mlton/atoms/hash-type.fun
U mlton/trunk/mlton/atoms/hash-type.sig
U mlton/trunk/mlton/atoms/prim.fun
U mlton/trunk/mlton/atoms/prim.sig
U mlton/trunk/mlton/atoms/profile-label.fun
U mlton/trunk/mlton/atoms/profile-label.sig
U mlton/trunk/mlton/atoms/source-info.fun
U mlton/trunk/mlton/atoms/source-info.sig
U mlton/trunk/mlton/atoms/tycon.fun
U mlton/trunk/mlton/atoms/type-ops.fun
U mlton/trunk/mlton/atoms/type-ops.sig
U mlton/trunk/mlton/atoms/word-x.fun
U mlton/trunk/mlton/atoms/word-x.sig
U mlton/trunk/mlton/backend/machine.fun
U mlton/trunk/mlton/backend/machine.sig
U mlton/trunk/mlton/backend/pointer-tycon.fun
U mlton/trunk/mlton/backend/pointer-tycon.sig
U mlton/trunk/mlton/backend/rep-type.fun
U mlton/trunk/mlton/backend/rep-type.sig
U mlton/trunk/mlton/backend/rssa.fun
U mlton/trunk/mlton/backend/rssa.sig
U mlton/trunk/mlton/backend/runtime.fun
U mlton/trunk/mlton/backend/runtime.sig
U mlton/trunk/mlton/backend/ssa-to-rssa.fun
U mlton/trunk/mlton/codegen/x86-codegen/peephole.fun
U mlton/trunk/mlton/codegen/x86-codegen/peephole.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86-live-transfers.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86-pseudo.sig
U mlton/trunk/mlton/codegen/x86-codegen/x86.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86.sig
U mlton/trunk/mlton/control/bits.sml
U mlton/trunk/mlton/core-ml/core-ml.fun
U mlton/trunk/mlton/core-ml/core-ml.sig
U mlton/trunk/mlton/elaborate/elaborate-env.fun
U mlton/trunk/mlton/elaborate/elaborate-env.sig
U mlton/trunk/mlton/elaborate/interface.fun
U mlton/trunk/mlton/elaborate/interface.sig
U mlton/trunk/mlton/elaborate/type-env.fun
U mlton/trunk/mlton/elaborate/type-env.sig
U mlton/trunk/mlton/match-compile/nested-pat.fun
U mlton/trunk/mlton/match-compile/nested-pat.sig
U mlton/trunk/mlton/ssa/direct-exp.fun
U mlton/trunk/mlton/ssa/direct-exp.sig
U mlton/trunk/mlton/ssa/prepasses.fun
U mlton/trunk/mlton/ssa/prepasses2.fun
U mlton/trunk/mlton/ssa/restore.fun
U mlton/trunk/mlton/ssa/sources.mlb
U mlton/trunk/mlton/ssa/ssa-tree.fun
U mlton/trunk/mlton/ssa/ssa-tree.sig
U mlton/trunk/mlton/ssa/ssa-tree2.fun
U mlton/trunk/mlton/ssa/ssa-tree2.sig
U mlton/trunk/mlton/xml/xml-tree.sig
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/ast/ast-atoms.fun
===================================================================
--- mlton/trunk/mlton/ast/ast-atoms.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/ast-atoms.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -95,13 +95,6 @@
val toFctid = make Fctid.fromSymbol
val toStrid = make Strid.fromSymbol
end
- val bind = fromCon Con.bind
- val cons = fromCon Con.cons
- val falsee = fromCon Con.falsee
- val match = fromCon Con.match
- val nill = fromCon Con.nill
- val reff = fromCon Con.reff
- val truee = fromCon Con.truee
end
structure Longtycon =
@@ -113,8 +106,6 @@
open T
val arrow = short Tycon.arrow
-
- val exn = short Tycon.exn
end
structure Longvar = Longid (structure Id = Var
@@ -159,14 +150,6 @@
val toLongcon = to (Longcon.makeRegion, Longcon.T, Vid.toCon)
val toLongstrid = to (Longstrid.makeRegion, Longstrid.T, Vid.toStrid)
end
-
- val bind = short Vid.bind
- val cons = short Vid.cons
- val falsee = short Vid.falsee
- val match = short Vid.match
- val nill = short Vid.nill
- val reff = short Vid.reff
- val truee = short Vid.truee
end
open Layout
@@ -234,8 +217,6 @@
fun arrow (t1, t2) = con (Tycon.arrow, Vector.new2 (t1, t2))
- val exn = con (Tycon.exn, Vector.new0 ())
-
fun layoutApp (tycon, args: 'a vector, layoutArg) =
case Vector.length args of
0 => tycon
Modified: mlton/trunk/mlton/ast/ast-atoms.sig
===================================================================
--- mlton/trunk/mlton/ast/ast-atoms.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/ast-atoms.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -63,7 +63,6 @@
sig
include LONGID
val arrow: t
- val exn: t
end sharing Longtycon.Id = Tycon
structure Longvar: LONGID sharing Longvar.Id = Var
@@ -73,14 +72,6 @@
sig
include LONGID
- val bind: t
- val cons: t
- val falsee: t
- val match: t
- val nill: t
- val reff: t
- val truee: t
-
val fromLongcon: Longcon.t -> t
val toLongvar: t -> Longvar.t
val toLongcon: t -> Longcon.t
@@ -108,7 +99,6 @@
val arrow: t * t -> t
val checkSyntax: t -> unit
val con: Tycon.t * t vector -> t
- val exn: t
val layout: t -> Layout.t
val layoutApp: Layout.t * 'a vector * ('a -> Layout.t) -> Layout.t
val layoutOption: t option -> Layout.t
Modified: mlton/trunk/mlton/ast/ast-const.fun
===================================================================
--- mlton/trunk/mlton/ast/ast-const.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/ast-const.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -22,8 +22,6 @@
type node' = node
type obj = t
-val equals = fn _ => Error.unimplemented "AstConst.equals"
-
fun ordToString (c: IntInf.t): string =
let
fun loop (n: int, c: IntInf.t, ac: char list) =
Modified: mlton/trunk/mlton/ast/ast-const.sig
===================================================================
--- mlton/trunk/mlton/ast/ast-const.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/ast-const.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -25,7 +25,6 @@
include WRAPPED sharing type node' = node
sharing type obj = t
- val equals: t * t -> bool
val layout: t -> Layout.t
val ordToString: IntInf.t -> string
val toString: t -> string
Modified: mlton/trunk/mlton/ast/ast-core.fun
===================================================================
--- mlton/trunk/mlton/ast/ast-core.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/ast-core.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -23,12 +23,6 @@
| Infixr of int option
| Nonfix
- val bogus = Nonfix
-
- val isInfix =
- fn Nonfix => false
- | _ => true
-
val toString =
fn Infix NONE => "infix"
| Infix (SOME n) => "infix " ^ Int.toString n
@@ -64,13 +58,6 @@
else s
end)
-structure Vector =
- struct
- open Vector
-
- fun cons (x, v) = concat [new1 x, v]
- end
-
(*---------------------------------------------------*)
(* Patterns *)
(*---------------------------------------------------*)
@@ -113,38 +100,9 @@
val constraint = make o Constraint
val layered = make o Layered
- val emptyList = make (List (Vector.new0 ()))
-
fun longvid x = make (Var {name = x, fixop = Fixop.None})
val var = longvid o Longvid.short o Vid.fromVar
- fun con c =
- if Con.equals (c, Con.nill) then emptyList
- else longvid (Longvid.short (Vid.fromCon c))
-
- fun app (c, p) =
- let
- val default = make (App (Longcon.short c, p))
- in
- if Con.equals (c, Con.cons)
- then
- case node p of
- Tuple ps =>
- if 2 = Vector.length ps
- then
- let
- val p0 = Vector.sub (ps, 0)
- val p1 = Vector.sub (ps, 1)
- in
- case node p1 of
- List ps => make (List (Vector.cons (p0, ps)))
- | _ => default
- end
- else default
- | _ => default
- else default
- end
-
fun tuple ps =
if 1 = Vector.length ps
then Vector.sub (ps, 0)
@@ -699,23 +657,6 @@
val openn = make o Open
- fun exceptionn (exn: Con.t, to: Type.t option): t =
- make (Exception (Vector.new1 (exn, make (Eb.Rhs.Gen to))))
-
- fun datatypee datatypes: t =
- make
- (Datatype
- (DatatypeRhs.makeRegion
- (DatatypeRhs.DatBind
- (DatBind.makeRegion (DatBind.T {withtypes = TypBind.empty,
- datatypes = datatypes},
- Region.bogus)),
- Region.bogus)))
-
- val seq = make o SeqDec
-
- val empty = seq (Vector.new0 ())
-
fun vall (tyvars, var, exp): t =
make (Val {tyvars = tyvars,
vbs = Vector.new1 {exp = exp, pat = Pat.var var},
Modified: mlton/trunk/mlton/ast/ast-core.sig
===================================================================
--- mlton/trunk/mlton/ast/ast-core.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/ast-core.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -23,9 +23,6 @@
Infix of int option
| Infixr of int option
| Nonfix
-
- val bogus: t
- val isInfix: t -> bool
val layout: t -> Layout.t
end
@@ -68,8 +65,6 @@
include WRAPPED sharing type node' = node
sharing type obj = t
- val app: Con.t * t -> t
- val con: Con.t -> t
val const: Const.t -> t
val constraint: t * Type.t -> t
val layered: {fixop: Fixop.t,
@@ -228,11 +223,6 @@
sharing type obj = t
val checkSyntax: t -> unit
- val datatypee: {tyvars: Tyvar.t vector,
- tycon: Tycon.t,
- cons: (Con.t * Type.t option) vector} vector -> t
- val empty: t
- val exceptionn: Con.t * Type.t option -> t
val fromExp: Exp.t -> t
val layout: t -> Layout.t
val openn: Longstrid.t vector -> t
Modified: mlton/trunk/mlton/ast/int-size.fun
===================================================================
--- mlton/trunk/mlton/ast/int-size.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/int-size.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -14,10 +14,6 @@
fun bits (T {bits, ...}) = bits
-val toString = Bits.toString o bits
-
-val layout = Layout.str o toString
-
fun compare (s, s') = Bits.compare (bits s, bits s')
val {equals, ...} = Relation.compare compare
@@ -47,8 +43,6 @@
val all = List.map (sizes, fromBits)
-val prims = List.map ([8, 16, 32, 64], fromBits o Bits.fromInt)
-
val memoize: (t -> 'a) -> t -> 'a =
fn f =>
let
@@ -57,38 +51,4 @@
fn T {bits = b, ...} => valOf (Vector.sub (v, Bits.toInt b))
end
-fun roundUpToPrim s =
- let
- val bits = Bits.toInt (bits s)
- val bits =
- if bits <= 8
- then 8
- else if bits <= 16
- then 16
- else if bits <= 32
- then 32
- else if bits = 64
- then 64
- else Error.bug "IntSize.roundUpToPrim"
- in
- fromBits (Bits.fromInt bits)
- end
-
-val bytes: t -> Bytes.t = Bits.toBytes o bits
-
-val cardinality = memoize (fn s => IntInf.pow (2, Bits.toInt (bits s)))
-
-datatype prim = I8 | I16 | I32 | I64
-
-val primOpt =
- memoize (fn T {bits, ...} =>
- List.peekMap ([(8, I8), (16, I16), (32, I32), (64, I64)],
- fn (b, p) =>
- if b = Bits.toInt bits then SOME p else NONE))
-
-fun prim s =
- case primOpt s of
- NONE => Error.bug "IntSize.prim"
- | SOME p => p
-
end
Modified: mlton/trunk/mlton/ast/int-size.sig
===================================================================
--- mlton/trunk/mlton/ast/int-size.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/int-size.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -5,8 +5,6 @@
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature INT_SIZE_STRUCTS =
sig
end
@@ -19,16 +17,7 @@
val all: t list
val bits: t -> Bits.t
- val bytes: t -> Bytes.t
- val cardinality: t -> IntInf.t
- val compare: t * t -> Relation.t
val equals: t * t -> bool
val fromBits : Bits.t -> t
- val layout: t -> Layout.t
val memoize: (t -> 'a) -> t -> 'a
- datatype prim = I8 | I16 | I32 | I64
- val prim: t -> prim
- val prims: t list
- val roundUpToPrim: t -> t
- val toString: t -> string
end
Modified: mlton/trunk/mlton/ast/real-size.fun
===================================================================
--- mlton/trunk/mlton/ast/real-size.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/real-size.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -14,12 +14,6 @@
val all = [R32, R64]
-val compare =
- fn (R32, R32) => EQUAL
- | (R32, _) => LESS
- | (R64, R64) => EQUAL
- | _ => GREATER
-
val equals: t * t -> bool = op =
val memoize: (t -> 'a) -> t -> 'a =
@@ -36,8 +30,6 @@
fn R32 => "32"
| R64 => "64"
-val layout = Layout.str o toString
-
val bytes: t -> Bytes.t =
fn R32 => Bytes.fromInt 4
| R64 => Bytes.fromInt 8
Modified: mlton/trunk/mlton/ast/real-size.sig
===================================================================
--- mlton/trunk/mlton/ast/real-size.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/real-size.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -18,9 +18,7 @@
val all: t list
val bits: t -> Bits.t
val bytes: t -> Bytes.t
- val compare: t * t -> Relation.t
val equals: t * t -> bool
- val layout: t -> Layout.t
val memoize: (t -> 'a) -> t -> 'a
val toString: t -> string
end
Modified: mlton/trunk/mlton/ast/record.fun
===================================================================
--- mlton/trunk/mlton/ast/record.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/record.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -19,10 +19,6 @@
val tuple = Tuple
-val isTuple =
- fn Tuple _ => true
- | _ => false
-
fun toVector r =
case r of
Tuple v => Vector.mapi (v, fn (i, x) => (Field.Int i, x))
@@ -51,15 +47,6 @@
else Record v
end
-fun equals (r, r', eq) =
- case (r, r') of
- (Tuple v, Tuple v') => Vector.equals (v, v', eq)
- | (Record fs, Record fs') =>
- Vector.equals
- (fs, sort fs', fn ((f, v), (f', v')) =>
- Field.equals (f, f') andalso eq (v, v'))
- | _ => false
-
val peek: 'a t * Field.t -> 'a option =
fn (r, f) =>
case r of
@@ -89,13 +76,6 @@
fun forall (r, p) = not (exists (r, not o p))
-fun foldi (r, b, f) =
- case r of
- Tuple xs => Vector.foldi (xs, b, fn (i, x, b) => f (Field.Int i, x, b))
- | Record r => Vector.fold (r, b, fn ((i, x), b) => f (i, x, b))
-
-fun fold (r, b, f) = foldi (r, b, fn (_, a, b) => f (a, b))
-
fun map (r: 'a t, f: 'a -> 'b): 'b t =
case r of
Tuple xs => Tuple (Vector.map (xs, f))
@@ -118,12 +98,6 @@
fun zip z = fromVector (Vector.zip z)
-fun unzip r =
- case r of
- Tuple v => (Vector.tabulate (Vector.length v, Field.Int),
- v)
- | Record r => Vector.unzip r
-
fun layout {record, layoutTuple, separator, extra, layoutElt} =
case (record, extra) of
(Tuple xs, "") => layoutTuple xs
Modified: mlton/trunk/mlton/ast/record.sig
===================================================================
--- mlton/trunk/mlton/ast/record.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/record.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -24,14 +24,10 @@
val change: 'a t * ('a vector -> 'b vector * 'c) -> 'b t * 'c
(* detuple r returns the components, if r is a tuple *)
val detupleOpt: 'a t -> 'a vector option
- val equals: 'a t * 'a t * ('a * 'a -> bool) -> bool
val exists: 'a t * ('a -> bool) -> bool
- val fold: 'a t * 'b * ('a * 'b -> 'b) -> 'b
- val foldi: 'a t * 'b * (Field.t * 'a * 'b ->'b) -> 'b
val forall: 'a t * ('a -> bool) -> bool
val foreach: 'a t * ('a -> unit) -> unit
val fromVector: (Field.t * 'a) vector -> 'a t
- val isTuple: 'a t -> bool
val layout: {record: 'a t,
separator: string,
extra: string,
@@ -44,6 +40,5 @@
val toVector: 'a t -> (Field.t * 'a) vector
(* tuple [a, b, c] creates {1 = a, 2 = b, 3 = c} *)
val tuple: 'a vector -> 'a t
- val unzip: 'a t -> Field.t vector * 'a vector
val zip: Field.t vector * 'a vector -> 'a t
end
Modified: mlton/trunk/mlton/ast/word-size.fun
===================================================================
--- mlton/trunk/mlton/ast/word-size.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/word-size.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -16,8 +16,6 @@
val toString = Bits.toString o bits
-val layout = Layout.str o toString
-
fun compare (s, s') = Bits.compare (bits s, bits s')
val {equals, ...} = Relation.compare compare
@@ -30,8 +28,6 @@
fun isValidSize (i: int) =
(1 <= i andalso i <= 32) orelse i = 64
-val one = fromBits (Bits.fromInt 1)
-
val byte = fromBits (Bits.fromInt 8)
val bool = fromBits (Bits.fromInt 32)
@@ -113,6 +109,4 @@
NONE => Error.bug "WordSize.prim"
| SOME p => p
-fun s + s' = fromBits (Bits.+ (bits s, bits s'))
-
end
Modified: mlton/trunk/mlton/ast/word-size.sig
===================================================================
--- mlton/trunk/mlton/ast/word-size.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/ast/word-size.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -17,7 +17,6 @@
type t
- val + : t * t -> t
val all: t list
val bits: t -> Bits.t
val bool: t
@@ -29,11 +28,9 @@
val equals: t * t -> bool
val fromBits: Bits.t -> t
val isInRange: t * IntInf.t * {signed: bool} -> bool
- val layout: t -> Layout.t
val max: t * {signed: bool} -> IntInf.t
val min: t * {signed: bool} -> IntInf.t
val memoize: (t -> 'a) -> t -> 'a
- val one: t
val pointer: unit -> t
datatype prim = W8 | W16 | W32 | W64
val prim: t -> prim
Modified: mlton/trunk/mlton/atoms/atoms.fun
===================================================================
--- mlton/trunk/mlton/atoms/atoms.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/atoms.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -50,10 +50,7 @@
structure WordSize = WordSize)
structure Ffi = Ffi (structure CFunction = CFunction
structure CType = CType)
- structure Tyvars = UnorderedSet (Tyvar)
structure Vars = UnorderedSet (Var)
- structure Cons = UnorderedSet (Con)
- structure Tycons = UnorderedSet (Tycon)
end
open Atoms
Modified: mlton/trunk/mlton/atoms/atoms.sig
===================================================================
--- mlton/trunk/mlton/atoms/atoms.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/atoms.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -26,7 +26,6 @@
structure CFunction: C_FUNCTION
structure CType: C_TYPE
structure Con: CON
- structure Cons: SET
structure Const: CONST
structure Ffi: FFI
structure Func: FUNC
@@ -37,10 +36,8 @@
structure RealX: REAL_X
structure SourceInfo: SOURCE_INFO
structure Tycon: TYCON
- structure Tycons: SET
- structure Var: VAR
+ structure Var: VAR
structure Vars: SET
- structure Tyvars: SET
structure WordX: WORD_X
structure WordXVector: WORD_X_VECTOR
@@ -77,7 +74,7 @@
sharing CFunction = Atoms.CFunction
sharing CType = Atoms.CType
sharing Con = Atoms.Con
- sharing Cons = Atoms.Cons
+ (* sharing Cons = Atoms.Cons *)
sharing Const = Atoms.Const
sharing Ffi = Atoms.Ffi
sharing Field = Atoms.Field
@@ -92,9 +89,9 @@
sharing SortedRecord = Atoms.SortedRecord
sharing SourceInfo = Atoms.SourceInfo
sharing Tycon = Atoms.Tycon
- sharing Tycons = Atoms.Tycons
+ (* sharing Tycons = Atoms.Tycons *)
sharing Tyvar = Atoms.Tyvar
- sharing Tyvars = Atoms.Tyvars
+ (* sharing Tyvars = Atoms.Tyvars *)
sharing Var = Atoms.Var
sharing Vars = Atoms.Vars
sharing WordSize = Atoms.WordSize
Modified: mlton/trunk/mlton/atoms/c-type.fun
===================================================================
--- mlton/trunk/mlton/atoms/c-type.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/c-type.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -30,8 +30,6 @@
val bool = Int32
-val char = Int8
-
val pointer = Pointer
val thread = Pointer
Modified: mlton/trunk/mlton/atoms/c-type.sig
===================================================================
--- mlton/trunk/mlton/atoms/c-type.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/c-type.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -31,7 +31,6 @@
val align: t * Bytes.t -> Bytes.t
val all: t list
val bool: t
- val char: t
val equals: t * t -> bool
val memo: (t -> 'a) -> t -> 'a
(* name: I{8,16,32,64} R{32,64} W{8,16,32,64} *)
Modified: mlton/trunk/mlton/atoms/con-.fun
===================================================================
--- mlton/trunk/mlton/atoms/con-.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/con-.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -30,6 +30,8 @@
str " plist length is ",
Int.layout (PropertyList.length (plist c))]))
end
+(* quell unused warning *)
+val _ = stats
fun fromBool b = if b then truee else falsee
Modified: mlton/trunk/mlton/atoms/const-type.fun
===================================================================
--- mlton/trunk/mlton/atoms/const-type.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/const-type.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -13,10 +13,4 @@
datatype t = Bool | Real of RealSize.t | String | Word of WordSize.t
-val toString =
- fn Bool => "Bool"
- | Real rs => "Real" ^ (RealSize.toString rs)
- | String => "String"
- | Word ws => "Word" ^ (WordSize.toString ws)
-
end
Modified: mlton/trunk/mlton/atoms/const-type.sig
===================================================================
--- mlton/trunk/mlton/atoms/const-type.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/const-type.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -17,6 +17,4 @@
include CONST_TYPE_STRUCTS
datatype t = Bool | Real of RealSize.t | String | Word of WordSize.t
-
- val toString: t -> string
end
Modified: mlton/trunk/mlton/atoms/const.fun
===================================================================
--- mlton/trunk/mlton/atoms/const.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/const.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -48,7 +48,6 @@
val word = Word
val wordVector = WordVector
-val word8 = word o WordX.fromWord8
val string = wordVector o WordXVector.fromString
local
Modified: mlton/trunk/mlton/atoms/const.sig
===================================================================
--- mlton/trunk/mlton/atoms/const.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/const.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -49,6 +49,5 @@
val string: string -> t
val toString: t -> string
val word: WordX.t -> t
- val word8: Word8.t -> t
val wordVector: WordXVector.t -> t
end
Modified: mlton/trunk/mlton/atoms/generic-scheme.fun
===================================================================
--- mlton/trunk/mlton/atoms/generic-scheme.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/generic-scheme.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -14,20 +14,15 @@
type ty = Type.t
type tyvar = Tyvar.t
-datatype t = T of {tyvars: Tyvar.t vector,
- ty: Type.t}
+datatype t = T of {tyvars: tyvar vector,
+ ty: ty}
local
fun make f (T r) = f r
in
val ty = make #ty
- val tyvars = make #tyvars
end
-fun fromType t = T {tyvars = Vector.new0 (), ty = t}
-
-val equals = fn _ => Error.unimplemented "GenericScheme.equals"
-
fun layout (T {tyvars, ty}) =
let open Layout
val ty = Type.layout ty
@@ -48,20 +43,4 @@
*)
else Type.substitute (ty, Vector.zip (tyvars, args))
-fun makeGen (numTyvars, equality, makeType): t =
- let
- val tyvars =
- Vector.tabulate (numTyvars, fn _ =>
- Tyvar.newNoname {equality = equality})
- val tys = Vector.map (tyvars, Type.var)
- in T {tyvars = tyvars,
- ty = makeType (fn i => Vector.sub (tys, i))}
- end
-
-val make0 = fromType
-
-fun make1 makeType = makeGen (1, false, fn sub => makeType (sub 0))
-fun make2 makeType = makeGen (2, false, fn sub => makeType (sub 0, sub 1))
-fun makeEqual1 makeType = makeGen (1, true, fn sub => makeType (sub 0))
-
end
Modified: mlton/trunk/mlton/atoms/generic-scheme.sig
===================================================================
--- mlton/trunk/mlton/atoms/generic-scheme.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/generic-scheme.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -26,13 +26,6 @@
ty: ty}
val apply: t * ty vector -> ty
- val equals: t * t -> bool
- val fromType: ty -> t
val layout: t -> Layout.t
- val make0: ty -> t
- val make1: (ty -> ty) -> t
- val make2: (ty * ty -> ty) -> t
- val makeEqual1: (ty -> ty) -> t
val ty: t -> ty
- val tyvars: t -> tyvar vector
end
Modified: mlton/trunk/mlton/atoms/hash-type.fun
===================================================================
--- mlton/trunk/mlton/atoms/hash-type.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/hash-type.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -88,8 +88,6 @@
({isChar = false},
Tycon.BindingStrength.unit))})
- val toString = Layout.toString o layout
-
local
val same: tree * tree -> bool =
fn (Var a, Var a') => Tyvar.equals (a, a')
Modified: mlton/trunk/mlton/atoms/hash-type.sig
===================================================================
--- mlton/trunk/mlton/atoms/hash-type.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/hash-type.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -15,7 +15,6 @@
sig
include HASH_TYPE_STRUCTS
include TYPE_OPS
-(* sharing type intSize = IntSize.t *)
sharing type realSize = RealSize.t
sharing type tycon = Tycon.t
sharing type wordSize = WordSize.t
@@ -61,7 +60,6 @@
* The ai's are not required to contain every free variable in t
*)
val substitute: t * (Tyvar.t * t) vector -> t
- val toString: t -> string
val tycon: t -> Tycon.t
val var: Tyvar.t -> t
end
Modified: mlton/trunk/mlton/atoms/prim.fun
===================================================================
--- mlton/trunk/mlton/atoms/prim.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/prim.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -607,12 +607,10 @@
val bogus = MLton_bogus
val bug = MLton_bug
val deref = Ref_deref
-val deserialize = MLton_deserialize
val eq = MLton_eq
val equal = MLton_equal
val ffi = FFI
val ffiSymbol = FFI_Symbol
-val gcCollect = GC_collect
val intInfEqual = IntInf_equal
val intInfNeg = IntInf_neg
val intInfNotb = IntInf_notb
@@ -650,7 +648,6 @@
end
val reff = Ref_ref
-val serialize = MLton_serialize
val touch = MLton_touch
val vectorLength = Vector_length
val vectorSub = Vector_sub
@@ -661,14 +658,12 @@
val wordLshift = Word_lshift
val wordLt = Word_lt
val wordMul = Word_mul
-val wordMulCheck = Word_mulCheck
val wordNeg = Word_neg
val wordNegCheck = Word_negCheck
val wordNotb = Word_notb
val wordOrb = Word_orb
val wordRshift = Word_rshift
val wordSub = Word_sub
-val wordSubCheck = Word_subCheck
val wordToWord = Word_toWord
val isCommutative =
@@ -695,8 +690,6 @@
| Word_subCheck _ => true
| _ => false
-val mayRaise = mayOverflow
-
val kind: 'a t -> Kind.t =
fn p =>
let
@@ -1588,7 +1581,6 @@
structure Name =
struct
datatype t = datatype t
- val layout = layout
val toString = toString
end
Modified: mlton/trunk/mlton/atoms/prim.sig
===================================================================
--- mlton/trunk/mlton/atoms/prim.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/prim.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -168,7 +168,6 @@
| Word8Vector_toString (* defunctorize *)
| World_save (* ssa to rssa *)
- val layout: 'a t -> Layout.t
val toString: 'a t -> string
end
@@ -205,7 +204,6 @@
val bogus: 'a t
val bug: 'a t
val deref: 'a t
- val deserialize: 'a t
val eq: 'a t (* pointer equality *)
val equal: 'a t (* polymorphic equality *)
val equals: 'a t * 'a t -> bool
@@ -218,23 +216,21 @@
val ffi: 'a CFunction.t -> 'a t
val ffiSymbol: {name: string, cty: CType.t option} -> 'a t
val fromString: string -> 'a t option
- val gcCollect: 'a t
val intInfEqual: 'a t
val isCommutative: 'a t -> bool
(*
* isFunctional p = true iff p always returns same result when given
* same args and has no side effects.
* isFuntional implies not maySideEffect.
- * examples: Array_length, MLton_equal, Int_add
+ * examples: Array_length, MLton_equal, Word_add
* not examples: Array_array, Array_sub, Ref_deref, Ref_ref
*)
val isFunctional: 'a t -> bool
val layout: 'a t -> Layout.t
val layoutApp: 'a t * 'b vector * ('b -> Layout.t) -> Layout.t
val map: 'a t * ('a -> 'b) -> 'b t
- (* Int_addCheck, Int_mulCheck, Int_subCheck *)
+ (* examples: Word_addCheck, Word_mulCheck, Word_subCheck *)
val mayOverflow: 'a t -> bool
- val mayRaise: 'a t -> bool
(* examples: Array_update, Ref_assign
* not examples: Array_array, Array_sub, Ref_deref, Ref_ref
*)
@@ -243,7 +239,6 @@
val pointerSet: CType.t -> 'a t
val name: 'a t -> 'a Name.t
val reff: 'a t
- val serialize: 'a t
val toString: 'a t -> string
val touch: 'a t
val vectorLength: 'a t
@@ -255,11 +250,9 @@
val wordLt: WordSize.t * {signed: bool} -> 'a t
val wordLshift: WordSize.t -> 'a t
val wordMul: WordSize.t * {signed: bool} -> 'a t
- val wordMulCheck: WordSize.t * {signed: bool} -> 'a t
val wordNeg: WordSize.t -> 'a t
val wordOrb: WordSize.t -> 'a t
val wordRshift: WordSize.t * {signed: bool} -> 'a t
val wordSub: WordSize.t -> 'a t
- val wordSubCheck: WordSize.t * {signed: bool} -> 'a t
val wordToWord: WordSize.t * WordSize.t * {signed: bool} -> 'a t
end
Modified: mlton/trunk/mlton/atoms/profile-label.fun
===================================================================
--- mlton/trunk/mlton/atoms/profile-label.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/profile-label.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -18,7 +18,6 @@
fun make f (T r) = f r
in
val plist = make #plist
- val uniq = make #uniq
end
local
@@ -33,7 +32,5 @@
val layout = Layout.str o toString
- fun equals (l, l') = uniq l = uniq l'
-
val clear = PropertyList.clear o plist
end
Modified: mlton/trunk/mlton/atoms/profile-label.sig
===================================================================
--- mlton/trunk/mlton/atoms/profile-label.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/profile-label.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -14,7 +14,6 @@
type t
val clear: t -> unit
- val equals: t * t -> bool
val layout: t -> Layout.t
val new: unit -> t
val plist: t -> PropertyList.t
Modified: mlton/trunk/mlton/atoms/source-info.fun
===================================================================
--- mlton/trunk/mlton/atoms/source-info.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/source-info.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -72,8 +72,6 @@
val plist = make #plist
end
-fun anonymous r = new (Anonymous (Pos.fromRegion r))
-
local
val set: {hash: word,
name: string,
Modified: mlton/trunk/mlton/atoms/source-info.sig
===================================================================
--- mlton/trunk/mlton/atoms/source-info.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/source-info.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -18,7 +18,6 @@
type t
val all: unit -> t list
- val anonymous: Region.t -> t
val equals: t * t -> bool
val file: t -> File.t option
val gc: t
Modified: mlton/trunk/mlton/atoms/tycon.fun
===================================================================
--- mlton/trunk/mlton/atoms/tycon.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/tycon.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -41,5 +41,7 @@
str " plist length is ",
Int.layout (PropertyList.length (plist c))]))
end
+(* quell unused warning *)
+val _ = stats
end
Modified: mlton/trunk/mlton/atoms/type-ops.fun
===================================================================
--- mlton/trunk/mlton/atoms/type-ops.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/type-ops.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -17,7 +17,7 @@
structure RealSize = RealSize
structure WordSize = WordSize
end
-datatype realSize = datatype RealSize.t
+type realSize = RealSize.t
type tycon = Tycon.t
type wordSize = WordSize.t
@@ -64,10 +64,6 @@
else NONE
| _ => NONE
-val deArrayOpt = deUnaryOpt Tycon.array
-val deRefOpt = deUnaryOpt Tycon.reff
-val deWeakOpt = deUnaryOpt Tycon.weak
-
fun deUnary tycon t =
case deUnaryOpt tycon t of
SOME t => t
@@ -97,32 +93,8 @@
SOME t => t
| NONE => Error.bug "TypeOps.deTuple"
-fun nth (t, n) = Vector.sub (deTuple t, n)
-
val unitRef = reff unit
-fun deTycon t =
- case deConOpt t of
- SOME (c, _) => c
- | NONE => Error.bug "TypeOps.deTycon"
-
-fun deConConstOpt t =
- Option.map
- (deConOpt t, fn (c, ts) =>
- (c, Vector.map (ts, fn t =>
- case deConOpt t of
- SOME (c, _) => c
- | NONE => Error.bug "TypeOps.deConConstOpt")))
-
-fun deConConst t =
- case deConOpt t of
- NONE => Error.bug "TypeOps.deConConst"
- | SOME (c, ts) => (c, Vector.map (ts, fn t =>
- case deConOpt t of
- NONE => Error.bug "TypeOps.deConConst"
- | SOME (c, _) => c))
-
-
fun deArrowOpt t =
case deConOpt t of
SOME (c, ts) => if Tycon.equals (c, Tycon.arrow)
@@ -135,12 +107,9 @@
SOME x => x
| NONE => Error.bug "TypeOps.deArrow"
-val dearrow =
+val deArrow =
Trace.trace
("TypeOps.deArrow", layout, Layout.tuple2 (layout, layout))
deArrow
-val arg = #1 o dearrow
-val result = #2 o dearrow
-
end
Modified: mlton/trunk/mlton/atoms/type-ops.sig
===================================================================
--- mlton/trunk/mlton/atoms/type-ops.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/type-ops.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -6,8 +6,6 @@
* See the file MLton-LICENSE for details.
*)
-type int = Int.t
-
signature TYPE_OPS_STRUCTS =
sig
structure Tycon: TYCON
@@ -30,36 +28,27 @@
type wordSize
type t
- val arg: t -> t (* arg = #1 o dearrow *)
val array: t -> t
val arrow: t * t -> t
val bool: t
val con: tycon * t vector -> t
val deArray: t -> t
- val deArrayOpt: t -> t option
val deArrow: t -> t * t
val deArrowOpt: t -> (t * t) option
val deConOpt: t -> (tycon * t vector) option
- val deConConstOpt: t -> (tycon * tycon vector) option
- val deConConst: t -> (tycon * tycon vector)
val deRef: t -> t
- val deRefOpt: t -> t option
val deTuple: t -> t vector
val deTupleOpt: t -> t vector option
- val deTycon: t -> tycon
val deVector: t -> t
val deWeak: t -> t
- val deWeakOpt: t -> t option
val defaultWord: t
val exn: t
val intInf: t
val isTuple: t -> bool
val list: t -> t
- val nth: t * int -> t
val pointer: t
val real: realSize -> t
val reff: t -> t
- val result: t -> t (* result = #2 o dearrow *)
val thread: t
val tuple: t vector -> t
val unit: t
Modified: mlton/trunk/mlton/atoms/word-x.fun
===================================================================
--- mlton/trunk/mlton/atoms/word-x.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/word-x.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -10,7 +10,6 @@
open S
-type int = Int.t
type word = Word.t
val modulus: WordSize.t -> IntInf.t =
@@ -76,8 +75,6 @@
val fromIntInf = make
-fun fromWord8 w = make (Word8.toIntInf w, WordSize.byte)
-
fun isAllOnes w = value w = modulus (size w) - 1
fun isOne w = 1 = value w
@@ -155,23 +152,6 @@
make (swap (value w, {hi = Bits.toWord b - shift, lo = shift}), s)
end
-fun splice {hi, lo} =
- fromIntInf (value lo
- + IntInf.<< (value hi, Bits.toWord (WordSize.bits (size lo))),
- WordSize.+ (size hi, size lo))
-
-fun split (w, {lo}) =
- let
- val {size, value} = dest w
- val (q, r) = IntInf.quotRem (value, IntInf.<< (1, Bits.toWord lo))
- in
- {hi = fromIntInf (q, WordSize.fromBits (Bits.- (WordSize.bits size, lo))),
- lo = fromIntInf (r, WordSize.fromBits lo)}
- end
-
-fun bitIsSet (w, i: int) =
- 1 = IntInf.rem (IntInf.~>> (value w, Word.fromInt i), 2)
-
local
val make: ((IntInf.t * IntInf.t -> IntInf.t) * string) -> t * t -> t =
fn (f,name) => fn (w, w') =>
Modified: mlton/trunk/mlton/atoms/word-x.sig
===================================================================
--- mlton/trunk/mlton/atoms/word-x.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/atoms/word-x.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -22,13 +22,11 @@
val add: t * t -> t
val allOnes: WordSize.t -> t
val andb: t * t -> t
- val bitIsSet: t * Int.t -> bool
val equals: t * t -> bool
val ge: t * t * {signed: bool} -> bool
val gt: t * t * {signed: bool} -> bool
val fromChar: char -> t (* returns a word of size 8 *)
val fromIntInf: IntInf.t * WordSize.t -> t
- val fromWord8: Word8.t -> t
val isAllOnes: t -> bool
val isOne: t -> bool
val isMax: t * {signed: bool} -> bool
@@ -54,8 +52,6 @@
val ror: t * t -> t
val rshift : t * t * {signed: bool} -> t
val size: t -> WordSize.t
- val splice: {hi: t, lo: t} -> t
- val split: t * {lo: Bits.t} -> {hi: t, lo: t}
val sub: t * t -> t
val toChar: t -> char
val toInt: t -> int
Modified: mlton/trunk/mlton/backend/machine.fun
===================================================================
--- mlton/trunk/mlton/backend/machine.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/machine.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -108,8 +108,6 @@
("ty", Type.layout ty)]]
end
- val toString = Layout.toString o layout
-
local
fun make f (T r) = f r
in
@@ -161,7 +159,6 @@
local
fun make f (T r) = f r
in
- val offset = make #offset
val ty = make #ty
end
Modified: mlton/trunk/mlton/backend/machine.sig
===================================================================
--- mlton/trunk/mlton/backend/machine.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/machine.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -57,7 +57,6 @@
val new: {isRoot: bool, ty: Type.t} -> t
val numberOfNonRoot: unit -> int
val numberOfType: CType.t -> int
- val toString: t -> string
val ty: t -> Type.t
end
@@ -66,7 +65,6 @@
datatype t = T of {offset: Bytes.t,
ty: Type.t}
- val offset: t -> Bytes.t
val ty: t -> Type.t
end
Modified: mlton/trunk/mlton/backend/pointer-tycon.fun
===================================================================
--- mlton/trunk/mlton/backend/pointer-tycon.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/pointer-tycon.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -30,8 +30,6 @@
fun fromIndex i = T {index = ref i}
-fun compare (p, p') = Int.compare (index p, index p')
-
fun equals (pt, pt') = index pt = index pt'
val op <= = fn (pt, pt') => index pt <= index pt'
Modified: mlton/trunk/mlton/backend/pointer-tycon.sig
===================================================================
--- mlton/trunk/mlton/backend/pointer-tycon.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/pointer-tycon.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -18,7 +18,6 @@
type t
val <= : t * t -> bool
- val compare: t * t -> Relation.t
val equals: t * t -> bool
val fromIndex: Int.t -> t
val index: t -> Int.t (* index into objectTypes array *)
Modified: mlton/trunk/mlton/backend/rep-type.fun
===================================================================
--- mlton/trunk/mlton/backend/rep-type.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/rep-type.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -10,7 +10,7 @@
open S
-structure CFunction = Prim.CFunction
+structure CFunction = CFunction
type int = Int.t
@@ -53,8 +53,6 @@
| Word => str (concat ["Word", Bits.toString (width t)])
end
- val toString = Layout.toString o layout
-
val rec equals: t * t -> bool =
fn (t, t') =>
Bits.equals (width t, width t')
@@ -76,25 +74,16 @@
val word: Bits.t -> t = fn width => T {node = Word, width = width}
- val add: t * t -> t = #1
-
val bogusWord: t -> WordX.t =
fn t => WordX.one (WordSize.fromBits (width t))
- val address: t -> t =
- fn t => T {node = Address t,
- width = Bits.inPointer}
val andb: t * t -> t option = SOME o #1
- val arshift: t * t -> t = #1
-
val bool: t = word Bits.inWord
val bytes: t -> Bytes.t = Bits.toBytes o width
- val char: t = word Bits.inByte
-
val cPointer: unit -> t = fn () => word Bits.inPointer
val constant: WordX.t -> t = fn w => word (WordSize.bits (WordX.size w))
@@ -179,8 +168,6 @@
val isUnit = Trace.trace ("RepType.Type.isUnit", layout, Bool.layout) isUnit
- val isReal: t -> bool = isSome o deReal
-
val rec isSubtype: t * t -> bool =
fn (t, t') =>
if not (sameWidth (t, t'))
@@ -200,15 +187,11 @@
Trace.trace2 ("RepType.Type.isSubtype", layout, layout, Bool.layout)
isSubtype
- val junk: Bits.t -> t = word
-
val label: Label.t -> t =
fn l => T {node = Label l, width = Bits.inPointer}
val lshift: t * t -> t = #1
- val mul: t * t -> t = #1
-
val orb: t * t -> t option = SOME o #1
val pointer: PointerTycon.t -> t =
@@ -295,10 +278,6 @@
(1, WordSize.fromBits (Bits.fromInt 1))),
word (Bits.fromInt 31)))))
- val word8: t = word Bits.inByte
-
- val words: t -> Words.t = Bits.toWords o width
-
val zero: Bits.t -> t = word
fun bytesAndPointers (t: t): Bytes.t * int =
@@ -315,8 +294,6 @@
div Bytes.toInt Bytes.inPointer))
end)
| _ => (bytes t, 0)
-
- val isZero = fn _ => false
end
structure ObjectType =
@@ -325,12 +302,11 @@
structure Runtime = Runtime
type ty = Type.t
-
datatype t =
- Array of {elt: Type.t,
+ Array of {elt: ty,
hasIdentity: bool}
| Normal of {hasIdentity: bool,
- ty: Type.t}
+ ty: ty}
| Stack
| Weak of Type.t
| WeakGone
@@ -471,7 +447,8 @@
fun castIsOk {from, to, tyconTy = _} =
Bits.equals (width from, width to)
-fun checkPrimApp _ = true
+fun checkPrimApp {args, prim, result} =
+ case (args, Prim.name prim, result) of _ => true
fun offsetIsOk _ = true
Modified: mlton/trunk/mlton/backend/rep-type.sig
===================================================================
--- mlton/trunk/mlton/backend/rep-type.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/rep-type.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -42,9 +42,7 @@
type t
sharing type t = ObjectType.ty
- val add: t * t -> t
val bogusWord: t -> WordX.t
- val address: t -> t
val align: t * Bytes.t -> Bytes.t
val andb: t * t -> t option
val arrayOffsetIsOk: {base: t,
@@ -53,7 +51,6 @@
pointerTy: PointerTycon.t -> ObjectType.t,
result: t,
scale: Scale.t} -> bool
- val arshift: t * t -> t
val bool: t
val bytes: t -> Bytes.t
val castIsOk: {from: t,
@@ -62,7 +59,6 @@
val checkPrimApp: {args: t vector,
prim: t Prim.t,
result: t option} -> bool
- val char: t
val cPointer: unit -> t
val constant: WordX.t -> t
val deLabel: t -> Label.t option
@@ -76,14 +72,10 @@
val isCPointer: t -> bool
val isPointer: t -> bool
val isUnit: t -> bool
- val isReal: t -> bool
val isSubtype: t * t -> bool
- val isZero: t -> bool
- val junk: Bits.t -> t
val label: Label.t -> t
val layout: t -> Layout.t
val lshift: t * t -> t
- val mul: t * t -> t
val name: t -> string (* simple one letter abbreviation *)
val ofGCField: Runtime.GCField.t -> t
val ofWordVector: WordXVector.t -> t
@@ -102,13 +94,10 @@
val sum: t vector -> t
val thread: t
val toCType: t -> CType.t
- val toString: t -> string
val unit: t
val width: t -> Bits.t
- val word8: t
val word: Bits.t -> t
val wordVector: Bits.t -> t
- val words: t -> Words.t
val zero: Bits.t -> t
structure BuiltInCFunction:
Modified: mlton/trunk/mlton/backend/rssa.fun
===================================================================
--- mlton/trunk/mlton/backend/rssa.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/rssa.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -134,9 +134,6 @@
| Var {var, ...} => f (var, a)
| _ => a
- fun foreachVar (z: t, f: Var.t -> unit): unit =
- foldVars (z, (), f o #1)
-
fun replaceVar (z: t, f: Var.t -> t): t =
let
fun loop (z: t): t =
@@ -549,11 +546,8 @@
local
fun make f (T r) = f r
in
- val args = make #args
val kind = make #kind
val label = make #label
- val statements = make #statements
- val transfer = make #transfer
end
fun clear (T {args, label, statements, transfer, ...}) =
@@ -595,7 +589,6 @@
in
val blocks = make #blocks
val name = make #name
- val start = make #start
end
fun dest (T r) = r
@@ -867,6 +860,8 @@
handlesSignals = handlesSignals,
main = Function.dropProfile main,
objectTypes = objectTypes})
+ (* quell unused warning *)
+ val _ = dropProfile
fun copyProp (T {functions, handlesSignals, main, objectTypes, ...}): t =
let
Modified: mlton/trunk/mlton/backend/rssa.sig
===================================================================
--- mlton/trunk/mlton/backend/rssa.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/rssa.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -67,7 +67,6 @@
val bool: bool -> t
val cast: t * Type.t -> t
val layout: t -> Layout.t
- val foreachVar: t * (Var.t -> unit) -> unit
val replaceVar: t * (Var.t -> t) -> t
val ty: t -> Type.t
val word: WordX.t -> t
@@ -182,13 +181,10 @@
statements: Statement.t vector,
transfer: Transfer.t}
- val args: t -> (Var.t * Type.t) vector
val clear: t -> unit
val kind: t -> Kind.t
val label: t -> Label.t
val layout: t -> Layout.t
- val statements: t -> Statement.t vector
- val transfer: t -> Transfer.t
end
structure Function:
@@ -216,7 +212,6 @@
raises: Type.t vector option,
returns: Type.t vector option,
start: Label.t} -> t
- val start: t -> Label.t
end
structure Program:
Modified: mlton/trunk/mlton/backend/runtime.fun
===================================================================
--- mlton/trunk/mlton/backend/runtime.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/runtime.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -27,8 +27,6 @@
| StackLimit
| StackTop
- val equals: t * t -> bool = op =
-
(* val ty =
* fn CanHandle => CType.defaultInt
* | CardMap => CType.pointer
@@ -153,10 +151,6 @@
fun headerToTypeIndex w = Word.toInt (Word.>> (w, 0w1))
-val arrayHeaderSize = Bytes.scale (Bytes.inWord, 3)
-
-val intInfOverhead = Bytes.+ (arrayHeaderSize, Bytes.inWord) (* for the sign *)
-
val labelSize = Bytes.inWord
val limitSlop = Bytes.fromInt 512
@@ -165,19 +159,12 @@
val pointerSize = Bytes.inWord
-val array0Size =
- Bytes.+ (arrayHeaderSize, Bytes.inWord) (* for the forwarding pointer *)
-
val arrayLengthOffset = Bytes.~ (Bytes.scale (Bytes.inWord, 2))
val allocTooLarge = Bytes.fromWord 0wxFFFFFFFC
val headerOffset = Bytes.~ Bytes.inWord
-fun normalSize {nonPointers, pointers} =
- Bytes.+ (Words.toBytes nonPointers,
- Bytes.scale (pointerSize, pointers))
-
val maxFrameSize = Bytes.fromInt (Int.pow (2, 16))
end
Modified: mlton/trunk/mlton/backend/runtime.sig
===================================================================
--- mlton/trunk/mlton/backend/runtime.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/runtime.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -34,7 +34,6 @@
| StackLimit (* Must have StackTop <= StackLimit *)
| StackTop (* Points at the next available word on the stack. *)
- val equals: t * t -> bool
val layout: t -> Layout.t
val offset: t -> Bytes.t (* Field offset in struct GC_state. *)
val setOffsets: {canHandle: Bytes.t,
@@ -67,20 +66,14 @@
end
val allocTooLarge: Bytes.t
- val arrayHeaderSize: Bytes.t
val arrayLengthOffset: Bytes.t
- val array0Size: Bytes.t
val headerOffset: Bytes.t
val headerToTypeIndex: word -> int
- val intInfOverhead: Bytes.t
val labelSize: Bytes.t
(* Same as LIMIT_SLOP from gc.c. *)
val limitSlop: Bytes.t
val maxFrameSize: Bytes.t
val normalHeaderSize: Bytes.t
- (* normalBytes does not include the header. *)
- val normalSize: {nonPointers: Words.t,
- pointers: int} -> Bytes.t
val pointerSize: Bytes.t
val typeIndexToHeader: int -> word
end
Modified: mlton/trunk/mlton/backend/ssa-to-rssa.fun
===================================================================
--- mlton/trunk/mlton/backend/ssa-to-rssa.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/backend/ssa-to-rssa.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -12,7 +12,6 @@
open S
open Rssa
-datatype z = datatype IntSize.prim
datatype z = datatype WordSize.prim
structure S = Ssa
Modified: mlton/trunk/mlton/codegen/x86-codegen/peephole.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/peephole.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/peephole.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -15,12 +15,8 @@
type statement_element = (int * int option) * (statement_type -> bool)
type transfer_element = transfer_type -> bool
- val Zero : (statement_type -> bool) -> statement_element
- = fn p => ((0, SOME 0), p)
val One : (statement_type -> bool) -> statement_element
= fn p => ((1, SOME 1), p)
- val ZeroOrOne : (statement_type -> bool) -> statement_element
- = fn p => ((0, SOME 1), p)
val All : (statement_type -> bool) -> statement_element
= fn p => ((0, NONE), p)
Modified: mlton/trunk/mlton/codegen/x86-codegen/peephole.sig
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/peephole.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/peephole.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -29,9 +29,7 @@
type statement_element = (int * int option) * (statement_type -> bool)
type transfer_element = transfer_type -> bool
- val Zero : (statement_type -> bool) -> statement_element
val One : (statement_type -> bool) -> statement_element
- val ZeroOrOne : (statement_type -> bool) -> statement_element
val All : (statement_type -> bool) -> statement_element
type template = {start: statement_border,
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -31,7 +31,6 @@
structure x86LiveTransfers
= x86LiveTransfers(structure x86 = x86
- structure x86MLton = x86MLton
structure x86Liveness = x86Liveness
structure x86JumpInfo = x86JumpInfo
structure x86LoopInfo = x86LoopInfo)
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-live-transfers.sig
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-live-transfers.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-live-transfers.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -9,8 +9,6 @@
signature X86_LIVE_TRANSFERS_STRUCTS =
sig
structure x86 : X86
- structure x86MLton : X86_MLTON
- sharing x86 = x86MLton.x86
structure x86Liveness : X86_LIVENESS
sharing x86 = x86Liveness.x86
structure x86JumpInfo : X86_JUMP_INFO
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -18,7 +18,6 @@
structure LiveSet = struct
open MemLocSet
- fun fromMemLocSet s = s
fun toMemLocSet s = s
end
fun track memloc = ClassSet.contains(!x86MLtonBasic.Classes.livenessClasses,
@@ -36,15 +35,6 @@
then LiveSet.add(live, memloc)
else live))
- fun livenessMemlocs live
- = MemLocSet.fold
- (live,
- LiveSet.empty,
- fn (memloc, live)
- => if track memloc
- then LiveSet.add(live, memloc)
- else live)
-
structure LiveInfo =
struct
datatype t = T of {get: Label.t -> LiveSet.t,
@@ -62,8 +52,6 @@
fun setLiveOperands (T {set, ...}, label, live)
= set(label, livenessOperands live)
- fun setLiveMemlocs (T {set, ...}, label, live)
- = set(label, livenessMemlocs live)
fun setLive (T {set, ...}, label, live)
= set(label, live)
fun getLive (T {get, ...}, label)
@@ -117,7 +105,6 @@
in
val dead = make #dead
val liveIn = make #liveIn
- val liveOut = make #liveOut
end
fun toString (T {liveIn, liveOut, dead})
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.sig
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-liveness.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -19,7 +19,6 @@
structure LiveSet: sig
include SET
- val fromMemLocSet: x86.MemLocSet.t -> t
val toMemLocSet: t -> x86.MemLocSet.t
end
sharing type LiveSet.Element.t = x86.MemLoc.t
@@ -32,7 +31,6 @@
val newLiveInfo : unit -> t
val setLiveOperands : t * x86.Label.t * x86.Operand.t list -> unit
- val setLiveMemlocs : t * x86.Label.t * x86.MemLocSet.t -> unit
val setLive : t * x86.Label.t * LiveSet.t -> unit
val getLive : t * x86.Label.t -> LiveSet.t
val completeLiveInfo : {chunk: x86.Chunk.t,
@@ -52,7 +50,6 @@
val dead: t -> LiveSet.t
val liveIn: t -> LiveSet.t
- val liveOut: t -> LiveSet.t
val livenessAssembly : {assembly : x86.Assembly.t, live : LiveSet.t} -> t
val livenessEntry : {entry : x86.Entry.t, live : LiveSet.t} -> t
val livenessTransfer : {transfer: x86.Transfer.t, liveInfo: LiveInfo.t} -> t
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -15,7 +15,6 @@
local
open Machine
in
- structure CFunction = CFunction
structure CType = CType
structure Runtime = Runtime
end
@@ -28,10 +27,6 @@
val wordScale = Scale.fromBytes wordBytes
val pointerBytes = Bytes.toInt Runtime.pointerSize
val pointerSize = Size.fromBytes pointerBytes
- val pointerScale = Scale.fromBytes pointerBytes
- val normalHeaderBytes = Bytes.toInt Runtime.normalHeaderSize
- val arrayHeaderBytes = Bytes.toInt Runtime.arrayHeaderSize
- val intInfOverheadBytes = Bytes.toInt Runtime.intInfOverhead
(*
* Memory classes
@@ -394,9 +389,6 @@
val globalPointerNonRoot_base = Label.fromString "globalPointerNonRoot"
- val saveGlobals = Label.fromString "saveGlobals"
- val loadGlobals = Label.fromString "loadGlobals"
-
val fileNameLabel = Label.fromString "fileName"
val fileName = Operand.immediate_label fileNameLabel
(* This is a hack: The line number needs to be pushed, but the actual
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.sig
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -41,10 +41,6 @@
val wordScale : x86.Scale.t
val pointerBytes : int
val pointerSize : x86.Size.t
- val pointerScale : x86.Scale.t
- val normalHeaderBytes : int
- val arrayHeaderBytes : int
- val intInfOverheadBytes : int
(*
* Memory classes
@@ -106,10 +102,6 @@
val global_base : x86.CType.t -> x86.Label.t
val globalPointerNonRoot_base : x86.Label.t
- (* Static functions defined in main.h *)
- val saveGlobals : x86.Label.t
- val loadGlobals : x86.Label.t
-
(* Misc. *)
val fileNameLabel : x86.Label.t
val fileName : x86.Operand.t
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-mlton.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -16,7 +16,6 @@
open Machine
in
structure CFunction = CFunction
- structure IntSize = IntSize
structure RealSize = RealSize
structure Prim = Prim
structure WordSize = WordSize
@@ -32,7 +31,6 @@
fun implementsPrim (p: 'a Prim.t) =
let
- datatype z = datatype IntSize.prim
datatype z = datatype RealSize.t
datatype z = datatype WordSize.prim
fun w32168 s =
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-pseudo.sig
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-pseudo.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-pseudo.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -415,9 +415,6 @@
sig
datatype t = T of {size: int,
frameLayoutsIndex: int}
-
- val frameInfo : {size: int,
- frameLayoutsIndex: int} -> t
end
structure Entry:
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -3751,8 +3751,6 @@
"size = ", Int.toString size, ", ",
"frameLayoutsIndex = ",
Int.toString frameLayoutsIndex, "}"]
-
- val frameInfo = T
end
structure Entry =
@@ -3855,11 +3853,6 @@
val cont = Cont
val handler = Handler
val creturn = CReturn
-
- val isNear = fn Jump _ => true
- | CReturn {func, ...}
- => not (CFunction.maySwitchThreads func)
- | _ => false
end
structure Transfer =
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86.sig
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -1070,9 +1070,6 @@
sig
datatype t = T of {size: int,
frameLayoutsIndex: int}
-
- val frameInfo: {size: int,
- frameLayoutsIndex: int} -> t
end
structure Entry:
@@ -1105,7 +1102,6 @@
label: Label.t,
live: MemLocSet.t} -> t
val isFunc : t -> bool
- val isNear : t -> bool
val jump : {label: Label.t} -> t
val label : t -> Label.t
val live : t -> MemLocSet.t
Modified: mlton/trunk/mlton/control/bits.sml
===================================================================
--- mlton/trunk/mlton/control/bits.sml 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/control/bits.sml 2007-02-10 00:06:07 UTC (rev 5162)
@@ -39,7 +39,6 @@
val toIntInf: t -> IntInf.t
val toString: t -> string
val toWord: t -> word
- val toWords: t -> words
val zero: t
end
@@ -124,11 +123,6 @@
else Error.bug "Bits.toBytes"
val toWord = Word.fromIntInf
-
- fun toWords b =
- if isWordAligned b
- then quot (b, inWord)
- else Error.bug "Bits.toWords"
end
type bytes = IntInf.t
Modified: mlton/trunk/mlton/core-ml/core-ml.fun
===================================================================
--- mlton/trunk/mlton/core-ml/core-ml.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/core-ml/core-ml.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -283,8 +283,6 @@
struct
datatype t = datatype lambda
- val layout = layoutLambda
-
val make = Lam
fun dest (Lam r) = r
Modified: mlton/trunk/mlton/core-ml/core-ml.sig
===================================================================
--- mlton/trunk/mlton/core-ml/core-ml.sig 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/core-ml/core-ml.sig 2007-02-10 00:06:07 UTC (rev 5162)
@@ -140,7 +140,6 @@
argType: Type.t,
body: Exp.t,
mayInline: bool}
- val layout: t -> Layout.t
val make: {arg: Var.t,
argType: Type.t,
body: Exp.t,
Modified: mlton/trunk/mlton/elaborate/elaborate-env.fun
===================================================================
--- mlton/trunk/mlton/elaborate/elaborate-env.fun 2007-02-09 17:33:07 UTC (rev 5161)
+++ mlton/trunk/mlton/elaborate/elaborate-env.fun 2007-02-10 00:06:07 UTC (rev 5162)
@@ -158,8 +158,6 @@
struct
open Scheme
- fun bogus () = fromType (Type.new ())
-
fun explainDoesNotAdmitEquality (s: t): Layout.t =
Type.explainDoesNotAdmitEquality (ty s)
end
@@ -302,8 +300,6 @@
scheme: Scheme.t,
uses: Ast.Vid.t Uses.t} vector
- val empty = T (Vector.new0 ())
-
fun layout (T v) =
Vector.layout (fn {name, scheme, ...} =>
let
@@ -375,10 +371,6 @@
| Tycon c => Tycon.layout c
end
- fun bogus (k: Kind.t): t =
- T {kind = k,
- node = Scheme (Scheme.bogus ())}
-
fun abs t =
case node t of
Datatype {tycon, ...} => T {kind = kind t,
@@ -391,11 +383,6 @@
| Scheme s => Scheme.apply (s, tys)
| Tycon t => Type.con (t, tys)
- fun cons t =
- case node t of
- Datatype {cons, ...} => cons
- | _ => Cons.empty
-
fun data (tycon, kind, cons) =
T {kind = kind,
node = Datatype {tycon = tycon, cons = cons}}
@@ -1255,6 +1242,8 @@
in
record [("total", Int.layout (
More information about the MLton-commit
mailing list