[MLton-commit] r6757

Matthew Fluet fluet at mlton.org
Tue Aug 19 15:15:23 PDT 2008


Rename Primitive.Vector.fromArray to Primitive.Vector.fromArrayUnsafe.
----------------------------------------------------------------------

U   mlton/trunk/basis-library/arrays-and-vectors/vector.sml
U   mlton/trunk/basis-library/integer/int-inf0.sml
U   mlton/trunk/basis-library/primitive/prim-seq.sml

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/arrays-and-vectors/vector.sml
===================================================================
--- mlton/trunk/basis-library/arrays-and-vectors/vector.sml	2008-08-19 22:15:15 UTC (rev 6756)
+++ mlton/trunk/basis-library/arrays-and-vectors/vector.sml	2008-08-19 22:15:21 UTC (rev 6757)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -10,7 +10,7 @@
    struct
       structure V = Sequence (type 'a sequence = 'a vector
                               type 'a elt = 'a
-                              val fromArray = Primitive.Vector.fromArray
+                              val fromArray = Primitive.Vector.fromArrayUnsafe
                               val isMutable = false
                               val length = Primitive.Vector.length
                               val subUnsafe = Primitive.Vector.subUnsafe)
@@ -57,7 +57,7 @@
 
       val isSubvector = isSubsequence
 
-      val unsafeFromArray = Primitive.Vector.fromArray
+      val unsafeFromArray = Primitive.Vector.fromArrayUnsafe
 
       val vector = new
 

Modified: mlton/trunk/basis-library/integer/int-inf0.sml
===================================================================
--- mlton/trunk/basis-library/integer/int-inf0.sml	2008-08-19 22:15:15 UTC (rev 6756)
+++ mlton/trunk/basis-library/integer/int-inf0.sml	2008-08-19 22:15:21 UTC (rev 6757)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -476,7 +476,7 @@
                                                ; loop acc)
                        val () = loop acc
                     in
-                       Prim.fromVector (V.fromArray a)
+                       Prim.fromVector (V.fromArrayUnsafe a)
                     end
       in
          fun extdFromWord8 (sextd, w) =

Modified: mlton/trunk/basis-library/primitive/prim-seq.sml
===================================================================
--- mlton/trunk/basis-library/primitive/prim-seq.sml	2008-08-19 22:15:15 UTC (rev 6756)
+++ mlton/trunk/basis-library/primitive/prim-seq.sml	2008-08-19 22:15:21 UTC (rev 6757)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -30,7 +30,7 @@
       (* Don't mutate the array after you apply fromArray, because vectors 
        * are supposed to be immutable and the optimizer depends on this.  
        *)
-      val fromArray = _prim "Array_toVector": 'a array -> 'a vector;
+      val fromArrayUnsafe = _prim "Array_toVector": 'a array -> 'a vector;
       val length = _prim "Vector_length": 'a vector -> SeqIndex.int;
       val subUnsafe = _prim "Vector_sub": 'a vector * SeqIndex.int -> 'a;
    end




More information about the MLton-commit mailing list