Commits

Anonymous committed 2f3910d

Annotations "noalloc" sur les primitives.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@144f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

Comments (0)

Files changed (6)

stdlib/hashtbl.ml

       Empty -> false
     | Cons(_,_,rest) -> bucket_too_long (pred n) rest
 
-external hash_param : int -> int -> 'a -> int = "hash_univ_param"
+external hash_param : int -> int -> 'a -> int = "hash_univ_param" "noalloc"
 
 let add h key info =
   let i = (hash_param 10 100 key) mod (Array.length h.data) in

stdlib/hashtbl.mli

            Moreover, [hash] always terminates, even on cyclic
            structures. *)
 
-external hash_param : int -> int -> 'a -> int = "hash_univ_param"
+external hash_param : int -> int -> 'a -> int = "hash_univ_param" "noalloc"
         (* [hash_param n m x] computes a hash val for [x], with the
            same properties as for [hash]. The two extra parameters [n] and
            [m] give more precise control over hashing. Hashing performs a

stdlib/pervasives.ml

 external (>) : 'a -> 'a -> bool = "%greaterthan"
 external (<=) : 'a -> 'a -> bool = "%lessequal"
 external (>=) : 'a -> 'a -> bool = "%greaterequal"
-external compare: 'a -> 'a -> int = "compare"
+external compare: 'a -> 'a -> int = "compare" "noalloc"
 
 let min x y = if x <= y then x else y
 let max x y = if x >= y then x else y

stdlib/pervasives.mli

 external (>) : 'a -> 'a -> bool = "%greaterthan"
 external (<=) : 'a -> 'a -> bool = "%lessequal"
 external (>=) : 'a -> 'a -> bool = "%greaterequal"
-external compare: 'a -> 'a -> int = "compare"
+external compare: 'a -> 'a -> int = "compare" "noalloc"
 val min: 'a -> 'a -> 'a
 val max: 'a -> 'a -> 'a
 external (==) : 'a -> 'a -> bool = "%eq"
 external unsafe_get : string -> int -> char = "%string_unsafe_get"
 external unsafe_set : string -> int -> char -> unit = "%string_unsafe_set"
 external unsafe_blit : string -> int -> string -> int -> int -> unit
-                = "blit_string"
-external unsafe_fill : string -> int -> int -> char -> unit = "fill_string"
+                     = "blit_string" "noalloc"
+external unsafe_fill : string -> int -> int -> char -> unit
+                     = "fill_string" "noalloc"
 
 let make n c =
   let s = create n in

stdlib/string.mli

 external unsafe_get : string -> int -> char = "%string_unsafe_get"
 external unsafe_set : string -> int -> char -> unit = "%string_unsafe_set"
 external unsafe_blit : string -> int -> string -> int -> int -> unit
-                     = "blit_string"
-external unsafe_fill : string -> int -> int -> char -> unit = "fill_string"
+                     = "blit_string" "noalloc"
+external unsafe_fill : string -> int -> int -> char -> unit
+                     = "fill_string" "noalloc"