diff options
author | Damien Doligez <damien.doligez@inria.fr> | 2016-08-01 16:06:59 +0200 |
---|---|---|
committer | Damien Doligez <damien.doligez@inria.fr> | 2016-08-01 16:06:59 +0200 |
commit | 0b4fbc2b3083f2fb78713cb56a031768be2c85f2 (patch) | |
tree | 96e44efbe3eefd0a22d21d0ccaa5c9b1491dd5f3 /middle_end | |
parent | 234b8ecefc3bb8010e10472a71256506b954b58a (diff) | |
download | ocaml-0b4fbc2b3083f2fb78713cb56a031768be2c85f2.tar.gz |
fix whitespace, long lines, headers
Diffstat (limited to 'middle_end')
-rw-r--r-- | middle_end/flambda_utils.ml | 5 | ||||
-rwxr-xr-x | middle_end/inconstant_idents.ml | 3 | ||||
-rwxr-xr-x | middle_end/inline_and_simplify.ml | 3 | ||||
-rwxr-xr-x | middle_end/inline_and_simplify_aux.mli | 5 | ||||
-rw-r--r-- | middle_end/ref_to_variables.ml | 2 | ||||
-rw-r--r-- | middle_end/simplify_primitives.ml | 3 |
6 files changed, 13 insertions, 8 deletions
diff --git a/middle_end/flambda_utils.ml b/middle_end/flambda_utils.ml index 0eafaeaff4..7f052b1c10 100644 --- a/middle_end/flambda_utils.ml +++ b/middle_end/flambda_utils.ml @@ -95,8 +95,9 @@ let rec same (l1 : Flambda.t) (l2 : Flambda.t) = Variable.equal var1 var2 && same_named defining_expr1 defining_expr2 && same body1 body2 | Let _, _ | _, Let _ -> false - | Let_mutable { var = mv1; initial_value = v1; contents_kind = ck1; body = b1 }, - Let_mutable { var = mv2; initial_value = v2; contents_kind = ck2; body = b2 } -> + | Let_mutable {var = mv1; initial_value = v1; contents_kind = ck1; body = b1}, + Let_mutable {var = mv2; initial_value = v2; contents_kind = ck2; body = b2} + -> Mutable_variable.equal mv1 mv2 && Variable.equal v1 v2 && ck1 = ck2 diff --git a/middle_end/inconstant_idents.ml b/middle_end/inconstant_idents.ml index 44a389ed33..3bcce14316 100755 --- a/middle_end/inconstant_idents.ml +++ b/middle_end/inconstant_idents.ml @@ -336,7 +336,8 @@ module Inconstants (P:Param) (Backend:Backend_intf.S) = struct makeblock(Mutable) can be a 'constant' if it is allocated at toplevel: if this expression is evaluated only once. *) - | Prim (Lambda.Pmakeblock (_tag, Asttypes.Immutable, _value_kind), args, _dbg) -> + | Prim (Lambda.Pmakeblock (_tag, Asttypes.Immutable, _value_kind), args, + _dbg) -> mark_vars args curr (* (* CR-someday pchambart: If global mutables are allowed: *) | Prim(Lambda.Pmakeblock(_tag, Asttypes.Mutable), args, _dbg, _) diff --git a/middle_end/inline_and_simplify.ml b/middle_end/inline_and_simplify.ml index 4c4e72d096..60090e43fe 100755 --- a/middle_end/inline_and_simplify.ml +++ b/middle_end/inline_and_simplify.ml @@ -1029,7 +1029,8 @@ and simplify_named env r (tree : Flambda.named) : Flambda.named * R.t = | Pfloatarray | Pgenarray -> () | Paddrarray | Pintarray -> (* CR pchambart: Do a proper warning here *) - Misc.fatal_errorf "Assignment of a float to a specialised non-float array: %a" + Misc.fatal_errorf "Assignment of a float to a specialised \ + non-float array: %a" Flambda.print_named tree end; Lambda.Pfloatarray diff --git a/middle_end/inline_and_simplify_aux.mli b/middle_end/inline_and_simplify_aux.mli index 0b493070d1..a1b71c145b 100755 --- a/middle_end/inline_and_simplify_aux.mli +++ b/middle_end/inline_and_simplify_aux.mli @@ -259,8 +259,9 @@ module Env : sig (** Print a human-readable version of the given environment. *) val print : Format.formatter -> t -> unit - (** The environment stores the call-site being inlined to produce precise location - information. This function sets the current call-site being inlined. *) + (** The environment stores the call-site being inlined to produce + precise location information. This function sets the current + call-site being inlined. *) val set_inline_debuginfo : t -> dbg:Debuginfo.t -> t (** Appends the locations of inlined call-sites to the [~dbg] argument *) diff --git a/middle_end/ref_to_variables.ml b/middle_end/ref_to_variables.ml index 1b36d551c5..a59563e2ed 100644 --- a/middle_end/ref_to_variables.ml +++ b/middle_end/ref_to_variables.ml @@ -132,7 +132,7 @@ let eliminate_ref_of_expr flam = let aux (flam : Flambda.t) : Flambda.t = match flam with | Let { var; - defining_expr = Prim(Pmakeblock(0, Asttypes.Mutable, shape), l, _); + defining_expr = Prim(Pmakeblock(0, Asttypes.Mutable, shape), l,_); body } when convertible_variable var -> let shape = match shape with diff --git a/middle_end/simplify_primitives.ml b/middle_end/simplify_primitives.ml index dadbdaff91..19055e7dc1 100644 --- a/middle_end/simplify_primitives.ml +++ b/middle_end/simplify_primitives.ml @@ -152,7 +152,8 @@ let primitive (p : Lambda.primitive) (args, approxs) expr dbg ~size_int | Ostype_unix -> S.const_bool_expr expr (Sys.os_type = "Unix") | Ostype_win32 -> S.const_bool_expr expr (Sys.os_type = "Win32") | Ostype_cygwin -> S.const_bool_expr expr (Sys.os_type = "Cygwin") - | Backend_type -> S.const_ptr_expr expr 0 (* tag 0 is the same as Native *) + | Backend_type -> + S.const_ptr_expr expr 0 (* tag 0 is the same as Native *) end | _ -> expr, A.value_unknown Other, C.Benefit.zero end |