summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2015-09-11 11:58:31 +0000
committerDamien Doligez <damien.doligez-inria.fr>2015-09-11 11:58:31 +0000
commitb860d631458802c8685aa59c9d7b66a9225fcedb (patch)
tree5c71dc62f86607551e97e53e11b8eb48a3b83bda
parentcf9002cfd8d56c86ebd91138fe75d1e2bb20a775 (diff)
downloadocaml-b860d631458802c8685aa59c9d7b66a9225fcedb.tar.gz
whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--.merlin1
-rw-r--r--.travis-ci.sh12
-rw-r--r--.travis.yml12
-rw-r--r--Changes7
-rw-r--r--Makefile2
-rw-r--r--README.win322
-rw-r--r--asmcomp/amd64/emit.mlp6
-rw-r--r--asmcomp/arm/proc.ml4
-rw-r--r--asmcomp/asmlink.ml10
-rw-r--r--asmcomp/clambda.ml2
-rw-r--r--asmcomp/cmm.mli2
-rw-r--r--asmcomp/cmmgen.ml54
-rw-r--r--asmcomp/emitaux.ml1
-rw-r--r--asmcomp/power/arch.ml4
-rw-r--r--asmcomp/power/emit.mlp26
-rw-r--r--asmcomp/power/proc.ml6
-rw-r--r--asmcomp/x86_dsl.ml2
-rw-r--r--asmcomp/x86_gas.ml6
-rw-r--r--asmcomp/x86_proc.ml1
-rw-r--r--asmcomp/x86_proc.mli3
-rw-r--r--asmrun/Makefile6
-rw-r--r--asmrun/arm64.S20
-rw-r--r--asmrun/backtrace_prim.c12
-rw-r--r--asmrun/fail.c4
-rw-r--r--asmrun/i386.S2
-rw-r--r--asmrun/power.S17
-rw-r--r--bytecomp/bytegen.ml9
-rw-r--r--bytecomp/bytelink.ml4
-rw-r--r--bytecomp/emitcode.ml3
-rw-r--r--bytecomp/lambda.mli3
-rw-r--r--bytecomp/matching.ml3
-rw-r--r--bytecomp/meta.ml3
-rw-r--r--bytecomp/meta.mli3
-rw-r--r--bytecomp/simplif.ml3
-rw-r--r--bytecomp/translclass.ml6
-rw-r--r--bytecomp/translcore.ml30
-rw-r--r--bytecomp/translmod.ml3
-rw-r--r--byterun/Makefile.common3
-rw-r--r--byterun/alloc.c4
-rw-r--r--byterun/backtrace.c6
-rw-r--r--byterun/backtrace_prim.c12
-rw-r--r--byterun/caml/backtrace.h18
-rw-r--r--byterun/caml/backtrace_prim.h10
-rw-r--r--byterun/caml/memory.h4
-rw-r--r--byterun/caml/signals_machdep.h6
-rw-r--r--byterun/caml/startup.h3
-rw-r--r--byterun/fix_code.c2
-rw-r--r--byterun/freelist.c8
-rw-r--r--byterun/gc_ctrl.c5
-rw-r--r--byterun/ints.c4
-rw-r--r--byterun/major_gc.c9
-rw-r--r--byterun/misc.c4
-rw-r--r--byterun/startup.c3
-rw-r--r--byterun/sys.c12
-rwxr-xr-xconfigure43
-rw-r--r--debugger/command_line.ml2
-rw-r--r--driver/main.ml8
-rw-r--r--driver/pparse.mli22
-rw-r--r--ocamldoc/Makefile3
-rw-r--r--ocamldoc/generators/odoc_literate.ml9
-rw-r--r--ocamldoc/odoc_cross.ml17
-rw-r--r--ocamldoc/odoc_extension.ml3
-rw-r--r--ocamldoc/odoc_messages.ml6
-rw-r--r--otherlibs/bigarray/bigarray.ml21
-rw-r--r--otherlibs/bigarray/bigarray.mli67
-rw-r--r--otherlibs/str/str.ml9
-rw-r--r--otherlibs/systhreads/st_posix.h3
-rw-r--r--otherlibs/unix/stat.c9
-rw-r--r--otherlibs/win32graph/dib.c35
-rw-r--r--otherlibs/win32graph/draw.c21
-rw-r--r--otherlibs/win32graph/open.c18
-rw-r--r--otherlibs/win32unix/select.c129
-rw-r--r--parsing/ast_helper.ml1
-rw-r--r--parsing/ast_helper.mli70
-rw-r--r--parsing/ast_mapper.ml36
-rw-r--r--parsing/ast_mapper.mli12
-rw-r--r--parsing/docstrings.ml3
-rw-r--r--parsing/lexer.mll3
-rw-r--r--parsing/location.ml3
-rw-r--r--parsing/parser.mly13
-rw-r--r--parsing/pprintast.ml87
-rw-r--r--parsing/pprintast.mli8
-rw-r--r--stdlib/camlinternalFormat.ml70
-rw-r--r--stdlib/camlinternalFormat.mli16
-rw-r--r--stdlib/camlinternalFormatBasics.ml25
-rw-r--r--stdlib/camlinternalFormatBasics.mli15
-rw-r--r--stdlib/pervasives.mli2
-rw-r--r--stdlib/scanf.ml12
-rw-r--r--testsuite/tests/asmcomp/power.S2
-rw-r--r--testsuite/tests/basic-modules/main.ml12
-rw-r--r--testsuite/tests/basic-modules/offset.ml12
-rw-r--r--testsuite/tests/basic-modules/pr6726.ml14
-rw-r--r--testsuite/tests/basic/constprop.ml80
-rw-r--r--testsuite/tests/basic/constprop.mlp7
-rw-r--r--testsuite/tests/basic/divint.ml81
-rw-r--r--testsuite/tests/basic/patmatch.ml94
-rw-r--r--testsuite/tests/basic/stringmatch.ml12
-rw-r--r--testsuite/tests/formats-transition/ignored_scan_counters.ml2
-rw-r--r--testsuite/tests/formats-transition/invalid_formats.ml4
-rw-r--r--testsuite/tests/int64-unboxing/test.ml3
-rw-r--r--testsuite/tests/lib-bigarray/bigarrays.ml5
-rw-r--r--testsuite/tests/lib-dynlink-native/Makefile3
-rw-r--r--testsuite/tests/lib-num/test_big_ints.ml35
-rw-r--r--testsuite/tests/lib-num/test_ratios.ml1
-rw-r--r--testsuite/tests/lib-str/t01.ml92
-rw-r--r--testsuite/tests/match-exception/allocation.ml3
-rw-r--r--testsuite/tests/match-exception/exception_propagation.ml2
-rw-r--r--testsuite/tests/match-exception/match_failure.ml4
-rw-r--r--testsuite/tests/match-exception/nested_handlers.ml10
-rw-r--r--testsuite/tests/match-exception/streams.ml4
-rw-r--r--testsuite/tests/misc-unsafe/almabench.ml3
-rw-r--r--testsuite/tests/tool-ocaml/t340-weak.ml2527
-rw-r--r--testsuite/tests/tool-ocaml/t350-heapcheck.ml2529
-rw-r--r--testsuite/tests/tool-ocamldoc/t03.ml7
-rw-r--r--testsuite/tests/typing-extensions/Makefile1
-rw-r--r--testsuite/tests/typing-extensions/cast.ml5
-rw-r--r--testsuite/tests/typing-extensions/cast.ml.reference2
-rw-r--r--testsuite/tests/typing-extensions/extensions.ml6
-rw-r--r--testsuite/tests/typing-extensions/extensions.ml.reference8
-rw-r--r--testsuite/tests/typing-fstclassmod/fstclassmod.ml6
-rw-r--r--testsuite/tests/typing-gadts/didier.ml19
-rw-r--r--testsuite/tests/typing-gadts/pr5906.ml3
-rw-r--r--testsuite/tests/typing-gadts/pr5906.ml.reference4
-rw-r--r--testsuite/tests/typing-gadts/pr6690.ml9
-rw-r--r--testsuite/tests/typing-gadts/pr6690.ml.principal.reference6
-rw-r--r--testsuite/tests/typing-gadts/pr6690.ml.reference12
-rw-r--r--testsuite/tests/typing-modules-bugs/pr51_ok.ml7
-rw-r--r--testsuite/tests/typing-modules-bugs/pr6513_ok.ml9
-rw-r--r--testsuite/tests/typing-poly-bugs/pr5673_bad.ml4
-rw-r--r--testsuite/tests/typing-poly-bugs/pr5673_ok.ml4
-rw-r--r--testsuite/tests/typing-poly/poly.ml6
-rw-r--r--testsuite/tests/typing-poly/poly.ml.principal.reference6
-rw-r--r--testsuite/tests/typing-poly/poly.ml.reference4
-rw-r--r--testsuite/tests/typing-warnings/pr6872.ml1
-rw-r--r--testsuite/tests/typing-warnings/pr6872.ml.principal.reference2
-rw-r--r--testsuite/tests/typing-warnings/pr6872.ml.reference2
-rw-r--r--testsuite/tests/typing-warnings/records.ml2
-rw-r--r--testsuite/tests/unboxed-primitive-args/common.ml7
-rw-r--r--testsuite/tests/unboxed-primitive-args/gen_test.ml16
-rw-r--r--testsuite/tests/utils/edit_distance.ml3
-rwxr-xr-xtools/check-typo2
-rw-r--r--tools/gdb-macros4
-rw-r--r--tools/ocamldep.ml4
-rw-r--r--tools/ocamlmklib.ml13
-rw-r--r--toplevel/opttoploop.ml2
-rw-r--r--toplevel/topdirs.ml6
-rw-r--r--toplevel/toploop.ml6
-rw-r--r--toplevel/toploop.mli3
-rw-r--r--typing/env.ml8
-rw-r--r--typing/env.mli3
-rw-r--r--typing/parmatch.ml3
-rw-r--r--typing/primitive.ml3
-rw-r--r--typing/printtyp.ml22
-rw-r--r--typing/printtyp.mli3
-rw-r--r--typing/printtyped.ml18
-rw-r--r--typing/tast_mapper.ml8
-rw-r--r--typing/typeclass.ml31
-rw-r--r--typing/typecore.ml42
-rw-r--r--typing/typecore.mli2
-rw-r--r--typing/typedecl.ml7
-rw-r--r--typing/typedtree.ml4
-rw-r--r--typing/typedtree.mli8
-rw-r--r--typing/typedtreeIter.mli25
-rw-r--r--typing/typedtreeMap.ml34
-rw-r--r--typing/typedtreeMap.mli6
-rw-r--r--typing/typemod.ml7
-rw-r--r--typing/types.ml6
-rw-r--r--typing/types.mli6
-rw-r--r--utils/misc.ml15
-rw-r--r--utils/misc.mli5
170 files changed, 1402 insertions, 5814 deletions
diff --git a/.merlin b/.merlin
index 9977984088..0442978ec5 100644
--- a/.merlin
+++ b/.merlin
@@ -48,4 +48,3 @@ B ./typing
S ./utils
B ./utils
-
diff --git a/.travis-ci.sh b/.travis-ci.sh
index ab5b3bf204..aa37577ba9 100644
--- a/.travis-ci.sh
+++ b/.travis-ci.sh
@@ -1,3 +1,15 @@
+#########################################################################
+# #
+# OCaml #
+# #
+# Anil Madhavapeddy, OCaml Labs #
+# #
+# Copyright 2014 Institut National de Recherche en Informatique et #
+# en Automatique. All rights reserved. This file is distributed #
+# under the terms of the Q Public License version 1.0. #
+# #
+#########################################################################
+
case $XARCH in
i386)
./configure
diff --git a/.travis.yml b/.travis.yml
index 3015c16d3b..93c47efa69 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,15 @@
+#########################################################################
+# #
+# OCaml #
+# #
+# Anil Madhavapeddy, OCaml Labs #
+# #
+# Copyright 2014 Institut National de Recherche en Informatique et #
+# en Automatique. All rights reserved. This file is distributed #
+# under the terms of the Q Public License version 1.0. #
+# #
+#########################################################################
+
language: c
script: bash -ex .travis-ci.sh
env:
diff --git a/Changes b/Changes
index ae6bb0577d..e57b5a0d03 100644
--- a/Changes
+++ b/Changes
@@ -73,8 +73,8 @@ Runtime system:
Standard library:
- PR#6316: Scanf.scanf failure on %u formats when reading big integers
(Xavier Leroy, Benoît Vaugon)
-- PR#6390, GPR#36: expose Sys.{int_size,max_wosize} for improved js_of_ocaml portability
- (Hugo Heuzard)
+- PR#6390, GPR#36: expose Sys.{int_size,max_wosize} for improved js_of_ocaml
+ portability (Hugo Heuzard)
* PR#6494: Add equal function in modules
Bytes, Char, Digest, Int32, Int64, Nativeint, and String
(Romain Calascibetta)
@@ -613,7 +613,8 @@ Type system:
(Jacques Garrigue, suggestion by Leo White)
* Module aliases are now typed in a specific way, which remembers their
identity. Compiled interfaces become smaller, but may depend on the
- original modules. This also changes the signature inferred by "module type of".
+ original modules. This also changes the signature inferred by
+ "module type of".
(Jacques Garrigue, feedback from Leo White, Mark Shinwell and Nick Chapman)
- PR#6331: Slight change in the criterion to distinguish private
abbreviations and private row types: create a private abbreviation for
diff --git a/Makefile b/Makefile
index 6d13e171ca..942ae3fd6e 100644
--- a/Makefile
+++ b/Makefile
@@ -471,7 +471,7 @@ utils/config.ml: utils/config.mlp config/Makefile
-e 's|%%CCOMPTYPE%%|cc|' \
-e 's|%%BYTECC%%|$(BYTECC) $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)|' \
-e 's|%%NATIVECC%%|$(NATIVECC) $(NATIVECCCOMPOPTS)|' \
- -e '/c_compiler =/s| -Werror||' \
+ -e '/c_compiler =/s| -Werror||' \
-e 's|%%PACKLD%%|$(PACKLD)|' \
-e 's|%%BYTECCLIBS%%|$(BYTECCLIBS)|' \
-e 's|%%NATIVECCLIBS%%|$(NATIVECCLIBS)|' \
diff --git a/README.win32 b/README.win32
index 8e66810249..2a207f3e25 100644
--- a/README.win32
+++ b/README.win32
@@ -18,7 +18,7 @@ Here is a summary of the main differences between these ports:
Native MS Native MinGW Cygwin
-64 bits? Win32 or Win64 Win32 or Win64 Win32 only
+64 bits? Win32 or Win64 Win32 or Win64 Win32 only
Third-party software required
- for base bytecode system none none none
diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
index 9a3d7c2e03..1e39a9490d 100644
--- a/asmcomp/amd64/emit.mlp
+++ b/asmcomp/amd64/emit.mlp
@@ -509,7 +509,7 @@ let emit_instr fallthrough i =
if system <> S_win64 then begin
(* TODO: investigate why such a diff.
This comes from:
- http://caml.inria.fr/cgi-bin/viewvc.cgi?view=revision&revision=12664
+ http://caml.inria.fr/cgi-bin/viewvc.cgi?view=revision&revision=12664
If we do the same for Win64, we probably need to change
amd64nt.asm accordingly.
@@ -732,7 +732,8 @@ let emit_instr fallthrough i =
else (phys_reg 0 (*rax*), phys_reg 4 (*rdx*)) in
I.lea (mem64_rip NONE lbl) (reg tmp1);
- I.movsxd (mem64 DWORD 0 (arg64 i 0) ~scale:4 ~base:(reg64 tmp1)) (reg tmp2);
+ I.movsxd (mem64 DWORD 0 (arg64 i 0) ~scale:4 ~base:(reg64 tmp1))
+ (reg tmp2);
I.add (reg tmp2) (reg tmp1);
I.jmp (reg tmp1);
@@ -1000,4 +1001,3 @@ let end_assembly() =
None
in
X86_proc.generate_code asm
-
diff --git a/asmcomp/arm/proc.ml b/asmcomp/arm/proc.ml
index dfc4fa2e56..d17d88ca13 100644
--- a/asmcomp/arm/proc.ml
+++ b/asmcomp/arm/proc.ml
@@ -159,10 +159,10 @@ let calling_conventions first_int last_int first_float last_float make_stack
ofs := !ofs + size_int64
end
| _, _ ->
+ let f = function Int -> "I" | Addr -> "A" | Val -> "V" | Float -> "F" in
fatal_error (Printf.sprintf "Proc.calling_conventions: bad register \
type(s) for multi-register argument: %s, %s"
- (match arg1.typ with Int -> "I" | Addr -> "A" | Val -> "V" | Float -> "F")
- (match arg2.typ with Int -> "I" | Addr -> "A" | Val -> "V" | Float -> "F"))
+ (f arg1.typ) (f arg2.typ)
end
| _ ->
fatal_error "Proc.calling_conventions: bad number of registers for \
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml
index 2be5fdf835..da6ba72e76 100644
--- a/asmcomp/asmlink.ml
+++ b/asmcomp/asmlink.ml
@@ -94,7 +94,9 @@ let lib_ccopts = ref []
let add_ccobjs origin l =
if not !Clflags.no_auto_link then begin
lib_ccobjs := l.lib_ccobjs @ !lib_ccobjs;
- let replace_origin = Misc.replace_substring ~before:"$CAMLORIGIN" ~after:origin in
+ let replace_origin =
+ Misc.replace_substring ~before:"$CAMLORIGIN" ~after:origin
+ in
lib_ccopts := List.map replace_origin l.lib_ccopts @ !lib_ccopts
end
@@ -283,7 +285,8 @@ let call_linker file_list startup_file output_name =
let files, c_lib =
if (not !Clflags.output_c_object) || main_dll || main_obj_runtime then
files @ (List.rev !Clflags.ccobjs) @ runtime_lib (),
- (if !Clflags.nopervasives || main_obj_runtime then "" else Config.native_c_libraries)
+ (if !Clflags.nopervasives || main_obj_runtime
+ then "" else Config.native_c_libraries)
else
files, ""
in
@@ -327,7 +330,8 @@ let link ppf objfiles output_name =
startup !Clflags.keep_startup_file startup_obj
(fun () -> make_startup_file ppf units_tolink);
Misc.try_finally
- (fun () -> call_linker (List.map object_file_name objfiles) startup_obj output_name)
+ (fun () ->
+ call_linker (List.map object_file_name objfiles) startup_obj output_name)
(fun () -> remove_file startup_obj)
(* Error report *)
diff --git a/asmcomp/clambda.ml b/asmcomp/clambda.ml
index ed96f218bf..a9d652b3ff 100644
--- a/asmcomp/clambda.ml
+++ b/asmcomp/clambda.ml
@@ -140,7 +140,7 @@ let compare_structured_constants c1 c2 =
| Uconst_int32 x1, Uconst_int32 x2 -> Int32.compare x1 x2
| Uconst_int64 x1, Uconst_int64 x2 -> Int64.compare x1 x2
| Uconst_nativeint x1, Uconst_nativeint x2 -> Nativeint.compare x1 x2
- | Uconst_block(t1, l1), Uconst_block(t2, l2) ->
+ | Uconst_block(t1, l1), Uconst_block(t2, l2) ->
let c = t1 - t2 (* no overflow possible here *) in
if c <> 0 then c else compare_constant_lists l1 l2
| Uconst_float_array l1, Uconst_float_array l2 ->
diff --git a/asmcomp/cmm.mli b/asmcomp/cmm.mli
index 121620eb01..202dbb57e6 100644
--- a/asmcomp/cmm.mli
+++ b/asmcomp/cmm.mli
@@ -30,7 +30,7 @@ type machtype_component =
The purpose of these types is twofold. First, they guide register
allocation: type [Float] goes in FP registers, the other types go
-into integer registers. Second, they determine how local variables are
+into integer registers. Second, they determine how local variables are
tracked by the GC:
- Variables of type [Val] are GC roots. If they are pointers, the
GC will not deallocate the addressed heap block, and will update
diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml
index 1547ccffc5..5f2d5a4a9f 100644
--- a/asmcomp/cmmgen.ml
+++ b/asmcomp/cmmgen.ml
@@ -93,7 +93,8 @@ let rec add_const c n =
if n = 0 then c
else match c with
| Cconst_int x when no_overflow_add x n -> Cconst_int (x + n)
- | Cop(Caddi, ([Cconst_int x; c] | [c; Cconst_int x])) when no_overflow_add n x ->
+ | Cop(Caddi, ([Cconst_int x; c] | [c; Cconst_int x]))
+ when no_overflow_add n x ->
let d = n + x in
if d = 0 then c else Cop(Caddi, [c; Cconst_int d])
| Cop(Csubi, [Cconst_int x; c]) when no_overflow_add n x ->
@@ -1325,7 +1326,8 @@ let rec is_unboxed_number e =
Boxed Boxed_float
| Pbigarrayref(_, _, Pbigarray_int32, _) -> Boxed (Boxed_integer Pint32)
| Pbigarrayref(_, _, Pbigarray_int64, _) -> Boxed (Boxed_integer Pint64)
- | Pbigarrayref(_, _, Pbigarray_native_int,_) -> Boxed (Boxed_integer Pnativeint)
+ | Pbigarrayref(_, _, Pbigarray_native_int,_) ->
+ Boxed (Boxed_integer Pnativeint)
| Pstring_load_32(_) -> Boxed (Boxed_integer Pint32)
| Pstring_load_64(_) -> Boxed (Boxed_integer Pint64)
| Pbigstring_load_32(_) -> Boxed (Boxed_integer Pint32)
@@ -1717,7 +1719,8 @@ and transl_prim_1 p arg dbg =
| Big_endian -> const_of_bool Arch.big_endian
| Word_size -> tag_int (Cconst_int (8*Arch.size_int))
| Int_size -> tag_int (Cconst_int ((8*Arch.size_int) - 1))
- | Max_wosize -> tag_int (Cconst_int ((1 lsl ((8*Arch.size_int) - 10)) - 1 ))
+ | Max_wosize ->
+ tag_int (Cconst_int ((1 lsl ((8*Arch.size_int) - 10)) - 1 ))
| Ostype_unix -> const_of_bool (Sys.os_type = "Unix")
| Ostype_win32 -> const_of_bool (Sys.os_type = "Win32")
| Ostype_cygwin -> const_of_bool (Sys.os_type = "Cygwin")
@@ -1826,14 +1829,16 @@ and transl_prim_2 p arg1 arg2 dbg =
incr_int(sub_int (transl arg1) (transl arg2))
| Pmulint ->
begin
- (* decrementing the non-constant part helps when the multiplication is followed by an addition;
+ (* decrementing the non-constant part helps when the multiplication is
+ followed by an addition;
for example, using this trick compiles (100 * a + 7) into
(+ ( * a 100) -85)
rather than
(+ ( * 200 (>>s a 1)) 15)
*)
match transl arg1, transl arg2 with
- | Cconst_int _ as c1, c2 -> incr_int (mul_int (untag_int c1) (decr_int c2))
+ | Cconst_int _ as c1, c2 ->
+ incr_int (mul_int (untag_int c1) (decr_int c2))
| c1, c2 -> incr_int (mul_int (decr_int c1) (untag_int c2))
end
| Pdivint ->
@@ -1900,8 +1905,10 @@ and transl_prim_2 p arg1 arg2 dbg =
tag_int
(bind "ba" (transl arg1) (fun ba ->
bind "index" (untag_int (transl arg2)) (fun idx ->
- bind "ba_data" (Cop(Cload Word_int, [field_address ba 1])) (fun ba_data ->
- check_bound unsafe dbg (sub_int (Cop(Cload Word_int,[field_address ba 5]))
+ bind "ba_data" (Cop(Cload Word_int, [field_address ba 1]))
+ (fun ba_data ->
+ check_bound unsafe dbg (sub_int (Cop(Cload Word_int,
+ [field_address ba 5]))
(Cconst_int 1)) idx
(unaligned_load_16 ba_data idx)))))
@@ -1916,8 +1923,10 @@ and transl_prim_2 p arg1 arg2 dbg =
box_int Pint32
(bind "ba" (transl arg1) (fun ba ->
bind "index" (untag_int (transl arg2)) (fun idx ->
- bind "ba_data" (Cop(Cload Word_int, [field_address ba 1])) (fun ba_data ->
- check_bound unsafe dbg (sub_int (Cop(Cload Word_int,[field_address ba 5]))
+ bind "ba_data" (Cop(Cload Word_int, [field_address ba 1]))
+ (fun ba_data ->
+ check_bound unsafe dbg (sub_int (Cop(Cload Word_int,
+ [field_address ba 5]))
(Cconst_int 3)) idx
(unaligned_load_32 ba_data idx)))))
@@ -1932,8 +1941,10 @@ and transl_prim_2 p arg1 arg2 dbg =
box_int Pint64
(bind "ba" (transl arg1) (fun ba ->
bind "index" (untag_int (transl arg2)) (fun idx ->
- bind "ba_data" (Cop(Cload Word_int, [field_address ba 1])) (fun ba_data ->
- check_bound unsafe dbg (sub_int (Cop(Cload Word_int,[field_address ba 5]))
+ bind "ba_data" (Cop(Cload Word_int, [field_address ba 1]))
+ (fun ba_data ->
+ check_bound unsafe dbg (sub_int (Cop(Cload Word_int,
+ [field_address ba 5]))
(Cconst_int 7)) idx
(unaligned_load_64 ba_data idx)))))
@@ -2128,8 +2139,10 @@ and transl_prim_3 p arg1 arg2 arg3 dbg =
(bind "ba" (transl arg1) (fun ba ->
bind "index" (untag_int (transl arg2)) (fun idx ->
bind "newval" (untag_int (transl arg3)) (fun newval ->
- bind "ba_data" (Cop(Cload Word_int, [field_address ba 1])) (fun ba_data ->
- check_bound unsafe dbg (sub_int (Cop(Cload Word_int,[field_address ba 5]))
+ bind "ba_data" (Cop(Cload Word_int, [field_address ba 1]))
+ (fun ba_data ->
+ check_bound unsafe dbg (sub_int (Cop(Cload Word_int,
+ [field_address ba 5]))
(Cconst_int 1))
idx (unaligned_set_16 ba_data idx newval))))))
@@ -2146,8 +2159,10 @@ and transl_prim_3 p arg1 arg2 arg3 dbg =
(bind "ba" (transl arg1) (fun ba ->
bind "index" (untag_int (transl arg2)) (fun idx ->
bind "newval" (transl_unbox_int Pint32 arg3) (fun newval ->
- bind "ba_data" (Cop(Cload Word_int, [field_address ba 1])) (fun ba_data ->
- check_bound unsafe dbg (sub_int (Cop(Cload Word_int,[field_address ba 5]))
+ bind "ba_data" (Cop(Cload Word_int, [field_address ba 1]))
+ (fun ba_data ->
+ check_bound unsafe dbg (sub_int (Cop(Cload Word_int,
+ [field_address ba 5]))
(Cconst_int 3))
idx (unaligned_set_32 ba_data idx newval))))))
@@ -2164,8 +2179,10 @@ and transl_prim_3 p arg1 arg2 arg3 dbg =
(bind "ba" (transl arg1) (fun ba ->
bind "index" (untag_int (transl arg2)) (fun idx ->
bind "newval" (transl_unbox_int Pint64 arg3) (fun newval ->
- bind "ba_data" (Cop(Cload Word_int, [field_address ba 1])) (fun ba_data ->
- check_bound unsafe dbg (sub_int (Cop(Cload Word_int,[field_address ba 5]))
+ bind "ba_data" (Cop(Cload Word_int, [field_address ba 1]))
+ (fun ba_data ->
+ check_bound unsafe dbg (sub_int (Cop(Cload Word_int,
+ [field_address ba 5]))
(Cconst_int 7)) idx
(unaligned_set_64 ba_data idx newval))))))
@@ -2202,7 +2219,8 @@ and transl_let id exp tr_body =
| No_unboxing ->
Clet(id, transl exp, tr_body)
| No_result ->
- (* the let-bound expression never returns a value, we can ignore the body *)
+ (* the let-bound expression never returns a value, we can ignore
+ the body *)
transl exp
| Boxed boxed_number ->
let unboxed_id = Ident.create (Ident.name id) in
diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml
index e046eb1800..8650fa4ff8 100644
--- a/asmcomp/emitaux.ml
+++ b/asmcomp/emitaux.ml
@@ -258,4 +258,3 @@ let reset () =
let binary_backend_available = ref false
let create_asm_file = ref true
-
diff --git a/asmcomp/power/arch.ml b/asmcomp/power/arch.ml
index 4ec9cd2731..fa64644381 100644
--- a/asmcomp/power/arch.ml
+++ b/asmcomp/power/arch.ml
@@ -28,7 +28,7 @@ let abi =
| "ppc64" -> ELF64v1
| "ppc64le" -> ELF64v2
| _ -> assert false
-
+
(* Machine-specific command-line options *)
let big_toc = ref false
@@ -36,7 +36,7 @@ let big_toc = ref false
let command_line_options = [
"-flarge-toc", Arg.Set big_toc,
" Support TOC (table of contents) greater than 64 kbytes"
-]
+]
(* Specific operations *)
diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
index 3385827e98..7ef030c257 100644
--- a/asmcomp/power/emit.mlp
+++ b/asmcomp/power/emit.mlp
@@ -61,7 +61,7 @@ let toc_save_offset () =
match abi with
| ELF32 -> assert false
| ELF64v1 | ELF64v2 -> frame_size() + 8
-
+
let (trap_size, trap_handler_offset, trap_previous_offset) =
match abi with
| ELF32 -> (16, 0, 4)
@@ -117,7 +117,7 @@ let slgi = if ppc64 then "sldi" else "slwi"
(* Output a processor register *)
-let emit_gpr = emit_int
+let emit_gpr = emit_int
(* Output a pseudo-register *)
@@ -175,7 +175,7 @@ type tocentry =
| TocLabel of int
| TocInt of nativeint
| TocFloat of int64
-
+
let tocref_entries : (tocentry, label) Hashtbl.t = Hashtbl.create 64
let emit_tocentry = function
@@ -199,7 +199,7 @@ let emit_toctable () =
tocref_entries
(* Emit a load from a TOC entry *)
-
+
let emit_tocload emit_dest dest entry =
let lbl = label_for_tocref entry in
if !big_toc || !Clflags.for_package <> None then begin
@@ -544,7 +544,7 @@ let emit_instr i =
if !big_toc || !Clflags.for_package <> None then begin
` addis 11, 2, {emit_label lbl}@toc@ha\n`;
` lfd {emit_reg i.res.(0)}, {emit_label lbl}@toc@l(11) # {emit_tocentry entry}\n`
- end else begin
+ end else begin
` lfd {emit_reg i.res.(0)}, {emit_label lbl}@toc(2) # {emit_tocentry entry}\n`
end
end
@@ -582,7 +582,7 @@ let emit_instr i =
emit_call s;
record_frame i.live i.dbg
| ELF64v1 | ELF64v2 ->
- (* For PPC64, we cannot just emit a "bl s; nop" sequence, because
+ (* For PPC64, we cannot just emit a "bl s; nop" sequence, because
of the following scenario:
- current function f1 calls f2 that has the same TOC
- f2 tailcalls f3 that has a different TOC
@@ -591,7 +591,7 @@ let emit_instr i =
Because f2 tailcalls f3, r2 will not be restored to f2's TOC
when f3 returns. So, we're back into f1, with the wrong TOC in r2.
We have two options:
- 1- Turn the call into an indirect call, like we do for
+ 1- Turn the call into an indirect call, like we do for
Itailcall_imm. Cost: 6 instructions.
2- Follow the "bl" with an instruction to restore r2
explicitly. If the called function has a different TOC,
@@ -599,11 +599,11 @@ let emit_instr i =
by the linker, but this is harmless.
Cost: 3 instructions if same TOC, 7 if different TOC.
Let's try option 2. *)
- emit_call s;
+ emit_call s;
record_frame i.live i.dbg;
` nop\n`;
emit_reload_toc()
- end
+ end
| Lop(Itailcall_ind) ->
begin match abi with
| ELF32 ->
@@ -907,7 +907,7 @@ let emit_instr i =
` std 0, {emit_int trap_handler_offset}(1)\n`;
` std 29, {emit_int trap_previous_offset}(1)\n`;
` mr 29, 1\n`
- end
+ end
| Lpoptrap ->
` {emit_string lg} 29, {emit_int trap_previous_offset}(1)\n`;
` addi 1, 1, {emit_int trap_size}\n`;
@@ -977,7 +977,7 @@ let fundecl fundecl =
` .type {emit_symbol fundecl.fun_name}, @function\n`;
` .align 2\n`;
`{emit_symbol fundecl.fun_name}:\n`
- | ELF64v1 ->
+ | ELF64v1 ->
emit_string function_descr_space;
` .align 3\n`;
` .globl {emit_symbol fundecl.fun_name}\n`;
@@ -994,7 +994,7 @@ let fundecl fundecl =
` .align 2\n`;
`{emit_symbol fundecl.fun_name}:\n`;
`0: addis 2, 12, (.TOC. - 0b)@ha\n`;
- ` addi 2, 2, (.TOC. - 0b)@l\n`;
+ ` addi 2, 2, (.TOC. - 0b)@l\n`;
` .localentry {emit_symbol fundecl.fun_name}, . - 0b\n`
end;
emit_debug_info fundecl.fun_dbg;
@@ -1064,7 +1064,7 @@ let fundecl fundecl =
emit_string rodata_space;
` .align 2\n`;
`{emit_label !jumptables_lbl}:`;
- List.iter
+ List.iter
(fun lbl ->
` .long {emit_label lbl} - {emit_label !jumptables_lbl}\n`)
(List.rev !jumptables)
diff --git a/asmcomp/power/proc.ml b/asmcomp/power/proc.ml
index fae6d5fc2f..bdba19aabf 100644
--- a/asmcomp/power/proc.ml
+++ b/asmcomp/power/proc.ml
@@ -151,10 +151,10 @@ let calling_conventions
ofs := !ofs + size_int64
end
| _, _ ->
+ let f = function Int -> "I" | Addr -> "A" | Val -> "V" | Float -> "F" in
fatal_error (Printf.sprintf "Proc.calling_conventions: bad register \
- type(s) for multi-register argument: %s, %s"
- (match arg1.typ with Int -> "I" | Addr -> "A" | Val -> "V" | Float -> "F")
- (match arg2.typ with Int -> "I" | Addr -> "A" | Val -> "V" | Float -> "F"))
+ type(s) for multi-register argument: %s, %s"
+ (f arg1.typ) (f arg2.typ)
end
| _ ->
fatal_error "Proc.calling_conventions: bad number of registers for \
diff --git a/asmcomp/x86_dsl.ml b/asmcomp/x86_dsl.ml
index 426b650ccb..45768a27bd 100644
--- a/asmcomp/x86_dsl.ml
+++ b/asmcomp/x86_dsl.ml
@@ -23,7 +23,7 @@
precision instructions. (As with Intel syntax.)
- A legacy bug in GAS:
- https://sourceware.org/binutils/docs-2.22/as/i386_002dBugs.html#i386_002dBugs
+ https://sourceware.org/binutils/docs-2.22/as/i386_002dBugs.html#i386_002dBugs
is not replicated here. It is managed by X86_gas.
*)
diff --git a/asmcomp/x86_gas.ml b/asmcomp/x86_gas.ml
index 80fa5d504e..dd1f9bc95a 100644
--- a/asmcomp/x86_gas.ml
+++ b/asmcomp/x86_gas.ml
@@ -106,7 +106,8 @@ let i1_call_jmp b s = function
(* this is the encoding of jump labels: don't use * *)
| Mem {arch=X86; idx=_; scale=0; base=None; sym=Some _; _} as x ->
i1 b s x
- | Reg32 _ | Reg64 _ | Mem _ | Mem64_RIP _ as x -> bprintf b "\t%s\t*%a" s arg x
+ | Reg32 _ | Reg64 _ | Mem _ | Mem64_RIP _ as x ->
+ bprintf b "\t%s\t*%a" s arg x
| Sym x -> bprintf b "\t%s\t%s" s x
| _ -> assert false
@@ -279,7 +280,8 @@ let print_line b = function
bprintf b "\t.file\t%d\t\"%s\""
file_num (X86_proc.string_of_string_literal file_name)
| Indirect_symbol s -> bprintf b "\t.indirect_symbol %s" s
- | Loc (file_num, line, col) -> bprintf b "\t.loc\t%d\t%d\t%d" file_num line col
+ | Loc (file_num, line, col) ->
+ bprintf b "\t.loc\t%d\t%d\t%d" file_num line col
| Private_extern s -> bprintf b "\t.private_extern %s" s
| Set (arg1, arg2) -> bprintf b "\t.set %s, %a" arg1 cst arg2
| Size (s, c) -> bprintf b "\t.size %s,%a" s cst c
diff --git a/asmcomp/x86_proc.ml b/asmcomp/x86_proc.ml
index 70b92b2fe5..802013a446 100644
--- a/asmcomp/x86_proc.ml
+++ b/asmcomp/x86_proc.ml
@@ -270,4 +270,3 @@ let generate_code asm =
| Some f -> binary_content := Some (f instrs)
| None -> binary_content := None
end
-
diff --git a/asmcomp/x86_proc.mli b/asmcomp/x86_proc.mli
index 40f49af5f8..4b6dfacd70 100644
--- a/asmcomp/x86_proc.mli
+++ b/asmcomp/x86_proc.mli
@@ -27,7 +27,8 @@ val string_of_string_literal: string -> string
val string_of_condition: condition -> string
val string_of_symbol: (*prefix*) string -> string -> string
val string_of_rounding: rounding -> string
-val buf_bytes_directive: Buffer.t -> (*directive*) string -> (*data*)string -> unit
+val buf_bytes_directive:
+ Buffer.t -> (*directive*) string -> (*data*)string -> unit
(** Buffer of assembly code *)
diff --git a/asmrun/Makefile b/asmrun/Makefile
index c70a4ed05a..64a1331830 100644
--- a/asmrun/Makefile
+++ b/asmrun/Makefile
@@ -26,7 +26,8 @@ COBJS=startup_aux.o startup.o \
misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o \
floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o \
gc_ctrl.o terminfo.o md5.o obj.o lexing.o printexc.o callback.o weak.o \
- compact.o finalise.o custom.o $(UNIX_OR_WIN32).o backtrace_prim.o backtrace.o \
+ compact.o finalise.o custom.o $(UNIX_OR_WIN32).o backtrace_prim.o \
+ backtrace.o \
natdynlink.o debugger.o meta.o dynlink.o
ASMOBJS=$(ARCH).o
@@ -77,7 +78,8 @@ libasmrun_shared.so: $(PICOBJS)
INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR)
-install: install-default install-$(RUNTIMED) install-$(PROFILING) install-$(SHARED)
+install: install-default install-$(RUNTIMED) install-$(PROFILING) \
+ install-$(SHARED)
install-default:
cp libasmrun.a $(INSTALL_LIBDIR)/libasmrun.a
diff --git a/asmrun/arm64.S b/asmrun/arm64.S
index 9b4b9ab7c9..7969eb629e 100644
--- a/asmrun/arm64.S
+++ b/asmrun/arm64.S
@@ -175,11 +175,12 @@ caml_alloc1:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- /* Record the lowest address of the caller's stack frame. This is the address
- immediately above the pair of words (x29 and x30) we just pushed. Those must
- not be included since otherwise the distance from [caml_bottom_of_stack] to the
- highest address in the caller's stack frame won't match the frame size contained
- in the relevant frame descriptor. */
+ /* Record the lowest address of the caller's stack frame. This is the
+ address immediately above the pair of words (x29 and x30) we just
+ pushed. Those must not be included since otherwise the distance from
+ [caml_bottom_of_stack] to the highest address in the caller's stack
+ frame won't match the frame size contained in the relevant frame
+ descriptor. */
add x29, sp, #16
STOREGLOBAL(x29, caml_bottom_of_stack)
add x29, sp, #0
@@ -207,7 +208,8 @@ caml_alloc2:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- /* Record the lowest address of the caller's stack frame. See comment above. */
+ /* Record the lowest address of the caller's stack frame.
+ See comment above. */
add x29, sp, #16
STOREGLOBAL(x29, caml_bottom_of_stack)
add x29, sp, #0
@@ -235,7 +237,8 @@ caml_alloc3:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- /* Record the lowest address of the caller's stack frame. See comment above. */
+ /* Record the lowest address of the caller's stack frame.
+ See comment above. */
add x29, sp, #16
STOREGLOBAL(x29, caml_bottom_of_stack)
add x29, sp, #0
@@ -263,7 +266,8 @@ caml_allocN:
ret
2: stp x29, x30, [sp, -16]!
CFI_ADJUST(16)
- /* Record the lowest address of the caller's stack frame. See comment above. */
+ /* Record the lowest address of the caller's stack frame.
+ See comment above. */
add x29, sp, #16
STOREGLOBAL(x29, caml_bottom_of_stack)
add x29, sp, #0
diff --git a/asmrun/backtrace_prim.c b/asmrun/backtrace_prim.c
index 9f3f4838ee..1bc8a62e3c 100644
--- a/asmrun/backtrace_prim.c
+++ b/asmrun/backtrace_prim.c
@@ -93,7 +93,8 @@ void caml_stash_backtrace(value exn, uintnat pc, char * sp, char * trapsp)
}
if (caml_backtrace_buffer == NULL) {
Assert(caml_backtrace_pos == 0);
- caml_backtrace_buffer = malloc(BACKTRACE_BUFFER_SIZE * sizeof(backtrace_slot));
+ caml_backtrace_buffer = malloc(BACKTRACE_BUFFER_SIZE
+ * sizeof(backtrace_slot));
if (caml_backtrace_buffer == NULL) return;
}
@@ -164,7 +165,8 @@ CAMLprim value caml_get_current_callstack(value max_frames_value)
for (trace_pos = 0; trace_pos < trace_size; trace_pos++) {
frame_descr * descr = caml_next_frame_descriptor(&pc, &sp);
Assert(descr != NULL);
- Store_field(trace, trace_pos, caml_val_raw_backtrace_slot((backtrace_slot) descr));
+ Store_field(trace, trace_pos,
+ caml_val_raw_backtrace_slot((backtrace_slot) descr));
}
}
@@ -172,7 +174,8 @@ CAMLprim value caml_get_current_callstack(value max_frames_value)
}
/* Extract location information for the given frame descriptor */
-void caml_extract_location_info(backtrace_slot slot, /*out*/ struct caml_loc_info * li)
+void caml_extract_location_info(backtrace_slot slot,
+ /*out*/ struct caml_loc_info * li)
{
uintnat infoptr;
uint32_t info1, info2;
@@ -210,7 +213,8 @@ void caml_extract_location_info(backtrace_slot slot, /*out*/ struct caml_loc_inf
li->loc_endchr = ((info2 & 0xF) << 6) | (info1 >> 26);
}
-CAMLprim value caml_add_debug_info(backtrace_slot start, value size, value events)
+CAMLprim value caml_add_debug_info(backtrace_slot start, value size,
+ value events)
{
return Val_unit;
}
diff --git a/asmrun/fail.c b/asmrun/fail.c
index 1c9e4343ca..188651cea9 100644
--- a/asmrun/fail.c
+++ b/asmrun/fail.c
@@ -47,7 +47,9 @@ extern caml_generated_constant
/* Exception raising */
-CAMLnoreturn_start extern void caml_raise_exception (value bucket) CAMLnoreturn_end;
+CAMLnoreturn_start
+ extern void caml_raise_exception (value bucket)
+CAMLnoreturn_end;
char * caml_exception_pointer = NULL;
diff --git a/asmrun/i386.S b/asmrun/i386.S
index e55969ee97..2fdc6f8e72 100644
--- a/asmrun/i386.S
+++ b/asmrun/i386.S
@@ -116,7 +116,7 @@
#endif
/* PR#6038: GCC and Clang seem to require 16-byte alignment nowadays,
- even if only MacOS X's ABI formally requires it. */
+ even if only MacOS X's ABI formally requires it. */
#define ALIGN_STACK(amount) subl $ amount, %esp ; CFI_ADJUST(amount)
#define UNDO_ALIGN_STACK(amount) addl $ amount, %esp ; CFI_ADJUST(-amount)
diff --git a/asmrun/power.S b/asmrun/power.S
index d1cdc5cb81..e5de431adf 100644
--- a/asmrun/power.S
+++ b/asmrun/power.S
@@ -13,7 +13,7 @@
#if defined(MODEL_ppc64le)
.abiversion 2
-#endif
+#endif
#if defined(MODEL_ppc64) || defined(MODEL_ppc64le)
#define EITHER(a,b) b
@@ -37,7 +37,7 @@
#define TRAP_SIZE 16
#define TRAP_HANDLER_OFFSET 0
#define TRAP_PREVIOUS_OFFSET 4
-#define CALLBACK_LINK_SIZE 16
+#define CALLBACK_LINK_SIZE 16
#define CALLBACK_LINK_OFFSET 0
#endif
#if defined(MODEL_ppc64)
@@ -77,7 +77,7 @@
#define ENDFUNCTION(name) \
.size name, . - name
-
+
#endif
#if defined(MODEL_ppc64)
@@ -109,7 +109,7 @@
#define ENDFUNCTION(name) \
.size name, . - name
-
+
#endif
/* Accessing global variables. */
@@ -157,7 +157,7 @@
#if defined(MODEL_ppc64)
.section ".opd","aw"
-#else
+#else
.section ".text"
#endif
.globl caml_system__code_begin
@@ -465,7 +465,7 @@ FUNCTION(caml_start_program)
/* Save TOC pointer if applicable */
#ifdef TOC_SAVE_PARENT
std 2, (STACKSIZE + TOC_SAVE_PARENT)(1)
-#endif
+#endif
/* Save all callee-save registers */
addi 11, 1, CALLBACK_LINK_SIZE + RESERVED_STACK - WORD
stgu 14, WORD(11)
@@ -609,7 +609,7 @@ FUNCTION(caml_start_program)
/* Restore TOC pointer */
#ifdef TOC_SAVE_PARENT
ld 2, (STACKSIZE + TOC_SAVE_PARENT)(1)
-#endif
+#endif
/* Update caml_exception_pointer */
Storeglobal(29, caml_exception_pointer, 11)
/* Encode exception bucket as an exception result and return it */
@@ -651,7 +651,7 @@ ENDFUNCTION(caml_callback3_exn)
#if defined(MODEL_ppc64)
.section ".opd","aw"
-#else
+#else
.section ".text"
#endif
@@ -690,4 +690,3 @@ TOCENTRY(caml_young_limit)
TOCENTRY(caml_young_ptr)
#endif
-
diff --git a/bytecomp/bytegen.ml b/bytecomp/bytegen.ml
index 82cb50a369..b8df64e57a 100644
--- a/bytecomp/bytegen.ml
+++ b/bytecomp/bytegen.ml
@@ -141,7 +141,8 @@ let rec check_recordwith_updates id e =
let rec size_of_lambda = function
| Lfunction{kind; params; body} as funct ->
- RHS_function (1 + IdentSet.cardinal(free_variables funct), List.length params)
+ RHS_function (1 + IdentSet.cardinal(free_variables funct),
+ List.length params)
| Llet (Strict, id, Lprim (Pduprecord (kind, size), _), body)
when check_recordwith_updates id body ->
begin match kind with
@@ -552,14 +553,16 @@ let rec comp_expr env exp sz cont =
comp_init (add_var id (sz+1) new_env) (sz+1) rem
and comp_nonrec new_env sz i = function
| [] -> comp_rec new_env sz ndecl decl_size
- | (id, exp, (RHS_block _ | RHS_floatblock _ | RHS_function _)) :: rem ->
+ | (id, exp, (RHS_block _ | RHS_floatblock _ | RHS_function _))
+ :: rem ->
comp_nonrec new_env sz (i-1) rem
| (id, exp, RHS_nonrec) :: rem ->
comp_expr new_env exp sz
(Kassign (i-1) :: comp_nonrec new_env sz (i-1) rem)
and comp_rec new_env sz i = function
| [] -> comp_expr new_env body sz (add_pop ndecl cont)
- | (id, exp, (RHS_block _ | RHS_floatblock _ | RHS_function _)) :: rem ->
+ | (id, exp, (RHS_block _ | RHS_floatblock _ | RHS_function _))
+ :: rem ->
comp_expr new_env exp sz
(Kpush :: Kacc i :: Kccall("caml_update_dummy", 2) ::
comp_rec new_env sz (i-1) rem)
diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
index 422dbd552b..2ea3f689b7 100644
--- a/bytecomp/bytelink.ml
+++ b/bytecomp/bytelink.ml
@@ -50,7 +50,9 @@ let add_ccobjs origin l =
then begin
if l.lib_custom then Clflags.custom_runtime := true;
lib_ccobjs := l.lib_ccobjs @ !lib_ccobjs;
- let replace_origin = Misc.replace_substring ~before:"$CAMLORIGIN" ~after:origin in
+ let replace_origin =
+ Misc.replace_substring ~before:"$CAMLORIGIN" ~after:origin
+ in
lib_ccopts := List.map replace_origin l.lib_ccopts @ !lib_ccopts;
end;
lib_dllibs := l.lib_dllibs @ !lib_dllibs
diff --git a/bytecomp/emitcode.ml b/bytecomp/emitcode.ml
index 81e00b7bef..e8e428d481 100644
--- a/bytecomp/emitcode.ml
+++ b/bytecomp/emitcode.ml
@@ -143,7 +143,8 @@ let record_event ev =
let path = ev.ev_loc.Location.loc_start.Lexing.pos_fname in
let abspath = Location.absolute_path path in
debug_dirs := StringSet.add (Filename.dirname abspath) !debug_dirs;
- if Filename.is_relative path then debug_dirs := StringSet.add (Sys.getcwd ()) !debug_dirs;
+ if Filename.is_relative path then
+ debug_dirs := StringSet.add (Sys.getcwd ()) !debug_dirs;
ev.ev_pos <- !out_position;
events := ev :: !events
diff --git a/bytecomp/lambda.mli b/bytecomp/lambda.mli
index 5acf2e502f..9c46d2ce04 100644
--- a/bytecomp/lambda.mli
+++ b/bytecomp/lambda.mli
@@ -171,7 +171,8 @@ val no_apply_info : apply_info
val mk_apply_info : ?tailcall:bool -> Location.t -> apply_info
(** Build apply_info
- @param tailcall if true, the application should be in tail position; default false *)
+ @param tailcall if true, the application should be in tail position;
+ default false *)
type function_kind = Curried | Tupled
diff --git a/bytecomp/matching.ml b/bytecomp/matching.ml
index ff3863d3bf..5be9074c09 100644
--- a/bytecomp/matching.ml
+++ b/bytecomp/matching.ml
@@ -2452,7 +2452,8 @@ let combine_constructor arg ex_pat cstr partial ctx def
(cstr.cstr_consts, cstr.cstr_nonconsts, consts, nonconsts)
with
| (1, 1, [0, act1], [0, act2]) ->
- (* Typically, match on lists, will avoid isint primitive in that case *)
+ (* Typically, match on lists, will avoid isint primitive in that
+ case *)
Lifthenelse(arg, act2, act1)
| (n,0,_,[]) -> (* The type defines constant constructors only *)
call_switcher fail_opt arg 0 (n-1) consts
diff --git a/bytecomp/meta.ml b/bytecomp/meta.ml
index 42c978a325..b3cecdbe0f 100644
--- a/bytecomp/meta.ml
+++ b/bytecomp/meta.ml
@@ -23,7 +23,8 @@ external invoke_traced_function : Obj.t -> Obj.t -> Obj.t -> Obj.t
= "caml_invoke_traced_function"
external get_section_table : unit -> (string * Obj.t) list
= "caml_get_section_table"
-external add_debug_info : bytes -> int -> Instruct.debug_event list array -> unit
+external add_debug_info :
+ bytes -> int -> Instruct.debug_event list array -> unit
= "caml_add_debug_info"
external remove_debug_info : bytes -> unit
= "caml_remove_debug_info"
diff --git a/bytecomp/meta.mli b/bytecomp/meta.mli
index 9147dade4a..3d9d84954d 100644
--- a/bytecomp/meta.mli
+++ b/bytecomp/meta.mli
@@ -25,7 +25,8 @@ external invoke_traced_function : Obj.t -> Obj.t -> Obj.t -> Obj.t
= "caml_invoke_traced_function"
external get_section_table : unit -> (string * Obj.t) list
= "caml_get_section_table"
-external add_debug_info : bytes -> int -> Instruct.debug_event list array -> unit
+external add_debug_info :
+ bytes -> int -> Instruct.debug_event list array -> unit
= "caml_add_debug_info"
external remove_debug_info : bytes -> unit
= "caml_remove_debug_info"
diff --git a/bytecomp/simplif.ml b/bytecomp/simplif.ml
index 953abe7407..277ecf25aa 100644
--- a/bytecomp/simplif.ml
+++ b/bytecomp/simplif.ml
@@ -342,7 +342,8 @@ let simplify_lets lam =
| Lapply(Lfunction{kind = Curried; params; body}, args, _)
when optimize && List.length params = List.length args ->
count bv (beta_reduce params body args)
- | Lapply(Lfunction{kind = Tupled; params; body}, [Lprim(Pmakeblock _, args)], _)
+ | Lapply(Lfunction{kind = Tupled; params; body},
+ [Lprim(Pmakeblock _, args)], _)
when optimize && List.length params = List.length args ->
count bv (beta_reduce params body args)
| Lapply(l1, ll, _) ->
diff --git a/bytecomp/translclass.ml b/bytecomp/translclass.ml
index f172e9a9ac..b294a8d6d9 100644
--- a/bytecomp/translclass.ml
+++ b/bytecomp/translclass.ml
@@ -728,8 +728,10 @@ let transl_class ids cl_id pub_meths cl vflag =
Lvar class_init; Lvar env_init; lambda_unit]))))
and lbody_virt lenvs =
Lprim(Pmakeblock(0, Immutable),
- [lambda_unit; Lfunction{kind = Curried; params = [cla]; body = cl_init};
- lambda_unit; lenvs])
+ [lambda_unit;
+ Lfunction{kind = Curried; params = [cla]; body = cl_init};
+ lambda_unit;
+ lenvs])
in
(* Still easy: a class defined at toplevel *)
if top && concrete then lclass lbody else
diff --git a/bytecomp/translcore.ml b/bytecomp/translcore.ml
index 8d308f6469..b75ec99395 100644
--- a/bytecomp/translcore.ml
+++ b/bytecomp/translcore.ml
@@ -296,15 +296,24 @@ let primitives_table = create_hashtable 57 [
]
let index_primitives_table =
- let make_ba_ref n="%caml_ba_opt_ref_"^(string_of_int n),
- fun () -> Pbigarrayref(!Clflags.fast, n, Pbigarray_unknown, Pbigarray_unknown_layout)
- and make_ba_set n="%caml_ba_opt_set_"^(string_of_int n),
- fun () -> Pbigarrayset(!Clflags.fast, n, Pbigarray_unknown, Pbigarray_unknown_layout) in
+ let make_ba_ref n =
+ "%caml_ba_opt_ref_"^(string_of_int n),
+ fun () -> Pbigarrayref(!Clflags.fast, n, Pbigarray_unknown,
+ Pbigarray_unknown_layout)
+ and make_ba_set n =
+ "%caml_ba_opt_set_"^(string_of_int n),
+ fun () -> Pbigarrayset(!Clflags.fast, n, Pbigarray_unknown,
+ Pbigarray_unknown_layout)
+ in
create_hashtable 10 [
- "%array_opt_get", ( fun () -> if !Clflags.fast then Parrayrefu Pgenarray else Parrayrefs Pgenarray );
- "%array_opt_set", ( fun () -> if !Clflags.fast then Parraysetu Pgenarray else Parraysets Pgenarray );
- "%string_opt_get", ( fun () -> if !Clflags.fast then Pstringrefu else Pstringrefs );
- "%string_opt_set", ( fun () -> if !Clflags.fast then Pstringsetu else Pstringsets );
+ "%array_opt_get", ( fun () -> if !Clflags.fast then Parrayrefu Pgenarray
+ else Parrayrefs Pgenarray );
+ "%array_opt_set", ( fun () -> if !Clflags.fast then Parraysetu Pgenarray
+ else Parraysets Pgenarray );
+ "%string_opt_get", ( fun () -> if !Clflags.fast then Pstringrefu
+ else Pstringrefs );
+ "%string_opt_set", ( fun () -> if !Clflags.fast then Pstringsetu
+ else Pstringsets );
make_ba_ref 1; make_ba_set 1;
make_ba_ref 2; make_ba_set 2;
make_ba_ref 3; make_ba_set 3;
@@ -522,7 +531,7 @@ let rec name_pattern default = function
type binding =
| Bind_value of value_binding list
- | Bind_module of Ident.t * string loc * module_expr
+ | Bind_module of Ident.t * string loc * module_expr
let rec push_defaults loc bindings cases partial =
match cases with
@@ -746,7 +755,8 @@ and transl_exp0 e =
end
| Texp_apply(funct, oargs) ->
let should_be_tailcall = has_tailcall_attribute funct in
- event_after e (transl_apply ~should_be_tailcall (transl_exp funct) oargs e.exp_loc)
+ event_after e (transl_apply ~should_be_tailcall (transl_exp funct) oargs
+ e.exp_loc)
| Texp_match(arg, pat_expr_list, exn_pat_expr_list, partial) ->
transl_match e arg pat_expr_list exn_pat_expr_list partial
| Texp_try(body, pat_expr_list) ->
diff --git a/bytecomp/translmod.ml b/bytecomp/translmod.ml
index 86da2dfafa..42821601ab 100644
--- a/bytecomp/translmod.ml
+++ b/bytecomp/translmod.ml
@@ -295,7 +295,8 @@ let eval_rec_bindings bindings cont =
| (id, None, rhs) :: rem ->
patch_forwards rem
| (id, Some(loc, shape), rhs) :: rem ->
- Lsequence(Lapply(mod_prim "update_mod", [shape; Lvar id; rhs], no_apply_info),
+ Lsequence(Lapply(mod_prim "update_mod", [shape; Lvar id; rhs],
+ no_apply_info),
patch_forwards rem)
in
bind_inits bindings
diff --git a/byterun/Makefile.common b/byterun/Makefile.common
index ea7263911a..7aef44a506 100644
--- a/byterun/Makefile.common
+++ b/byterun/Makefile.common
@@ -118,7 +118,8 @@ caml/opnames.h : caml/instruct.h
-e '/^#/d' \
-e 's/enum /char * names_of_/' \
-e 's/{$$/[] = {/' \
- -e 's/\([[:upper:]][[:upper:]_0-9]*\)/"\1"/g' caml/instruct.h > caml/opnames.h
+ -e 's/\([[:upper:]][[:upper:]_0-9]*\)/"\1"/g' caml/instruct.h \
+ > caml/opnames.h
# caml/jumptbl.h is required only if you have GCC 2.0 or later
caml/jumptbl.h : caml/instruct.h
diff --git a/byterun/alloc.c b/byterun/alloc.c
index 8afc5b7859..96a21bf1f5 100644
--- a/byterun/alloc.c
+++ b/byterun/alloc.c
@@ -198,7 +198,3 @@ CAMLprim value caml_update_dummy(value dummy, value newval)
}
return Val_unit;
}
-
-
-
-
diff --git a/byterun/backtrace.c b/byterun/backtrace.c
index fe59220a9b..37573281f0 100644
--- a/byterun/backtrace.c
+++ b/byterun/backtrace.c
@@ -101,7 +101,8 @@ CAMLexport void caml_print_exception_backtrace(void)
struct caml_loc_info li;
if (!caml_debug_info_available()) {
- fprintf(stderr, "(Cannot print stack backtrace: no debug information available)\n");
+ fprintf(stderr, "(Cannot print stack backtrace: "
+ "no debug information available)\n");
return;
}
@@ -143,7 +144,8 @@ CAMLprim value caml_get_exception_raw_backtrace(value unit)
res = caml_alloc(saved_caml_backtrace_pos, 0);
for (i = 0; i < saved_caml_backtrace_pos; i++) {
- Field(res, i) = caml_val_raw_backtrace_slot(saved_caml_backtrace_buffer[i]);
+ Field(res, i) =
+ caml_val_raw_backtrace_slot(saved_caml_backtrace_buffer[i]);
}
}
diff --git a/byterun/backtrace_prim.c b/byterun/backtrace_prim.c
index 0d58ad1932..699a1b7979 100644
--- a/byterun/backtrace_prim.c
+++ b/byterun/backtrace_prim.c
@@ -105,7 +105,8 @@ static int cmp_ev_info(const void *a, const void *b)
return 0;
}
-struct ev_info *process_debug_events(code_t code_start, value events_heap, mlsize_t *num_events)
+struct ev_info *process_debug_events(code_t code_start, value events_heap,
+ mlsize_t *num_events)
{
CAMLparam1(events_heap);
CAMLlocal3(l, ev, ev_start);
@@ -130,7 +131,8 @@ struct ev_info *process_debug_events(code_t code_start, value events_heap, mlsiz
for (l = Field(events_heap, i); l != Val_int(0); l = Field(l, 1)) {
ev = Field(l, 0);
- events[j].ev_pc = (code_t)((char*)code_start + Long_val(Field(ev, EV_POS)));
+ events[j].ev_pc = (code_t)((char*)code_start
+ + Long_val(Field(ev, EV_POS)));
ev_start = Field(Field(ev, EV_LOC), LOC_START);
@@ -165,7 +167,8 @@ struct ev_info *process_debug_events(code_t code_start, value events_heap, mlsiz
/* Processes a (Instruct.debug_event list array) into a form suitable
for quick lookup and registers it for the (code_start,code_size) pc range. */
-CAMLprim value caml_add_debug_info(code_t code_start, value code_size, value events_heap)
+CAMLprim value caml_add_debug_info(code_t code_start, value code_size,
+ value events_heap)
{
CAMLparam1(events_heap);
struct debug_info *debug_info;
@@ -431,7 +434,8 @@ static struct ev_info *event_for_location(code_t pc)
/* Extract location information for the given PC */
-void caml_extract_location_info(backtrace_slot slot, /*out*/ struct caml_loc_info * li)
+void caml_extract_location_info(backtrace_slot slot,
+ /*out*/ struct caml_loc_info * li)
{
code_t pc = slot;
struct ev_info *event = event_for_location(pc);
diff --git a/byterun/caml/backtrace.h b/byterun/caml/backtrace.h
index 5a75859bad..dd735c4a53 100644
--- a/byterun/caml/backtrace.h
+++ b/byterun/caml/backtrace.h
@@ -52,10 +52,11 @@
*/
CAMLextern int caml_backtrace_active;
-/* The [backtrace_slot] type represents values stored in the [caml_backtrace_buffer].
- * In bytecode, it is the same as a [code_t], in native code it as a [frame_descr *].
- * The difference doesn't matter for code outside [backtrace_prim.c], so it is
- * just exposed as a [backtrace_slot].
+/* The [backtrace_slot] type represents values stored in the
+ * [caml_backtrace_buffer]. In bytecode, it is the same as a
+ * [code_t], in native code it as a [frame_descr *]. The difference
+ * doesn't matter for code outside [backtrace_prim.c], so it is just
+ * exposed as a [backtrace_slot].
*/
typedef void * backtrace_slot;
@@ -106,15 +107,16 @@ CAMLprim value caml_record_backtrace(value vflag);
/* Path to the file containing debug information, if any, or NULL. */
CAMLextern char * caml_cds_file;
-/* Primitive called _only_ by runtime to record unwinded frames to backtrace.
- * A similar primitive exists for native code, but with a different prototype. */
+/* Primitive called _only_ by runtime to record unwinded frames to
+ * backtrace. A similar primitive exists for native code, but with a
+ * different prototype. */
extern void caml_stash_backtrace(value exn, code_t pc, value * sp, int reraise);
#endif
-/* Default (C-level) printer for backtraces.
- * It is called if an exception causes a termination of the program or of a thread.
+/* Default (C-level) printer for backtraces. It is called if an
+ * exception causes a termination of the program or of a thread.
*
* [Printexc] provide a higher-level printer mimicking its output but making
* use of registered exception printers, and is used when possible in place of
diff --git a/byterun/caml/backtrace_prim.h b/byterun/caml/backtrace_prim.h
index 5e21811b33..bc2eb36af0 100644
--- a/byterun/caml/backtrace_prim.h
+++ b/byterun/caml/backtrace_prim.h
@@ -21,8 +21,8 @@
* [backtrace_prim.c] contains all backend-specific code, and has two different
* implementations in [byterun/backtrace_prim.c] and [asmrun/backtrace_prim.c].
*
- * [backtrace.c] has a unique implementation, and expose a uniform higher level API
- * above [backtrace_prim.c].
+ * [backtrace.c] has a unique implementation, and expose a uniform
+ * higher level API above [backtrace_prim.c].
*/
/* Extract location information for the given raw_backtrace_slot */
@@ -41,7 +41,8 @@ struct caml_loc_info {
int caml_debug_info_available(void);
/* Extract locations from backtrace_slot */
-void caml_extract_location_info(backtrace_slot pc, /*out*/ struct caml_loc_info * li);
+void caml_extract_location_info(backtrace_slot pc,
+ /*out*/ struct caml_loc_info * li);
/* Expose a [backtrace_slot] as a OCaml value of type [raw_backtrace_slot].
* The value returned should be an immediate and not an OCaml block, so that it
@@ -52,7 +53,8 @@ backtrace_slot caml_raw_backtrace_slot_val(value slot);
#define BACKTRACE_BUFFER_SIZE 1024
-/* Besides decoding backtrace info, [backtrace_prim] has two other responsibilities:
+/* Besides decoding backtrace info, [backtrace_prim] has two other
+ * responsibilities:
*
* It defines the [caml_stash_backtrace] function, which is called to quickly
* fill the backtrace buffer by walking the stack when an exception is raised.
diff --git a/byterun/caml/memory.h b/byterun/caml/memory.h
index 804b947ae5..9c8657ad39 100644
--- a/byterun/caml/memory.h
+++ b/byterun/caml/memory.h
@@ -51,7 +51,7 @@ color_t caml_allocation_color (void *hp);
/* void caml_shrink_heap (char *); Only used in compact.c */
/* <private> */
-
+
#ifdef DEBUG
#define DEBUG_clear(result, wosize) do{ \
uintnat caml__DEBUG_i; \
@@ -280,7 +280,7 @@ CAMLextern struct caml__roots_block *caml_local_roots; /* defined in roots.c */
#define CAMLdrop caml_local_roots = caml__frame
-
+
#define CAMLreturn0 do{ \
CAMLdrop; \
return; \
diff --git a/byterun/caml/signals_machdep.h b/byterun/caml/signals_machdep.h
index c00c798590..505999bb0a 100644
--- a/byterun/caml/signals_machdep.h
+++ b/byterun/caml/signals_machdep.h
@@ -16,13 +16,15 @@
#ifndef CAML_SIGNALS_MACHDEP_H
#define CAML_SIGNALS_MACHDEP_H
-#if defined(__GNUC__) && defined(__ATOMIC_SEQ_CST) && defined(__GCC_ATOMIC_LONG_LOCK_FREE)
+#if defined(__GNUC__) && defined(__ATOMIC_SEQ_CST) \
+ && defined(__GCC_ATOMIC_LONG_LOCK_FREE)
/* Use the "atomic" builtins of GCC and Clang */
#define Read_and_clear(dst,src) \
((dst) = __atomic_exchange_n(&(src), 0, __ATOMIC_SEQ_CST))
-#elif defined(__GNUC__) && (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__)))
+#elif defined(__GNUC__) && (defined(__i386__) || (defined(__x86_64__) \
+ && defined(__ILP32__)))
#define Read_and_clear(dst,src) \
asm("xorl %0, %0; xchgl %0, %1" \
diff --git a/byterun/caml/startup.h b/byterun/caml/startup.h
index 3268d8875b..0c50c05eb7 100644
--- a/byterun/caml/startup.h
+++ b/byterun/caml/startup.h
@@ -32,7 +32,8 @@ extern int caml_attempt_open(char **name, struct exec_trailer *trail,
extern void caml_read_section_descriptors(int fd, struct exec_trailer *trail);
extern int32_t caml_seek_optional_section(int fd, struct exec_trailer *trail,
char *name);
-extern int32_t caml_seek_section(int fd, struct exec_trailer *trail, char *name);
+extern int32_t caml_seek_section(int fd, struct exec_trailer *trail,
+ char *name);
#endif /* CAML_STARTUP_H */
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index e605290615..99a400cb83 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -117,7 +117,7 @@ int* caml_init_opcode_nargs()
l[C_CALL1] = l[C_CALL2] = l[C_CALL3] = l[C_CALL4] = l[C_CALL5] =
l[CONSTINT] = l[PUSHCONSTINT] = l[OFFSETINT] =
l[OFFSETREF] = l[OFFSETCLOSURE] = l[PUSHOFFSETCLOSURE] = 1;
-
+
/* Instructions with two operands */
l[APPTERM] = l[CLOSURE] = l[PUSHGETGLOBALFIELD] =
l[GETGLOBALFIELD] = l[MAKEBLOCK] = l[C_CALLN] =
diff --git a/byterun/freelist.c b/byterun/freelist.c
index 3371b9a182..176b6f846e 100644
--- a/byterun/freelist.c
+++ b/byterun/freelist.c
@@ -115,7 +115,8 @@ static void fl_check (void)
it is located in the high-address words of the free block, so that
the linking of the free-list does not change in case 2.
*/
-static header_t *allocate_block (mlsize_t wh_sz, int flpi, value prev, value cur)
+static header_t *allocate_block (mlsize_t wh_sz, int flpi, value prev,
+ value cur)
{
header_t h = Hd_bp (cur);
Assert (Whsize_hd (h) >= wh_sz);
@@ -493,12 +494,13 @@ void caml_fl_add_blocks (value bp)
prev = Fl_head;
cur = Next (prev);
- while (cur != Val_NULL && cur < bp){ Assert (prev < bp || prev == Fl_head);
+ while (cur != Val_NULL && cur < bp){
+ Assert (prev < bp || prev == Fl_head);
/* XXX TODO: extend flp on the fly */
prev = cur;
cur = Next (prev);
} Assert (prev < bp || prev == Fl_head);
- Assert (cur > bp || cur == Val_NULL);
+ Assert (cur > bp || cur == Val_NULL);
Next (Field (bp, 1)) = cur;
Next (prev) = bp;
/* When inserting blocks between [caml_fl_merge] and [caml_gc_sweep_hp],
diff --git a/byterun/gc_ctrl.c b/byterun/gc_ctrl.c
index c931e00adf..868f883cfa 100644
--- a/byterun/gc_ctrl.c
+++ b/byterun/gc_ctrl.c
@@ -146,7 +146,7 @@ static value heap_stats (int returnstats)
cur_hp = (header_t *) chunk;
while (cur_hp < (header_t *) chunk_end){
cur_hd = Hd_hp (cur_hp);
- Assert (Next (cur_hp) <= (header_t *) chunk_end);
+ Assert (Next (cur_hp) <= (header_t *) chunk_end);
switch (Color_hd (cur_hd)){
case Caml_white:
if (Wosize_hd (cur_hd) == 0){
@@ -155,7 +155,8 @@ static value heap_stats (int returnstats)
|| Color_hp (prev_hp) != Caml_blue
|| cur_hp == (header_t *) caml_gc_sweep_hp);
}else{
- if (caml_gc_phase == Phase_sweep && cur_hp >= (header_t *) caml_gc_sweep_hp){
+ if (caml_gc_phase == Phase_sweep
+ && cur_hp >= (header_t *) caml_gc_sweep_hp){
++ free_blocks;
free_words += Whsize_hd (cur_hd);
if (Whsize_hd (cur_hd) > largest_free){
diff --git a/byterun/ints.c b/byterun/ints.c
index 59a11b124b..bfc622fcf5 100644
--- a/byterun/ints.c
+++ b/byterun/ints.c
@@ -438,7 +438,9 @@ CAMLprim value caml_int64_mod(value v1, value v2)
if (divisor == 0) caml_raise_zero_divide();
/* PR#4740: on some processors, division crashes on overflow.
Implement the same behavior as for type "int". */
- if (dividend == ((int64_t)1 << 63) && divisor == -1) return caml_copy_int64(0);
+ if (dividend == ((int64_t)1 << 63) && divisor == -1){
+ return caml_copy_int64(0);
+ }
return caml_copy_int64(Int64_val(v1) % divisor);
}
diff --git a/byterun/major_gc.c b/byterun/major_gc.c
index 8d5dd00678..356fa179a1 100644
--- a/byterun/major_gc.c
+++ b/byterun/major_gc.c
@@ -501,7 +501,8 @@ static asize_t clip_heap_chunk_size (asize_t request)
request = Heap_chunk_min;
}
return
- Wsize_bsize (((Bsize_wsize (request) + Page_size - 1) >> Page_log) << Page_log);
+ Wsize_bsize (((Bsize_wsize (request) + Page_size - 1)
+ >> Page_log) << Page_log);
}
/* Compute the heap increment, make sure the request is at least that big,
@@ -538,14 +539,16 @@ void caml_init_major_heap (asize_t heap_size)
caml_stat_heap_wsz = Wsize_bsize (clip_heap_chunk_size (heap_size));
caml_stat_top_heap_wsz = caml_stat_heap_wsz;
Assert (Bsize_wsize (caml_stat_heap_wsz) % Page_size == 0);
- caml_heap_start = (char *) caml_alloc_for_heap (Bsize_wsize (caml_stat_heap_wsz));
+ caml_heap_start =
+ (char *) caml_alloc_for_heap (Bsize_wsize (caml_stat_heap_wsz));
if (caml_heap_start == NULL)
caml_fatal_error ("Fatal error: not enough memory for the initial heap.\n");
Chunk_next (caml_heap_start) = NULL;
caml_stat_heap_chunks = 1;
if (caml_page_table_add(In_heap, caml_heap_start,
- caml_heap_start + Bsize_wsize (caml_stat_heap_wsz)) != 0) {
+ caml_heap_start + Bsize_wsize (caml_stat_heap_wsz))
+ != 0) {
caml_fatal_error ("Fatal error: not enough memory "
"for the initial page table.\n");
}
diff --git a/byterun/misc.c b/byterun/misc.c
index e62dc733bd..f4738bbeea 100644
--- a/byterun/misc.c
+++ b/byterun/misc.c
@@ -189,9 +189,9 @@ int caml_runtime_warnings_active(void)
{
if (!caml_runtime_warnings) return 0;
if (caml_runtime_warnings_first) {
- fprintf(stderr, "[ocaml] (use Sys.enable_runtime_warnings to control these warnings)\n");
+ fprintf(stderr, "[ocaml] (use Sys.enable_runtime_warnings to control "
+ "these warnings)\n");
caml_runtime_warnings_first = 0;
}
return 1;
}
-
diff --git a/byterun/startup.c b/byterun/startup.c
index 70c35f8aa4..faa0e4a1f7 100644
--- a/byterun/startup.c
+++ b/byterun/startup.c
@@ -138,7 +138,8 @@ void caml_read_section_descriptors(int fd, struct exec_trailer *trail)
Return the length of the section data in bytes, or -1 if no section
found with that name. */
-int32_t caml_seek_optional_section(int fd, struct exec_trailer *trail, char *name)
+int32_t caml_seek_optional_section(int fd, struct exec_trailer *trail,
+ char *name)
{
long ofs;
int i;
diff --git a/byterun/sys.c b/byterun/sys.c
index 4a890a18e4..250d9683e0 100644
--- a/byterun/sys.c
+++ b/byterun/sys.c
@@ -105,7 +105,8 @@ CAMLprim value caml_sys_exit(value retcode)
double majwords = caml_stat_major_words + (double) caml_allocated_words;
double allocated_words =
minwords + majwords - prowords;
- caml_gc_message(0x400, "## Total allocated words: %ld\n", (long)allocated_words);
+ caml_gc_message(0x400, "## Total allocated words: %ld\n",
+ (long)allocated_words);
}
#ifndef NATIVE_CODE
@@ -435,17 +436,17 @@ CAMLprim value caml_sys_const_max_wosize(value unit)
CAMLprim value caml_sys_const_ostype_unix(value unit)
{
- return Val_long(0 == strcmp(OCAML_OS_TYPE,"Unix"));
+ return Val_bool(0 == strcmp(OCAML_OS_TYPE,"Unix"));
}
CAMLprim value caml_sys_const_ostype_win32(value unit)
{
- return Val_long(0 == strcmp(OCAML_OS_TYPE,"Win32"));
+ return Val_bool(0 == strcmp(OCAML_OS_TYPE,"Win32"));
}
CAMLprim value caml_sys_const_ostype_cygwin(value unit)
{
- return Val_long(0 == strcmp(OCAML_OS_TYPE,"Cygwin"));
+ return Val_bool(0 == strcmp(OCAML_OS_TYPE,"Cygwin"));
}
CAMLprim value caml_sys_get_config(value unit)
@@ -498,7 +499,8 @@ CAMLprim value caml_sys_isatty(value chan)
fd = (Channel(chan))->fd;
#ifdef _WIN32
- ret = Val_bool(_isatty(fd)); /* https://msdn.microsoft.com/en-us/library/f4s0ddew.aspx */
+ ret = Val_bool(_isatty(fd));
+ /* https://msdn.microsoft.com/en-us/library/f4s0ddew.aspx */
#else
ret = Val_bool(isatty(fd));
#endif
diff --git a/configure b/configure
index 2dcf38a7ef..ac11f1e626 100755
--- a/configure
+++ b/configure
@@ -436,7 +436,8 @@ export cc cclibs verbose
cc="$bytecc $bytecccompopts $bytecclinkopts" sh ./runtest ansi.c
case $? in
0) inf "The C compiler is ISO C99 compliant." ;;
- 1) wrn "The C compiler is ANSI / ISO C90 compliant, but not ISO C99 compliant.";;
+ 1) wrn "The C compiler is ANSI / ISO C90 compliant, but not ISO C99" \
+ "compliant.";;
2) err "The C compiler $cc is not ISO C compliant.\n" \
"You need an ISO C99 compiler to build OCaml.";;
*)
@@ -462,8 +463,8 @@ if $cross_compiler; then
ocaml_source_version=`sed -n '1 s/\([0-9\.]*\).*/\1/ p' < ../../VERSION`
if test x"$ocaml_system_version" != x"$ocaml_source_version"; then
err "While you have an ocaml runtime environment, its version\n" \
- "($ocaml_system_version) doesn't match the version of these sources\n" \
- "($ocaml_source_version)."
+ "($ocaml_system_version) doesn't match the version of these\n" \
+ "sources ($ocaml_source_version)."
else
echo "CAMLRUN=`./searchpath -p ocamlrun`" >> Makefile
fi
@@ -474,7 +475,8 @@ if $cross_compiler; then
else
ocamlyacc 2>/dev/null
if test "$?" -ne 1; then
- err "While you have an ocamlyacc binary, it cannot be executed successfully."
+ err "While you have an ocamlyacc binary, it cannot be executed" \
+ "successfully."
else
echo "CAMLYACC=`./searchpath -p ocamlyacc`" >> Makefile
fi
@@ -556,13 +558,14 @@ case $? in
echo "#define ARCH_BIG_ENDIAN" >> m.h;;
1) inf "This is a little-endian architecture."
echo "#undef ARCH_BIG_ENDIAN" >> m.h;;
- 2) err "This architecture seems to be neither big endian nor little endian.\n" \
- "OCaml won't run on this architecture.";;
+ 2) err "This architecture seems to be neither big endian nor little" \
+ "endian.\n OCaml won't run on this architecture.";;
*) case $target in
*-*-mingw*) inf "This is a little-endian architecture."
echo "#undef ARCH_BIG_ENDIAN" >> m.h;;
*) wrn "Something went wrong during endianness determination.\n" \
- "You will have to figure out endianness yourself (option ARCH_BIG_ENDIAN in m.h).";;
+ "You will have to figure out endianness yourself\n" \
+ "(option ARCH_BIG_ENDIAN in m.h).";;
esac;;
esac
@@ -595,7 +598,8 @@ case "$target" in
*) case "$target" in
*-*-mingw*) inf "Doubles can be word-aligned."
echo "#undef ARCH_ALIGN_DOUBLE" >> m.h;;
- *) wrn "Something went wrong during alignment determination for doubles.\n" \
+ *) wrn "Something went wrong during alignment determination for" \
+ "doubles.\n" \
"We will assume alignment constraints over doubles.\n" \
"That's a safe bet: OCaml will work even if\n" \
"this architecture actually has no alignment constraints."
@@ -651,7 +655,8 @@ if test $with_sharedlibs = "yes"; then
mksharedlib="$flexlink"
mkmaindll="$flexlink -maindll"
shared_libraries_supported=true;;
- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
+ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\
+ |*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
sharedcccompopts="-fPIC"
mksharedlib="$bytecc -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
@@ -707,12 +712,14 @@ if test $with_sharedlibs = "yes"; then
mksharedlibrpath="-rpath "
shared_libraries_supported=true;;
i[3456]86-*-darwin[89].*)
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
+ mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress \
+ -read_only_relocs suppress"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true;;
*-apple-darwin*)
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
+ mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress \
+ -Wl,-no_compact_unwind"
bytecccompopts="$dl_defs $bytecccompopts"
dl_needs_underscore=false
shared_libraries_supported=true;;
@@ -1300,7 +1307,9 @@ fi
nanosecond_stat=none
for i in 1 2 3; do
- if sh ./trycompile -DHAS_NANOSECOND_STAT=$i nanosecond_stat.c; then nanosecond_stat=$i; break; fi
+ if sh ./trycompile -DHAS_NANOSECOND_STAT=$i nanosecond_stat.c; then
+ nanosecond_stat=$i; break
+ fi
done
if test $nanosecond_stat != "none"; then
inf "stat() supports nanosecond precision."
@@ -1686,7 +1695,9 @@ SYSLIB=-l\$(1)
### How to build a static library
MKLIB=${TOOLPREF}ar rc \$(1) \$(2); ${TOOLPREF}ranlib \$(1)
-#ml let mklib out files opts = Printf.sprintf "${TOOLPREF}ar rc %s %s %s; ${TOOLPREF}ranlib %s" out opts files out;;
+#ml let mklib out files opts =
+#ml Printf.sprintf "${TOOLPREF}ar rc %s %s %s;
+#ml ${TOOLPREF}ranlib %s" out opts files out;;
EOF
echo "ARCH=$arch" >> Makefile
echo "MODEL=$model" >> Makefile
@@ -1761,11 +1772,13 @@ inf " manual pages.............. $mandir (with extension .$manext)"
inf "Configuration for the bytecode compiler:"
inf " C compiler used........... $bytecc"
inf " options for compiling..... $bytecccompopts"
-inf " options for linking....... $bytecclinkopts $cclibs $dllib $curseslibs $pthread_link"
+inf " options for linking....... $bytecclinkopts $cclibs $dllib" \
+ "$curseslibs $pthread_link"
if $shared_libraries_supported; then
inf " shared libraries are supported"
inf " options for compiling..... $sharedcccompopts $bytecccompopts"
-inf " command for building...... $mksharedlib -o lib.so $mksharedlibrpath/a/path objs"
+inf " command for building...... $mksharedlib -o lib.so" \
+ "$mksharedlibrpath/a/path objs"
else
inf " shared libraries not supported"
fi
diff --git a/debugger/command_line.ml b/debugger/command_line.ml
index 9fa9ff9d8d..e1fe2d1655 100644
--- a/debugger/command_line.ml
+++ b/debugger/command_line.ml
@@ -270,7 +270,7 @@ let instr_dir ppf lexbuf =
let new_directory' = List.rev new_directory in
match new_directory' with
| mdl :: for_keyw :: tl
- when (String.lowercase_ascii for_keyw) = "for" && (List.length tl) > 0 ->
+ when String.lowercase_ascii for_keyw = "for" && List.length tl > 0 ->
List.iter (function x -> add_path_for mdl (expand_path x)) tl
| _ ->
List.iter (function x -> add_path (expand_path x)) new_directory'
diff --git a/driver/main.ml b/driver/main.ml
index e765d2eedd..9421efaf6d 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -105,7 +105,9 @@ module Options = Main_args.Make_bytecomp_options (struct
let _open s = open_modules := s :: !open_modules
let _output_obj () = output_c_object := true; custom_runtime := true
let _output_complete_obj () =
- output_c_object := true; output_complete_object := true; custom_runtime := true
+ output_c_object := true;
+ output_complete_object := true;
+ custom_runtime := true
let _pack = set make_package
let _pp s = preprocessor := Some s
let _ppx s = first_ppx := s :: !first_ppx
@@ -201,7 +203,3 @@ let main () =
exit 2
let _ = main ()
-
-
-
-
diff --git a/driver/pparse.mli b/driver/pparse.mli
index 6497698939..898f30f241 100644
--- a/driver/pparse.mli
+++ b/driver/pparse.mli
@@ -20,20 +20,28 @@ exception Error of error
val preprocess : string -> string
val remove_preprocessed : string -> unit
-val file : formatter -> tool_name:string -> string -> (Lexing.lexbuf -> 'a) -> string -> 'a
+val file :
+ formatter -> tool_name:string -> string -> (Lexing.lexbuf -> 'a) -> string ->
+ 'a
val apply_rewriters: ?restore:bool -> tool_name:string -> string -> 'a -> 'a
- (** If [restore = true] (the default), cookies set by external rewriters will be
- kept for later calls. *)
+ (** If [restore = true] (the default), cookies set by external
+ rewriters will be kept for later calls. *)
-val apply_rewriters_str: ?restore:bool -> tool_name:string -> Parsetree.structure -> Parsetree.structure
-val apply_rewriters_sig: ?restore:bool -> tool_name:string -> Parsetree.signature -> Parsetree.signature
+val apply_rewriters_str:
+ ?restore:bool -> tool_name:string -> Parsetree.structure ->
+ Parsetree.structure
+val apply_rewriters_sig:
+ ?restore:bool -> tool_name:string -> Parsetree.signature ->
+ Parsetree.signature
val report_error : formatter -> error -> unit
-val parse_implementation: formatter -> tool_name:string -> string -> Parsetree.structure
-val parse_interface: formatter -> tool_name:string -> string -> Parsetree.signature
+val parse_implementation:
+ formatter -> tool_name:string -> string -> Parsetree.structure
+val parse_interface:
+ formatter -> tool_name:string -> string -> Parsetree.signature
(* [call_external_preprocessor sourcefile pp] *)
val call_external_preprocessor : string -> string -> string
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index 7c6d9885d7..9ae4a085be 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -290,7 +290,8 @@ test_framed: dummy
test_latex: dummy
$(MKDIR) $@
- $(OCAMLDOC_RUN) -latex -sort -o $@/test.tex -d $@ $(INCLUDES) odoc*.ml odoc*.mli test2.txt ../stdlib/*.mli ../otherlibs/unix/unix.mli
+ $(OCAMLDOC_RUN) -latex -sort -o $@/test.tex -d $@ $(INCLUDES) odoc*.ml \
+ odoc*.mli test2.txt ../stdlib/*.mli ../otherlibs/unix/unix.mli
test_latex_simple: dummy
$(MKDIR) $@
diff --git a/ocamldoc/generators/odoc_literate.ml b/ocamldoc/generators/odoc_literate.ml
index 0e2718a301..94b99f0593 100644
--- a/ocamldoc/generators/odoc_literate.ml
+++ b/ocamldoc/generators/odoc_literate.ml
@@ -59,7 +59,14 @@ class html =
method private code_block b code =
code_id <- code_id + 1;
Printf.bprintf b
- "<span class=\"code_expand\" onclick=\"if(document.getElementById('code%d').style.display=='none') {document.getElementById('code%d').style.display='block';} else {document.getElementById('code%d').style.display='none';}\"><img src=\"expand_collapse.png\" alt=\"+/-\"/></span>" code_id code_id code_id;
+ "<span class=\"code_expand\" onclick=\"\
+ if(document.getElementById('code%d').style.display=='none') {\
+ document.getElementById('code%d').style.display='block';\
+ } else {\
+ document.getElementById('code%d').style.display='none';\
+ }\">\
+ <img src=\"expand_collapse.png\" alt=\"+/-\"/></span>"
+ code_id code_id code_id;
Printf.bprintf b "<div id=\"code%d\" class=\"codeblock\">" code_id;
self#html_of_code b code;
Printf.bprintf b "</div>"
diff --git a/ocamldoc/odoc_cross.ml b/ocamldoc/odoc_cross.ml
index 28e6ae5bf2..156651f58e 100644
--- a/ocamldoc/odoc_cross.ml
+++ b/ocamldoc/odoc_cross.ml
@@ -465,7 +465,8 @@ and associate_in_module_type module_list (acc_b_modif, acc_incomplete_top_module
and associate_in_module_element module_list m_name (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) element =
match element with
Element_module m -> associate_in_module module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) m
- | Element_module_type mt -> associate_in_module_type module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) mt
+ | Element_module_type mt ->
+ associate_in_module_type module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) mt
| Element_included_module im ->
(
match im.im_module with
@@ -492,9 +493,11 @@ and associate_in_module_element module_list m_name (acc_b_modif, acc_incomplete_
(true, acc_incomplete_top_module_names, acc_names_not_found)
)
| Element_class cl -> associate_in_class module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) cl
- | Element_class_type ct -> associate_in_class_type module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) ct
+ | Element_class_type ct ->
+ associate_in_class_type module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) ct
| Element_value _ -> (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found)
- | Element_type_extension te -> associate_in_type_extension module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) te
+ | Element_type_extension te ->
+ associate_in_type_extension module_list (acc_b_modif, acc_incomplete_top_module_names, acc_names_not_found) te
| Element_exception ex ->
(
match ex.ex_alias with
@@ -509,7 +512,9 @@ and associate_in_module_element module_list m_name (acc_b_modif, acc_incomplete_
with Not_found -> None
in
match ex_opt with
- None -> (acc_b_modif, (Name.head m_name) :: acc_incomplete_top_module_names, (NF_ex ea.ea_name) :: acc_names_not_found)
+ None -> (acc_b_modif,
+ (Name.head m_name) :: acc_incomplete_top_module_names,
+ (NF_ex ea.ea_name) :: acc_names_not_found)
| Some e ->
ea.ea_ex <- Some e ;
(true, acc_incomplete_top_module_names, acc_names_not_found)
@@ -661,7 +666,9 @@ and associate_in_type_extension module_list (acc_b_modif, acc_incomplete_top_mod
with Not_found -> None
in
match xt_opt with
- None -> (acc_b_modif, (Name.head xt.xt_name) :: acc_incomplete_top_module_names, (NF_xt xa.xa_name) :: acc_names_not_found)
+ None -> (acc_b_modif,
+ (Name.head xt.xt_name) :: acc_incomplete_top_module_names,
+ (NF_xt xa.xa_name) :: acc_names_not_found)
| Some x ->
xa.xa_xt <- Some x ;
(true, acc_incomplete_top_module_names, acc_names_not_found))
diff --git a/ocamldoc/odoc_extension.ml b/ocamldoc/odoc_extension.ml
index 7b3da5f4b1..c649c3c7d2 100644
--- a/ocamldoc/odoc_extension.ml
+++ b/ocamldoc/odoc_extension.ml
@@ -1,4 +1,5 @@
(***********************************************************************)
+(* *)
(* OCamldoc *)
(* *)
(* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *)
@@ -9,8 +10,6 @@
(* *)
(***********************************************************************)
-(* $Id$ *)
-
(** Representation and manipulation of type extensions. *)
module Name = Odoc_name
diff --git a/ocamldoc/odoc_messages.ml b/ocamldoc/odoc_messages.ml
index 0ac45ba91a..f2a6dbe6b5 100644
--- a/ocamldoc/odoc_messages.ml
+++ b/ocamldoc/odoc_messages.ml
@@ -255,7 +255,8 @@ let file_not_found_in_paths paths name =
(String.concat "\n" paths)
let tag_not_handled tag = "Tag @"^tag^" not handled by this generator"
-let should_escape_at_sign = "The character @ has a special meaning in ocamldoc comments, for commands such as @raise or @since. If you want to write a single @, you must escape it as \\@."
+let should_escape_at_sign = "The character @ has a special meaning in ocamldoc comments, for commands such as @raise or @since. \
+If you want to write a single @, you must escape it as \\@."
let bad_tree = "Incorrect tree structure."
let not_a_valid_tag s = s^" is not a valid tag."
let fun_without_param f = "Function "^f^" has no parameter.";;
@@ -293,7 +294,8 @@ let module_type_not_found_in_typedtree mt = "Module type "^mt^" was not found in
let module_not_found_in_typedtree m = "Module "^m^" was not found in typed tree."
let class_not_found_in_typedtree c = "Class "^c^" was not found in typed tree."
let class_type_not_found_in_typedtree ct = "Class type "^ct^" was not found in typed tree."
-let inherit_classexp_not_found_in_typedtree n = "Inheritance class expression number "^(string_of_int n)^" was not found in typed tree."
+let inherit_classexp_not_found_in_typedtree n =
+ "Inheritance class expression number "^(string_of_int n)^" was not found in typed tree."
let attribute_not_found_in_typedtree att = "Class attribute "^att^" was not found in typed tree."
let method_not_found_in_typedtree met = "Class method "^met^" was not found in typed tree."
let misplaced_comment file pos =
diff --git a/otherlibs/bigarray/bigarray.ml b/otherlibs/bigarray/bigarray.ml
index 7d348a5fa8..a037012682 100644
--- a/otherlibs/bigarray/bigarray.ml
+++ b/otherlibs/bigarray/bigarray.ml
@@ -286,18 +286,25 @@ external set3: unit -> unit = "caml_ba_set_3"
(* Array1 *)
external ( .{} ) : ('a, 'b, 'c) Array1.t -> int -> 'a = "%caml_ba_opt_ref_1"
-external ( .{} <- ) : ('a, 'b, 'c) Array1.t -> int -> 'a -> unit = "%caml_ba_opt_set_1"
+external ( .{} <- ) : ('a, 'b, 'c) Array1.t -> int -> 'a -> unit
+ = "%caml_ba_opt_set_1"
(* Array2 *)
-external ( .{,} ) : ('a, 'b, 'c) Array2.t -> int->int -> 'a = "%caml_ba_opt_ref_2"
-external ( .{,} <- ) : ('a, 'b, 'c) Array2.t -> int->int -> 'a -> unit = "%caml_ba_opt_set_2"
+external ( .{,} ) : ('a, 'b, 'c) Array2.t -> int->int -> 'a
+ = "%caml_ba_opt_ref_2"
+external ( .{,} <- ) : ('a, 'b, 'c) Array2.t -> int->int -> 'a -> unit
+ = "%caml_ba_opt_set_2"
(*Array3*)
-external ( .{,,} ) : ('a, 'b, 'c) Array3.t -> int->int->int -> 'a = "%caml_ba_opt_ref_3"
-external ( .{,,} <- ) : ('a, 'b, 'c) Array3.t -> int->int->int -> 'a -> unit = "%caml_ba_opt_set_3"
+external ( .{,,} ) : ('a, 'b, 'c) Array3.t -> int->int->int -> 'a
+ = "%caml_ba_opt_ref_3"
+external ( .{,,} <- ) : ('a, 'b, 'c) Array3.t -> int->int->int -> 'a -> unit
+ = "%caml_ba_opt_set_3"
(*Genarray*)
-external ( .{,..,} ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a = "caml_ba_get_generic"
-external ( .{,..,} <- ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a -> unit = "caml_ba_set_generic"
+external ( .{,..,} ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a
+ = "caml_ba_get_generic"
+external ( .{,..,} <- ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a -> unit
+ = "caml_ba_set_generic"
diff --git a/otherlibs/bigarray/bigarray.mli b/otherlibs/bigarray/bigarray.mli
index da044ab141..689c02924a 100644
--- a/otherlibs/bigarray/bigarray.mli
+++ b/otherlibs/bigarray/bigarray.mli
@@ -460,15 +460,17 @@ module Genarray :
end
-external ( .{,..,} ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a = "caml_ba_get_generic"
-(** Index operator for generic arrays. When the [Bigarray] module is open,
- [ bigarray.{a,b,c,d,...} ] is desugared to [ (.{,..,} ) bigarray [|a,b,c,d,...|] ].
- *)
-
-external ( .{,..,} <- ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a -> unit = "caml_ba_set_generic"
-(** Indexed assignment operator for generic arrays. When the [Bigarray] module is open,
- [ bigarray.{a,b,c,d,...} <- x ] is desugared to [ (.{,..,} ) bigarray [|a,b,c,d,...|] x ].
- *)
+external ( .{,..,} ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a
+ = "caml_ba_get_generic"
+(** Index operator for generic arrays. When the [Bigarray] module is
+ open, [ bigarray.{a,b,c,d,...} ] is desugared to [ (.{,..,} )
+ bigarray [|a,b,c,d,...|] ]. *)
+
+external ( .{,..,} <- ) : ('a, 'b, 'c) Genarray.t -> int array -> 'a -> unit
+ = "caml_ba_set_generic"
+(** Indexed assignment operator for generic arrays. When the
+ [Bigarray] module is open, [ bigarray.{a,b,c,d,...} <- x ] is
+ desugared to [ (.{,..,} ) bigarray [|a,b,c,d,...|] x ]. *)
(** {6 One-dimensional arrays} *)
@@ -552,14 +554,15 @@ module Array1 : sig
end
external ( .{} ) : ('a, 'b, 'c) Array1.t -> int -> 'a = "%caml_ba_opt_ref_1"
-(** Index operator for one-dimensional arrays. When the [Bigarray] module is open,
- [ bigarray.{a} ] is desugared to [ (.{} ) bigarray a ].
- *)
+(** Index operator for one-dimensional arrays. When the [Bigarray]
+ module is open, [ bigarray.{a} ] is desugared to [ (.{} ) bigarray a
+ ]. *)
-external ( .{} <- ) : ('a, 'b, 'c) Array1.t -> int -> 'a -> unit = "%caml_ba_opt_set_1"
-(** Indexed assignment operator for one-dimensional arrays. When the [Bigarray] module is open,
- [ bigarray.{a} <- x ] is desugared to [ (.{} ) bigarray x ].
- *)
+external ( .{} <- ) : ('a, 'b, 'c) Array1.t -> int -> 'a -> unit
+ = "%caml_ba_opt_set_1"
+(** Indexed assignment operator for one-dimensional arrays. When the
+ [Bigarray] module is open, [ bigarray.{a} <- x ] is desugared to [
+ (.{} ) bigarray x ]. *)
(** {6 Two-dimensional arrays} *)
@@ -664,15 +667,17 @@ module Array2 :
end
-external ( .{,} ) : ('a, 'b, 'c) Array2.t -> int -> int -> 'a = "%caml_ba_opt_ref_2"
+external ( .{,} ) : ('a, 'b, 'c) Array2.t -> int -> int -> 'a
+ = "%caml_ba_opt_ref_2"
(** Index operator for bidimensional arrays. When the [Bigarray] module is open,
[ bigarray.{a,b} ] is desugared to [ (.{,} ) bigarray a b ].
*)
-external ( .{,} <- ) : ('a, 'b, 'c) Array2.t -> int -> int -> 'a -> unit = "%caml_ba_opt_set_2"
-(** Indexed assignment operator for bidimensionnal arrays. When the [Bigarray] module is open,
- [ bigarray.{a,b} <- x ] is desugared to [ (.{,} ) bigarray a b x ].
- *)
+external ( .{,} <- ) : ('a, 'b, 'c) Array2.t -> int -> int -> 'a -> unit
+ = "%caml_ba_opt_set_2"
+(** Indexed assignment operator for bidimensionnal arrays. When the
+ [Bigarray] module is open, [ bigarray.{a,b} <- x ] is desugared to
+ [ (.{,} ) bigarray a b x ]. *)
(** {6 Three-dimensional arrays} *)
@@ -803,15 +808,17 @@ module Array3 :
end
-external ( .{,,} ) : ('a, 'b, 'c) Array3.t -> int -> int -> int -> 'a = "%caml_ba_opt_ref_3"
-(** Index operator for tridimensional arrays. When the [Bigarray] module is open,
- [ bigarray.{a,b,c} ] is desugared to [ (.{,} ) bigarray a b c ].
- *)
-
-external ( .{,,} <- ) : ('a, 'b, 'c) Array3.t -> int -> int -> int -> 'a -> unit = "%caml_ba_opt_set_3"
-(** Indexed assignment operator for tridimensionnal arrays. When the [Bigarray] module is open,
- [ bigarray.{a,b,c} <- x ] is desugared to [ (.{,,} ) bigarray a b c x ].
- *)
+external ( .{,,} ) : ('a, 'b, 'c) Array3.t -> int -> int -> int -> 'a
+ = "%caml_ba_opt_ref_3"
+(** Index operator for tridimensional arrays. When the [Bigarray]
+ module is open, [ bigarray.{a,b,c} ] is desugared to
+ [ (.{,} ) bigarray a b c ]. *)
+
+external ( .{,,} <- ) : ('a, 'b, 'c) Array3.t -> int -> int -> int -> 'a -> unit
+ = "%caml_ba_opt_set_3"
+(** Indexed assignment operator for tridimensionnal arrays. When the
+ [Bigarray] module is open, [ bigarray.{a,b,c} <- x ] is desugared to
+ [ (.{,,} ) bigarray a b c x ]. *)
(** {6 Coercions between generic big arrays and fixed-dimension big arrays} *)
diff --git a/otherlibs/str/str.ml b/otherlibs/str/str.ml
index 1bf2440b26..746f52570e 100644
--- a/otherlibs/str/str.ml
+++ b/otherlibs/str/str.ml
@@ -273,7 +273,8 @@ let compile fold_case re =
let rec emit_code = function
Char c ->
if fold_case then
- emit_instr op_CHARNORM (Char.code (Char.lowercase c))[@ocaml.warnerror "-3"]
+ emit_instr op_CHARNORM (Char.code (Char.lowercase c))
+ [@ocaml.warnerror "-3"]
else
emit_instr op_CHAR (Char.code c)
| String s ->
@@ -281,7 +282,8 @@ let compile fold_case re =
0 -> ()
| 1 ->
if fold_case then
- emit_instr op_CHARNORM (Char.code (Char.lowercase s.[0]))[@ocaml.warnerror "-3"]
+ emit_instr op_CHARNORM (Char.code (Char.lowercase s.[0]))
+ [@ocaml.warnerror "-3"]
else
emit_instr op_CHAR (Char.code s.[0])
| _ ->
@@ -294,7 +296,8 @@ let compile fold_case re =
emit_code (String (string_after s (i+1)))
with Not_found ->
if fold_case then
- emit_instr op_STRINGNORM (cpool_index (String.lowercase s))[@ocaml.warnerror "-3"]
+ emit_instr op_STRINGNORM (cpool_index (String.lowercase s))
+ [@ocaml.warnerror "-3"]
else
emit_instr op_STRING (cpool_index s)
end
diff --git a/otherlibs/systhreads/st_posix.h b/otherlibs/systhreads/st_posix.h
index 6771948ac0..b9e2a25b20 100644
--- a/otherlibs/systhreads/st_posix.h
+++ b/otherlibs/systhreads/st_posix.h
@@ -348,7 +348,8 @@ static void * caml_thread_tick(void * arg)
The reason for the omission is that Android (GUI) applications
are not supposed to fork at all, however this workaround is still
included in case OCaml is used for an Android CLI utility. */
-int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
+int pthread_atfork(void (*prepare)(void), void (*parent)(void),
+ void (*child)(void));
#endif
static int st_atfork(void (*fn)(void))
diff --git a/otherlibs/unix/stat.c b/otherlibs/unix/stat.c
index f938645a93..52a00005c8 100644
--- a/otherlibs/unix/stat.c
+++ b/otherlibs/unix/stat.c
@@ -49,9 +49,12 @@ static value stat_aux(int use_64, struct stat *buf)
CAMLlocal5(atime, mtime, ctime, offset, v);
#include "nanosecond_stat.h"
- atime = caml_copy_double((double) buf->st_atime + (NSEC(buf, a) / 1000000000.0));
- mtime = caml_copy_double((double) buf->st_mtime + (NSEC(buf, m) / 1000000000.0));
- ctime = caml_copy_double((double) buf->st_ctime + (NSEC(buf, c) / 1000000000.0));
+ atime = caml_copy_double((double) buf->st_atime
+ + (NSEC(buf, a) / 1000000000.0));
+ mtime = caml_copy_double((double) buf->st_mtime
+ + (NSEC(buf, m) / 1000000000.0));
+ ctime = caml_copy_double((double) buf->st_ctime
+ + (NSEC(buf, c) / 1000000000.0));
#undef NSEC
offset = use_64 ? Val_file_offset(buf->st_size) : Val_int (buf->st_size);
v = alloc_small(12, 0);
diff --git a/otherlibs/win32graph/dib.c b/otherlibs/win32graph/dib.c
index 26fccf7f18..4c489d5278 100644
--- a/otherlibs/win32graph/dib.c
+++ b/otherlibs/win32graph/dib.c
@@ -77,7 +77,7 @@ enum PAL_SIZE
PALSIZE_MEDIUM,
PALSIZE_LARGE
};
-#define CopyPalette(hPal) CopyPaletteChangingFlags (hPal, DONT_CHANGE_FLAGS)
+#define CopyPalette(hPal) CopyPaletteChangingFlags (hPal, DONT_CHANGE_FLAGS)
#define CopyPalForAnimation(hPal) CopyPaletteChangingFlags (hPal, PC_RESERVED)
// WIDTHBYTES takes # of bits in a scan line and rounds up to nearest
// word.
@@ -296,8 +296,9 @@ static HANDLE ReadDIBFile (int hFile,int dwBitsSize)
// Go read the DIB file header and check if it's valid.
- if ((_lread (hFile, (LPSTR) &bmfHeader, sizeof (bmfHeader)) != sizeof (bmfHeader)) ||
- (bmfHeader.bfType != DIB_HEADER_MARKER))
+ if ((_lread (hFile, (LPSTR) &bmfHeader, sizeof (bmfHeader))
+ != sizeof (bmfHeader))
+ || (bmfHeader.bfType != DIB_HEADER_MARKER))
{
// ShowDbgMsg("Not a DIB file!");
return NULL;
@@ -305,7 +306,8 @@ static HANDLE ReadDIBFile (int hFile,int dwBitsSize)
// Allocate memory for DIB
- hDIB = GlobalAlloc (GMEM_SHARE|GMEM_MOVEABLE | GMEM_ZEROINIT, dwBitsSize - sizeof(BITMAPFILEHEADER));
+ hDIB = GlobalAlloc (GMEM_SHARE|GMEM_MOVEABLE | GMEM_ZEROINIT,
+ dwBitsSize - sizeof(BITMAPFILEHEADER));
if (hDIB == 0)
{
@@ -402,18 +404,18 @@ static void DIBPaint (HDC hDC,LPRECT lpDCRect,HANDLE hDIB)
// Make sure to use the stretching mode best for color pictures.
SetStretchBltMode (hDC, COLORONCOLOR);
SetDIBitsToDevice (hDC, // hDC
- lpDCRect->left, // DestX
- lpDCRect->top, // DestY
- RECTWIDTH (lpDCRect), // nDestWidth
- RECTHEIGHT (lpDCRect), // nDestHeight
- 0, // SrcX
- 0,
+ lpDCRect->left, // DestX
+ lpDCRect->top, // DestY
+ RECTWIDTH (lpDCRect), // nDestWidth
+ RECTHEIGHT (lpDCRect), // nDestHeight
+ 0, // SrcX
+ 0,
// (int) DIBHeight (lpDIBHdr), // SrcY
- 0, // nStartScan
- (WORD) DIBHeight (lpDIBHdr), // nNumScans
- lpDIBBits, // lpBits
- (LPBITMAPINFO) lpDIBHdr, // lpBitsInfo
- DIB_RGB_COLORS); // wUsage
+ 0, // nStartScan
+ (WORD) DIBHeight (lpDIBHdr), // nNumScans
+ lpDIBBits, // lpBits
+ (LPBITMAPINFO) lpDIBHdr, // lpBitsInfo
+ DIB_RGB_COLORS); // wUsage
GlobalUnlock (hDIB);
}
@@ -442,7 +444,8 @@ HANDLE ChargerBitmap(char *FileName,POINT *lppt)
unsigned int size;
size = Getfilesize(FileName);
- hFile=OpenFile((LPSTR) FileName, &ofstruct, OF_READ | OF_SHARE_DENY_WRITE);
+ hFile=OpenFile((LPSTR) FileName, &ofstruct,
+ OF_READ | OF_SHARE_DENY_WRITE);
result = ReadDIBFile(hFile,size);
if (hFile) _lclose(hFile);
if (result) {
diff --git a/otherlibs/win32graph/draw.c b/otherlibs/win32graph/draw.c
index 99e1c5c7e8..14a93bb9c4 100644
--- a/otherlibs/win32graph/draw.c
+++ b/otherlibs/win32graph/draw.c
@@ -500,7 +500,8 @@ CAMLprim value caml_gr_draw_image(value i, value x, value y)
if (Mask(i) == NULL) {
if (grremember_mode) {
oldBmp = SelectObject(grwindow.tempDC,Data(i));
- BitBlt(grwindow.gcBitmap,xdst, ydst, Width(i), Height(i),
+ BitBlt(grwindow.gcBitmap,xdst, ydst, Width(i),
+ Height(i),
grwindow.tempDC, 0, 0, SRCCOPY);
SelectObject(grwindow.tempDC,oldBmp);
}
@@ -514,11 +515,13 @@ CAMLprim value caml_gr_draw_image(value i, value x, value y)
else {
if (grremember_mode) {
oldBmp = SelectObject(grwindow.tempDC,Mask(i));
- BitBlt(grwindow.gcBitmap,xdst, ydst, Width(i), Height(i),
- grwindow.tempDC, 0, 0, SRCAND);
+ BitBlt(grwindow.gcBitmap,xdst, ydst, Width(i),
+ Height(i),
+ grwindow.tempDC, 0, 0, SRCAND);
SelectObject(grwindow.tempDC,Data(i));
- BitBlt(grwindow.gcBitmap,xdst, ydst, Width(i), Height(i),
- grwindow.tempDC, 0, 0, SRCPAINT);
+ BitBlt(grwindow.gcBitmap,xdst, ydst, Width(i),
+ Height(i),
+ grwindow.tempDC, 0, 0, SRCPAINT);
SelectObject(grwindow.tempDC,oldBmp);
}
if (grdisplay_mode) {
@@ -567,7 +570,8 @@ CAMLprim value caml_gr_make_image(value matrix)
int red = (col >> 16) & 0xFF;
int green = (col >> 8) & 0xFF;
int blue = col & 0xFF;
- SetPixel(grwindow.tempDC,j, i, RGB(red, green, blue));
+ SetPixel(grwindow.tempDC,j, i,
+ RGB(red, green, blue));
}
}
}
@@ -579,8 +583,9 @@ CAMLprim value caml_gr_make_image(value matrix)
oldBmp = SelectObject(grwindow.tempDC,Mask(img));
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
- int col = Long_val (Field (Field (matrix, i), j));
- SetPixel(grwindow.tempDC,j, i, col == -1 ? 0xFFFFFF : 0);
+ int col = Long_val (Field (Field (matrix,i),j));
+ SetPixel(grwindow.tempDC,j, i,
+ col == -1 ? 0xFFFFFF : 0);
}
}
SelectObject(grwindow.tempDC,oldBmp);
diff --git a/otherlibs/win32graph/open.c b/otherlibs/win32graph/open.c
index e9d10cad00..8d17298bd7 100644
--- a/otherlibs/win32graph/open.c
+++ b/otherlibs/win32graph/open.c
@@ -74,7 +74,8 @@ void ResetForClose(HWND hwnd)
-static LRESULT CALLBACK GraphicsWndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
+static LRESULT CALLBACK GraphicsWndProc(HWND hwnd,UINT msg,WPARAM wParam,
+ LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
@@ -91,7 +92,8 @@ static LRESULT CALLBACK GraphicsWndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
break;
// Move the child windows
case WM_SIZE:
- // Position the MDI client window between the tool and status bars
+ // Position the MDI client window between the tool and
+ // status bars
if (wParam != SIZE_MINIMIZED) {
SetCoordinates(hwnd);
}
@@ -135,7 +137,8 @@ static value gr_reset(void)
grwindow.width = rc.right;
grwindow.height = rc.bottom;
if (grwindow.gcBitmap == (HDC)0) {
- grwindow.hBitmap = CreateCompatibleBitmap(grwindow.gc,screenx,screeny);
+ grwindow.hBitmap = CreateCompatibleBitmap(grwindow.gc,screenx,
+ screeny);
grwindow.gcBitmap = CreateCompatibleDC(grwindow.gc);
grwindow.tempDC = CreateCompatibleDC(grwindow.gc);
SelectObject(grwindow.gcBitmap,grwindow.hBitmap);
@@ -149,10 +152,12 @@ static value gr_reset(void)
grwindow.CurrentColor = GetSysColor(COLOR_WINDOWTEXT);
grwindow.grx = 0;
grwindow.gry = 0;
- grwindow.CurrentPen = SelectObject(grwindow.gc,GetStockObject(WHITE_PEN));
+ grwindow.CurrentPen = SelectObject(grwindow.gc,
+ GetStockObject(WHITE_PEN));
SelectObject(grwindow.gc,grwindow.CurrentPen);
SelectObject(grwindow.gcBitmap,grwindow.CurrentPen);
- grwindow.CurrentBrush = SelectObject(grwindow.gc,GetStockObject(WHITE_BRUSH));
+ grwindow.CurrentBrush = SelectObject(grwindow.gc,
+ GetStockObject(WHITE_BRUSH));
SelectObject(grwindow.gc,grwindow.CurrentBrush);
SelectObject(grwindow.gcBitmap,grwindow.CurrentBrush);
caml_gr_set_color(Val_long(0));
@@ -353,7 +358,8 @@ void gr_fail(char *fmt, char *arg)
if (graphic_failure_exn == NULL) {
graphic_failure_exn = caml_named_value("Graphics.Graphic_failure");
if (graphic_failure_exn == NULL)
- invalid_argument("Exception Graphics.Graphic_failure not initialized, must link graphics.cma");
+ invalid_argument("Exception Graphics.Graphic_failure not initialized, "
+ "must link graphics.cma");
}
sprintf(buffer, fmt, arg);
raise_with_string(*graphic_failure_exn, buffer);
diff --git a/otherlibs/win32unix/select.c b/otherlibs/win32unix/select.c
index 0e21db897e..826ad172ad 100644
--- a/otherlibs/win32unix/select.c
+++ b/otherlibs/win32unix/select.c
@@ -152,7 +152,8 @@ typedef SELECTQUERY *LPSELECTQUERY;
typedef struct _SELECTDATA {
LIST lst;
SELECTTYPE EType;
- /* Sockets may generate a result for all three lists from one single query object
+ /* Sockets may generate a result for all three lists from one single
+ query object
*/
SELECTRESULT aResults[MAXIMUM_SELECT_OBJECTS * 3];
DWORD nResultsCount;
@@ -231,7 +232,8 @@ void select_data_free (LPSELECTDATA lpSelectData)
}
/* Add a result to select data, return zero if something goes wrong. */
-DWORD select_data_result_add (LPSELECTDATA lpSelectData, SELECTMODE EMode, int lpOrigIdx)
+DWORD select_data_result_add (LPSELECTDATA lpSelectData, SELECTMODE EMode,
+ int lpOrigIdx)
{
DWORD res;
DWORD i;
@@ -278,7 +280,8 @@ DWORD select_data_query_add (LPSELECTDATA lpSelectData,
* If none is found, create a new one. Return the corresponding SELECTDATA, and
* update provided SELECTDATA head, if required.
*/
-LPSELECTDATA select_data_job_search (LPSELECTDATA *lppSelectData, SELECTTYPE EType)
+LPSELECTDATA select_data_job_search (LPSELECTDATA *lppSelectData,
+ SELECTTYPE EType)
{
LPSELECTDATA res;
@@ -335,13 +338,16 @@ void read_console_poll(HANDLE hStop, void *_data)
while (lpSelectData->EState == SELECT_STATE_NONE)
{
waitRes = WaitForMultipleObjects(2, events, FALSE, INFINITE);
- if (waitRes == WAIT_OBJECT_0 || check_error(lpSelectData, waitRes == WAIT_FAILED))
+ if (waitRes == WAIT_OBJECT_0
+ || check_error(lpSelectData, waitRes == WAIT_FAILED))
{
/* stop worker event or error */
break;
}
/* console event */
- if (check_error(lpSelectData, PeekConsoleInput(lpQuery->hFileDescr, &record, 1, &n) == 0))
+ if (check_error(lpSelectData, PeekConsoleInput(lpQuery->hFileDescr,
+ &record, 1, &n)
+ == 0))
{
break;
}
@@ -357,7 +363,9 @@ void read_console_poll(HANDLE hStop, void *_data)
else
{
/* discard everything else and try again */
- if (check_error(lpSelectData, ReadConsoleInput(lpQuery->hFileDescr, &record, 1, &n) == 0))
+ if (check_error(lpSelectData, ReadConsoleInput(lpQuery->hFileDescr,
+ &record, 1, &n)
+ == 0))
{
break;
}
@@ -425,7 +433,8 @@ void read_pipe_poll (HANDLE hStop, void *_data)
if ((n > 0) || (res == 0))
{
lpSelectData->EState = SELECT_STATE_SIGNALED;
- select_data_result_add(lpSelectData, iterQuery->EMode, iterQuery->lpOrigIdx);
+ select_data_result_add(lpSelectData, iterQuery->EMode,
+ iterQuery->lpOrigIdx);
};
};
@@ -445,7 +454,8 @@ void read_pipe_poll (HANDLE hStop, void *_data)
{
wait = 10;
};
- if (event == WAIT_OBJECT_0 || check_error(lpSelectData, event == WAIT_FAILED))
+ if (event == WAIT_OBJECT_0
+ || check_error(lpSelectData, event == WAIT_FAILED))
{
break;
}
@@ -554,19 +564,28 @@ void socket_poll (HANDLE hStop, void *_data)
{
/* Find out what kind of events were raised
*/
- if (WSAEnumNetworkEvents((SOCKET)(iterQuery->hFileDescr), aEvents[i], &events) == 0)
+ if (WSAEnumNetworkEvents((SOCKET)(iterQuery->hFileDescr),
+ aEvents[i], &events) == 0)
{
- if ((iterQuery->EMode & SELECT_MODE_READ) != 0 && (events.lNetworkEvents & (FD_READ | FD_ACCEPT | FD_CLOSE)) != 0)
+ if ((iterQuery->EMode & SELECT_MODE_READ) != 0
+ && (events.lNetworkEvents & (FD_READ | FD_ACCEPT | FD_CLOSE))
+ != 0)
{
- select_data_result_add(lpSelectData, SELECT_MODE_READ, iterQuery->lpOrigIdx);
+ select_data_result_add(lpSelectData, SELECT_MODE_READ,
+ iterQuery->lpOrigIdx);
}
- if ((iterQuery->EMode & SELECT_MODE_WRITE) != 0 && (events.lNetworkEvents & (FD_WRITE | FD_CONNECT | FD_CLOSE)) != 0)
+ if ((iterQuery->EMode & SELECT_MODE_WRITE) != 0
+ && (events.lNetworkEvents & (FD_WRITE | FD_CONNECT | FD_CLOSE))
+ != 0)
{
- select_data_result_add(lpSelectData, SELECT_MODE_WRITE, iterQuery->lpOrigIdx);
+ select_data_result_add(lpSelectData, SELECT_MODE_WRITE,
+ iterQuery->lpOrigIdx);
}
- if ((iterQuery->EMode & SELECT_MODE_EXCEPT) != 0 && (events.lNetworkEvents & FD_OOB) != 0)
+ if ((iterQuery->EMode & SELECT_MODE_EXCEPT) != 0
+ && (events.lNetworkEvents & FD_OOB) != 0)
{
- select_data_result_add(lpSelectData, SELECT_MODE_EXCEPT, iterQuery->lpOrigIdx);
+ select_data_result_add(lpSelectData, SELECT_MODE_EXCEPT,
+ iterQuery->lpOrigIdx);
}
}
}
@@ -612,13 +631,15 @@ LPSELECTDATA socket_poll_add (LPSELECTDATA lpSelectData,
/* Polling socket can be done mulitple handle at the same time. You just
need one worker to use it. Try to find if there is already a worker
handling this kind of request.
- Only one event can be associated with a given socket which means that if a socket
- is in more than one of the fd_sets then we have to find that particular query and update
- EMode with the additional flag.
+ Only one event can be associated with a given socket which means
+ that if a socket is in more than one of the fd_sets then we have
+ to find that particular query and update EMode with the
+ additional flag.
*/
DEBUG_PRINT("Scanning list of worker to find one that already handle socket");
/* Search for job */
- DEBUG_PRINT("Searching for an available job for type %d for descriptor %d", SELECT_TYPE_SOCKET, hFileDescr);
+ DEBUG_PRINT("Searching for an available job for type %d for descriptor %d",
+ SELECT_TYPE_SOCKET, hFileDescr);
while (res != NULL)
{
if (res->EType == SELECT_TYPE_SOCKET)
@@ -629,7 +650,8 @@ LPSELECTDATA socket_poll_add (LPSELECTDATA lpSelectData,
{
i--;
}
- /* If we didn't find the socket but this worker has available slots, store it
+ /* If we didn't find the socket but this worker has available
+ slots, store it
*/
if (i < 0)
{
@@ -748,7 +770,8 @@ static SELECTHANDLETYPE get_handle_type(value fd)
};
break;
- case FILE_TYPE_PIPE: /* a named or an anonymous pipe (socket already handled) */
+ case FILE_TYPE_PIPE: /* a named or an anonymous pipe (socket
+ already handled) */
res = SELECT_HANDLE_PIPE;
break;
};
@@ -758,7 +781,8 @@ static SELECTHANDLETYPE get_handle_type(value fd)
}
/* Choose what to do with given data */
-LPSELECTDATA select_data_dispatch (LPSELECTDATA lpSelectData, SELECTMODE EMode, value fd, int lpOrigIdx)
+LPSELECTDATA select_data_dispatch (LPSELECTDATA lpSelectData, SELECTMODE EMode,
+ value fd, int lpOrigIdx)
{
LPSELECTDATA res;
HANDLE hFileDescr;
@@ -799,7 +823,8 @@ LPSELECTDATA select_data_dispatch (LPSELECTDATA lpSelectData, SELECTMODE EMode,
/* Console is always ready in write operation, need to check for read. */
if (EMode == SELECT_MODE_READ)
{
- res = read_console_poll_add(res, EMode, hFileDescr, lpOrigIdx, uFlagsFd);
+ res = read_console_poll_add(res, EMode, hFileDescr, lpOrigIdx,
+ uFlagsFd);
}
else if (EMode == SELECT_MODE_WRITE)
{
@@ -817,7 +842,8 @@ LPSELECTDATA select_data_dispatch (LPSELECTDATA lpSelectData, SELECTMODE EMode,
}
else if (EMode == SELECT_MODE_WRITE)
{
- DEBUG_PRINT("No need to check availability of data on pipe, write operation always possible");
+ DEBUG_PRINT("No need to check availability of data on pipe, "
+ "write operation always possible");
res = static_poll_add(res, EMode, hFileDescr, lpOrigIdx, uFlagsFd);
};
break;
@@ -868,7 +894,8 @@ static DWORD caml_list_length (value lst)
CAMLreturnT(DWORD, res);
}
-static value find_handle(LPSELECTRESULT iterResult, value readfds, value writefds, value exceptfds)
+static value find_handle(LPSELECTRESULT iterResult, value readfds,
+ value writefds, value exceptfds)
{
CAMLparam3(readfds, writefds, exceptfds);
CAMLlocal2(result, list);
@@ -902,8 +929,9 @@ static value find_handle(LPSELECTRESULT iterResult, value readfds, value writefd
#define MAX(a, b) ((a) > (b) ? (a) : (b))
-/* Convert fdlist to an fd_set if all the handles in fdlist are sockets and return 0.
- * Returns 1 if a non-socket value is encountered.
+/* Convert fdlist to an fd_set if all the handles in fdlist are
+ * sockets and return 0. Returns 1 if a non-socket value is
+ * encountered.
*/
static int fdlist_to_fdset(value fdlist, fd_set *fdset)
{
@@ -938,7 +966,8 @@ static value fdset_to_fdlist(value fdlist, fd_set *fdset)
return res;
}
-CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value timeout)
+CAMLprim value unix_select(value readfds, value writefds, value exceptfds,
+ value timeout)
{
/* Event associated to handle */
DWORD nEventsCount;
@@ -990,7 +1019,9 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
err = 0;
tm = Double_val(timeout);
- if (readfds == Val_int(0) && writefds == Val_int(0) && exceptfds == Val_int(0)) {
+ if (readfds == Val_int(0)
+ && writefds == Val_int(0)
+ && exceptfds == Val_int(0)) {
DEBUG_PRINT("nothing to do");
if ( tm > 0.0 ) {
enter_blocking_section();
@@ -999,7 +1030,9 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
}
read_list = write_list = except_list = Val_int(0);
} else {
- if (fdlist_to_fdset(readfds, &read) && fdlist_to_fdset(writefds, &write) && fdlist_to_fdset(exceptfds, &except)) {
+ if (fdlist_to_fdset(readfds, &read)
+ && fdlist_to_fdset(writefds, &write)
+ && fdlist_to_fdset(exceptfds, &except)) {
DEBUG_PRINT("only sockets to select on, using classic select");
if (tm < 0.0) {
tvp = (struct timeval *) NULL;
@@ -1049,7 +1082,8 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
}
- /* Create list of select data, based on the different list of fd to watch */
+ /* Create list of select data, based on the different list of fd
+ to watch */
DEBUG_PRINT("Dispatch read fd");
handle_set_init(&hds, hdsData, hdsMax);
i=0;
@@ -1059,11 +1093,13 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
if (!handle_set_mem(&hds, Handle_val(fd)))
{
handle_set_add(&hds, Handle_val(fd));
- lpSelectData = select_data_dispatch(lpSelectData, SELECT_MODE_READ, fd, i++);
+ lpSelectData = select_data_dispatch(lpSelectData,
+ SELECT_MODE_READ, fd, i++);
}
else
{
- DEBUG_PRINT("Discarding handle %x which is already monitor for read", Handle_val(fd));
+ DEBUG_PRINT("Discarding handle %x which is already monitor "
+ "for read", Handle_val(fd));
}
}
handle_set_reset(&hds);
@@ -1077,11 +1113,13 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
if (!handle_set_mem(&hds, Handle_val(fd)))
{
handle_set_add(&hds, Handle_val(fd));
- lpSelectData = select_data_dispatch(lpSelectData, SELECT_MODE_WRITE, fd, i++);
+ lpSelectData = select_data_dispatch(lpSelectData,
+ SELECT_MODE_WRITE, fd, i++);
}
else
{
- DEBUG_PRINT("Discarding handle %x which is already monitor for write", Handle_val(fd));
+ DEBUG_PRINT("Discarding handle %x which is already monitor "
+ "for write", Handle_val(fd));
}
}
handle_set_reset(&hds);
@@ -1095,11 +1133,13 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
if (!handle_set_mem(&hds, Handle_val(fd)))
{
handle_set_add(&hds, Handle_val(fd));
- lpSelectData = select_data_dispatch(lpSelectData, SELECT_MODE_EXCEPT, fd, i++);
+ lpSelectData = select_data_dispatch(lpSelectData,
+ SELECT_MODE_EXCEPT, fd, i++);
}
else
{
- DEBUG_PRINT("Discarding handle %x which is already monitor for exceptional", Handle_val(fd));
+ DEBUG_PRINT("Discarding handle %x which is already monitor "
+ "for exceptional", Handle_val(fd));
}
}
handle_set_reset(&hds);
@@ -1130,8 +1170,10 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
worker_job_submit(
iterSelectData->funcWorker,
(void *)iterSelectData);
- DEBUG_PRINT("Job submitted to worker %x", iterSelectData->lpWorker);
- lpEventsDone[nEventsCount] = worker_job_event_done(iterSelectData->lpWorker);
+ DEBUG_PRINT("Job submitted to worker %x",
+ iterSelectData->lpWorker);
+ lpEventsDone[nEventsCount]
+ = worker_job_event_done(iterSelectData->lpWorker);
nEventsCount++;
};
iterSelectData = LIST_NEXT(LPSELECTDATA, iterSelectData);
@@ -1148,7 +1190,8 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
if (err == 0 && !hasStaticData)
{
DEBUG_PRINT("Waiting for one select worker to be done");
- switch (WaitForMultipleObjects(nEventsCount, lpEventsDone, FALSE, milliseconds))
+ switch (WaitForMultipleObjects(nEventsCount, lpEventsDone, FALSE,
+ milliseconds))
{
case WAIT_FAILED:
err = GetLastError();
@@ -1177,7 +1220,8 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
};
DEBUG_PRINT("Waiting for every select worker to be done");
- switch (WaitForMultipleObjects(nEventsCount, lpEventsDone, TRUE, INFINITE))
+ switch (WaitForMultipleObjects(nEventsCount, lpEventsDone, TRUE,
+ INFINITE))
{
case WAIT_FAILED:
err = GetLastError();
@@ -1211,7 +1255,8 @@ CAMLprim value unix_select(value readfds, value writefds, value exceptfds, value
{
iterResult = &(iterSelectData->aResults[i]);
l = alloc_small(2, 0);
- Store_field(l, 0, find_handle(iterResult, readfds, writefds, exceptfds));
+ Store_field(l, 0, find_handle(iterResult, readfds, writefds,
+ exceptfds));
switch (iterResult->EMode)
{
case SELECT_MODE_READ:
diff --git a/parsing/ast_helper.ml b/parsing/ast_helper.ml
index db3b029a86..7a01f101e8 100644
--- a/parsing/ast_helper.ml
+++ b/parsing/ast_helper.ml
@@ -480,4 +480,3 @@ module Cstr = struct
pcstr_fields = fields;
}
end
-
diff --git a/parsing/ast_helper.mli b/parsing/ast_helper.mli
index 2bdfd13c39..72bffcee7b 100644
--- a/parsing/ast_helper.mli
+++ b/parsing/ast_helper.mli
@@ -95,8 +95,8 @@ module Exp:
val constant: ?loc:loc -> ?attrs:attrs -> constant -> expression
val let_: ?loc:loc -> ?attrs:attrs -> rec_flag -> value_binding list
-> expression -> expression
- val fun_: ?loc:loc -> ?attrs:attrs -> arg_label -> expression option -> pattern
- -> expression -> expression
+ val fun_: ?loc:loc -> ?attrs:attrs -> arg_label -> expression option
+ -> pattern -> expression -> expression
val function_: ?loc:loc -> ?attrs:attrs -> case list -> expression
val apply: ?loc:loc -> ?attrs:attrs -> expression
-> (arg_label * expression) list -> expression
@@ -135,11 +135,13 @@ module Exp:
-> expression
val assert_: ?loc:loc -> ?attrs:attrs -> expression -> expression
val lazy_: ?loc:loc -> ?attrs:attrs -> expression -> expression
- val poly: ?loc:loc -> ?attrs:attrs -> expression -> core_type option -> expression
+ val poly: ?loc:loc -> ?attrs:attrs -> expression -> core_type option
+ -> expression
val object_: ?loc:loc -> ?attrs:attrs -> class_structure -> expression
val newtype: ?loc:loc -> ?attrs:attrs -> string -> expression -> expression
val pack: ?loc:loc -> ?attrs:attrs -> module_expr -> expression
- val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> expression -> expression
+ val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> expression
+ -> expression
val extension: ?loc:loc -> ?attrs:attrs -> extension -> expression
val case: pattern -> ?guard:expression -> expression -> case
@@ -156,12 +158,14 @@ module Val:
module Type:
sig
val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?text:text ->
- ?params:(core_type * variance) list -> ?cstrs:(core_type * core_type * loc) list ->
+ ?params:(core_type * variance) list ->
+ ?cstrs:(core_type * core_type * loc) list ->
?kind:type_kind -> ?priv:private_flag -> ?manifest:core_type -> str ->
type_declaration
val constructor: ?loc:loc -> ?attrs:attrs -> ?info:info ->
- ?args:constructor_arguments -> ?res:core_type -> str -> constructor_declaration
+ ?args:constructor_arguments -> ?res:core_type -> str ->
+ constructor_declaration
val field: ?loc:loc -> ?attrs:attrs -> ?info:info ->
?mut:mutable_flag -> str -> core_type -> label_declaration
end
@@ -177,7 +181,8 @@ module Te:
str -> extension_constructor_kind -> extension_constructor
val decl: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?info:info ->
- ?args:constructor_arguments -> ?res:core_type -> str -> extension_constructor
+ ?args:constructor_arguments -> ?res:core_type -> str ->
+ extension_constructor
val rebind: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?info:info ->
str -> lid -> extension_constructor
end
@@ -195,7 +200,8 @@ module Mty:
val signature: ?loc:loc -> ?attrs:attrs -> signature -> module_type
val functor_: ?loc:loc -> ?attrs:attrs ->
str -> module_type option -> module_type -> module_type
- val with_: ?loc:loc -> ?attrs:attrs -> module_type -> with_constraint list -> module_type
+ val with_: ?loc:loc -> ?attrs:attrs -> module_type ->
+ with_constraint list -> module_type
val typeof_: ?loc:loc -> ?attrs:attrs -> module_expr -> module_type
val extension: ?loc:loc -> ?attrs:attrs -> extension -> module_type
end
@@ -210,8 +216,10 @@ module Mod:
val structure: ?loc:loc -> ?attrs:attrs -> structure -> module_expr
val functor_: ?loc:loc -> ?attrs:attrs ->
str -> module_type option -> module_expr -> module_expr
- val apply: ?loc:loc -> ?attrs:attrs -> module_expr -> module_expr -> module_expr
- val constraint_: ?loc:loc -> ?attrs:attrs -> module_expr -> module_type -> module_expr
+ val apply: ?loc:loc -> ?attrs:attrs -> module_expr -> module_expr ->
+ module_expr
+ val constraint_: ?loc:loc -> ?attrs:attrs -> module_expr -> module_type ->
+ module_expr
val unpack: ?loc:loc -> ?attrs:attrs -> expression -> module_expr
val extension: ?loc:loc -> ?attrs:attrs -> extension -> module_expr
end
@@ -313,7 +321,8 @@ module Cty:
val constr: ?loc:loc -> ?attrs:attrs -> lid -> core_type list -> class_type
val signature: ?loc:loc -> ?attrs:attrs -> class_signature -> class_type
- val arrow: ?loc:loc -> ?attrs:attrs -> arg_label -> core_type -> class_type -> class_type
+ val arrow: ?loc:loc -> ?attrs:attrs -> arg_label -> core_type ->
+ class_type -> class_type
val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_type
end
@@ -325,9 +334,12 @@ module Ctf:
val attr: class_type_field -> attribute -> class_type_field
val inherit_: ?loc:loc -> ?attrs:attrs -> class_type -> class_type_field
- val val_: ?loc:loc -> ?attrs:attrs -> string -> mutable_flag -> virtual_flag -> core_type -> class_type_field
- val method_: ?loc:loc -> ?attrs:attrs -> string -> private_flag -> virtual_flag -> core_type -> class_type_field
- val constraint_: ?loc:loc -> ?attrs:attrs -> core_type -> core_type -> class_type_field
+ val val_: ?loc:loc -> ?attrs:attrs -> string -> mutable_flag ->
+ virtual_flag -> core_type -> class_type_field
+ val method_: ?loc:loc -> ?attrs:attrs -> string -> private_flag ->
+ virtual_flag -> core_type -> class_type_field
+ val constraint_: ?loc:loc -> ?attrs:attrs -> core_type -> core_type ->
+ class_type_field
val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_type_field
val attribute: ?loc:loc -> attribute -> class_type_field
val text: text -> class_type_field list
@@ -341,26 +353,32 @@ module Cl:
val constr: ?loc:loc -> ?attrs:attrs -> lid -> core_type list -> class_expr
val structure: ?loc:loc -> ?attrs:attrs -> class_structure -> class_expr
- val fun_: ?loc:loc -> ?attrs:attrs -> arg_label -> expression option -> pattern ->
- class_expr -> class_expr
- val apply:
- ?loc:loc -> ?attrs:attrs -> class_expr -> (arg_label * expression) list -> class_expr
- val let_:
- ?loc:loc -> ?attrs:attrs -> rec_flag -> value_binding list -> class_expr -> class_expr
- val constraint_: ?loc:loc -> ?attrs:attrs -> class_expr -> class_type -> class_expr
+ val fun_: ?loc:loc -> ?attrs:attrs -> arg_label -> expression option ->
+ pattern -> class_expr -> class_expr
+ val apply: ?loc:loc -> ?attrs:attrs -> class_expr ->
+ (arg_label * expression) list -> class_expr
+ val let_: ?loc:loc -> ?attrs:attrs -> rec_flag -> value_binding list ->
+ class_expr -> class_expr
+ val constraint_: ?loc:loc -> ?attrs:attrs -> class_expr -> class_type ->
+ class_expr
val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_expr
end
(** Class fields *)
module Cf:
sig
- val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> class_field_desc -> class_field
+ val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> class_field_desc ->
+ class_field
val attr: class_field -> attribute -> class_field
- val inherit_: ?loc:loc -> ?attrs:attrs -> override_flag -> class_expr -> string option -> class_field
- val val_: ?loc:loc -> ?attrs:attrs -> str -> mutable_flag -> class_field_kind -> class_field
- val method_: ?loc:loc -> ?attrs:attrs -> str -> private_flag -> class_field_kind -> class_field
- val constraint_: ?loc:loc -> ?attrs:attrs -> core_type -> core_type -> class_field
+ val inherit_: ?loc:loc -> ?attrs:attrs -> override_flag -> class_expr ->
+ string option -> class_field
+ val val_: ?loc:loc -> ?attrs:attrs -> str -> mutable_flag ->
+ class_field_kind -> class_field
+ val method_: ?loc:loc -> ?attrs:attrs -> str -> private_flag ->
+ class_field_kind -> class_field
+ val constraint_: ?loc:loc -> ?attrs:attrs -> core_type -> core_type ->
+ class_field
val initializer_: ?loc:loc -> ?attrs:attrs -> expression -> class_field
val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_field
val attribute: ?loc:loc -> attribute -> class_field
diff --git a/parsing/ast_mapper.ml b/parsing/ast_mapper.ml
index 945375525b..493d11ff84 100644
--- a/parsing/ast_mapper.ml
+++ b/parsing/ast_mapper.ml
@@ -715,20 +715,18 @@ module PpxContext = struct
let field name payload =
let rec get_string = function
| { pexp_desc = Pexp_constant (Const_string (str, None)) } -> str
- | _ ->
- raise_errorf
- "Internal error: invalid [@@@ocaml.ppx.context { %s }] string syntax"
- name
+ | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \
+ { %s }] string syntax" name
and get_bool pexp =
match pexp with
- | {pexp_desc = Pexp_construct ({txt = Longident.Lident "true"}, None)} ->
+ | {pexp_desc = Pexp_construct ({txt = Longident.Lident "true"},
+ None)} ->
true
- | {pexp_desc = Pexp_construct ({txt = Longident.Lident "false"}, None)} ->
+ | {pexp_desc = Pexp_construct ({txt = Longident.Lident "false"},
+ None)} ->
false
- | _ ->
- raise_errorf
- "Internal error: invalid [@@@ocaml.ppx.context { %s }] bool syntax"
- name
+ | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \
+ { %s }] bool syntax" name
and get_list elem = function
| {pexp_desc =
Pexp_construct ({txt = Longident.Lident "::"},
@@ -737,17 +735,13 @@ module PpxContext = struct
| {pexp_desc =
Pexp_construct ({txt = Longident.Lident "[]"}, None)} ->
[]
- | _ ->
- raise_errorf
- "Internal error: invalid [@@@ocaml.ppx.context { %s }] list syntax"
- name
+ | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \
+ { %s }] list syntax" name
and get_pair f1 f2 = function
| {pexp_desc = Pexp_tuple [e1; e2]} ->
(f1 e1, f2 e2)
- | _ ->
- raise_errorf
- "Internal error: invalid [@@@ocaml.ppx.context { %s }] pair syntax"
- name
+ | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \
+ { %s }] pair syntax" name
and get_option elem = function
| { pexp_desc =
Pexp_construct ({ txt = Longident.Lident "Some" }, Some exp) } ->
@@ -755,10 +749,8 @@ module PpxContext = struct
| { pexp_desc =
Pexp_construct ({ txt = Longident.Lident "None" }, None) } ->
None
- | _ ->
- raise_errorf
- "Internal error: invalid [@@@ocaml.ppx.context { %s }] option syntax"
- name
+ | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \
+ { %s }] option syntax" name
in
match name with
| "tool_name" ->
diff --git a/parsing/ast_mapper.mli b/parsing/ast_mapper.mli
index d48971d589..2dc301fb09 100644
--- a/parsing/ast_mapper.mli
+++ b/parsing/ast_mapper.mli
@@ -166,21 +166,25 @@ val attribute_of_warning: Location.t -> string -> attribute
(** {2 Helper functions to call external mappers} *)
-val add_ppx_context_str: tool_name:string -> Parsetree.structure -> Parsetree.structure
+val add_ppx_context_str:
+ tool_name:string -> Parsetree.structure -> Parsetree.structure
(** Extract information from the current environment and encode it
into an attribute which is prepended to the list of structure
items in order to pass the information to an external
processor. *)
-val add_ppx_context_sig: tool_name:string -> Parsetree.signature -> Parsetree.signature
+val add_ppx_context_sig:
+ tool_name:string -> Parsetree.signature -> Parsetree.signature
(** Same as [add_ppx_context_str], but for signatures. *)
-val drop_ppx_context_str: restore:bool -> Parsetree.structure -> Parsetree.structure
+val drop_ppx_context_str:
+ restore:bool -> Parsetree.structure -> Parsetree.structure
(** Drop the ocaml.ppx.context attribute from a structure. If
[restore] is true, also restore the associated data in the current
process. *)
-val drop_ppx_context_sig: restore:bool -> Parsetree.signature -> Parsetree.signature
+val drop_ppx_context_sig:
+ restore:bool -> Parsetree.signature -> Parsetree.signature
(** Same as [drop_ppx_context_str], but for signatures. *)
(** {2 Cookies} *)
diff --git a/parsing/docstrings.ml b/parsing/docstrings.ml
index 389f6cf75c..acb035c54b 100644
--- a/parsing/docstrings.ml
+++ b/parsing/docstrings.ml
@@ -339,6 +339,3 @@ let init () =
Hashtbl.reset floating_table;
Hashtbl.reset pre_extra_table;
Hashtbl.reset post_extra_table
-
-
-
diff --git a/parsing/lexer.mll b/parsing/lexer.mll
index e77f0847e6..b3ea52bdaf 100644
--- a/parsing/lexer.mll
+++ b/parsing/lexer.mll
@@ -372,7 +372,8 @@ rule token = parse
with Failure _ ->
raise (Error(Literal_overflow "nativeint", Location.curr lexbuf)) }
| (float_literal | int_literal) identchar+
- { raise (Error(Invalid_literal (Lexing.lexeme lexbuf), Location.curr lexbuf)) }
+ { raise (Error(Invalid_literal (Lexing.lexeme lexbuf),
+ Location.curr lexbuf)) }
| "\""
{ reset_string_buffer();
is_in_string := true;
diff --git a/parsing/location.ml b/parsing/location.ml
index ec85cf233c..57a5179ee3 100644
--- a/parsing/location.ml
+++ b/parsing/location.ml
@@ -389,8 +389,7 @@ let rec default_error_reporter ppf ({loc; msg; sub; if_highlight} as err) =
else begin
print ppf loc;
Format.pp_print_string ppf msg;
- List.iter (fun err -> Format.fprintf ppf "@\n@[<2>%a@]" default_error_reporter err)
- sub
+ List.iter (Format.fprintf ppf "@\n@[<2>%a@]" default_error_reporter) sub
end
let error_reporter = ref default_error_reporter
diff --git a/parsing/parser.mly b/parsing/parser.mly
index 458d75195c..1cc2dea085 100644
--- a/parsing/parser.mly
+++ b/parsing/parser.mly
@@ -205,10 +205,12 @@ let bigarray_set arr arg newval =
[Nolabel, arr; Nolabel, c1; Nolabel, newval]))
| [c1;c2] ->
mkexp(Pexp_apply(ghexp(Pexp_ident(set 2)),
- [Nolabel, arr; Nolabel, c1; Nolabel, c2; Nolabel, newval]))
+ [Nolabel, arr; Nolabel, c1; Nolabel, c2;
+ Nolabel, newval]))
| [c1;c2;c3] ->
mkexp(Pexp_apply(ghexp(Pexp_ident(set 3)),
- [Nolabel, arr; Nolabel, c1; Nolabel, c2; Nolabel, c3; Nolabel, newval]))
+ [Nolabel, arr; Nolabel, c1; Nolabel, c2; Nolabel, c3;
+ Nolabel, newval]))
| coords ->
mkexp(Pexp_apply(ghexp(Pexp_ident(set 0)),
[Nolabel, arr;
@@ -1373,7 +1375,7 @@ simple_expr:
{ mkexp(Pexp_open(Fresh, mkrhs $1 1, $4)) }
| mod_longident DOT LPAREN RPAREN
{ mkexp(Pexp_open(Fresh, mkrhs $1 1,
- mkexp(Pexp_construct(mkrhs (Lident "()") 1, None)))) }
+ mkexp(Pexp_construct(mkrhs (Lident "()") 1, None)))) }
| mod_longident DOT LPAREN seq_expr error
{ unclosed "(" 3 ")" 5 }
| simple_expr DOT LPAREN seq_expr RPAREN
@@ -1952,7 +1954,8 @@ with_constraints:
| with_constraints AND with_constraint { $3 :: $1 }
;
with_constraint:
- TYPE type_parameters label_longident with_type_binder core_type_no_attr constraints
+ TYPE type_parameters label_longident with_type_binder core_type_no_attr
+ constraints
{ Pwith_type
(mkrhs $3 3,
(Type.mk (mkrhs (Longident.last $3) 3)
@@ -2215,7 +2218,7 @@ index_operator_core:
;
opt_assign_arrow:
- { "" }
+ { "" }
| LESSMINUS { "<-" }
;
diff --git a/parsing/pprintast.ml b/parsing/pprintast.ml
index 3ffbbb546a..05ac854b6a 100644
--- a/parsing/pprintast.ml
+++ b/parsing/pprintast.ml
@@ -341,14 +341,15 @@ class printer ()= object(self:'self)
Ppat_construct
({ txt = Lident("::") ;_},
Some ({ppat_desc = Ppat_tuple([pat1; pat2]);_})); _}
- ->
- pp f "%a::%a" self#simple_pattern pat1 pattern_list_helper pat2 (*RA*)
+ -> pp f "%a::%a" self#simple_pattern pat1 pattern_list_helper pat2
+ (*RA*)
| p -> self#pattern1 f p in
if x.ppat_attributes <> [] then self#pattern f x
else match x.ppat_desc with
| Ppat_variant (l, Some p) -> pp f "@[<2>`%s@;%a@]" l self#simple_pattern p
| Ppat_construct (({txt=Lident("()"|"[]");_}), _) -> self#simple_pattern f x
- | Ppat_construct (({txt;_} as li), po) -> (* FIXME The third field always false *)
+ | Ppat_construct (({txt;_} as li), po) ->
+ (* FIXME The third field always false *)
if txt = Lident "::" then
pp f "%a" pattern_list_helper x
else
@@ -383,7 +384,8 @@ class printer ()= object(self:'self)
| _ ->
pp f "@[<2>{@;%a;_}@]"
(self#list longident_x_pattern ~sep:";@;") l)
- | Ppat_tuple l -> pp f "@[<1>(%a)@]" (self#list ~sep:"," self#pattern1) l (* level1*)
+ | Ppat_tuple l -> pp f "@[<1>(%a)@]" (self#list ~sep:"," self#pattern1) l
+ (* level1*)
| Ppat_constant (c) -> pp f "%a" self#constant c
| Ppat_interval (c1, c2) -> pp f "%a..%a" self#constant c1 self#constant c2
| Ppat_variant (l,None) -> pp f "`%s" l
@@ -399,7 +401,8 @@ class printer ()= object(self:'self)
method label_exp f (l,opt,p) =
match l with
| Nolabel ->
- pp f "%a@ " self#simple_pattern p (*single case pattern parens needed here *)
+ pp f "%a@ " self#simple_pattern p
+ (*single case pattern parens needed here *)
| Optional rest ->
begin match p.ppat_desc with
| Ppat_var {txt;_} when txt = rest ->
@@ -526,13 +529,16 @@ class printer ()= object(self:'self)
| Pexp_function l ->
pp f "@[<hv>function%a@]" self#case_list l
| Pexp_match (e, l) ->
- pp f "@[<hv0>@[<hv0>@[<2>match %a@]@ with@]%a@]" self#reset#expression e self#case_list l
+ pp f "@[<hv0>@[<hv0>@[<2>match %a@]@ with@]%a@]" self#reset#expression
+ e self#case_list l
| Pexp_try (e, l) ->
- pp f "@[<0>@[<hv2>try@ %a@]@ @[<0>with%a@]@]" (* "try@;@[<2>%a@]@\nwith@\n%a"*)
+ pp f "@[<0>@[<hv2>try@ %a@]@ @[<0>with%a@]@]"
+ (* "try@;@[<2>%a@]@\nwith@\n%a"*)
self#reset#expression e self#case_list l
| Pexp_let (rf, l, e) ->
- (* pp f "@[<2>let %a%a in@;<1 -2>%a@]" (\*no identation here, a new line*\) *)
+ (* pp f "@[<2>let %a%a in@;<1 -2>%a@]"
+ (*no identation here, a new line*) *)
(* self#rec_flag rf *)
pp f "@[<2>%a in@;<1 -2>%a@]"
self#reset#bindings (rf,l)
@@ -543,23 +549,31 @@ class printer ()= object(self:'self)
| `Infix s ->
(match l with
| [ arg1; arg2 ] ->
- pp f "@[<2>%a@;%s@;%a@]" (* FIXME associativity lable_x_expression_parm*)
- self#reset#label_x_expression_param arg1 s self#label_x_expression_param arg2
+ pp f "@[<2>%a@;%s@;%a@]"
+ (* FIXME associativity lable_x_expression_parm*)
+ self#reset#label_x_expression_param arg1 s
+ self#label_x_expression_param arg2
| _ ->
- pp f "@[<2>%a %a@]" self#simple_expr e (self#list self#label_x_expression_param) l)
+ pp f "@[<2>%a %a@]" self#simple_expr e
+ (self#list self#label_x_expression_param) l)
| `Prefix s ->
let s =
- if List.mem s ["~+";"~-";"~+.";"~-."] then String.sub s 1 (String.length s -1)
- else s in
+ if List.mem s ["~+";"~-";"~+.";"~-."]
+ then String.sub s 1 (String.length s -1)
+ else s
+ in
(match l with
|[v] -> pp f "@[<2>%s@;%a@]" s self#label_x_expression_param v
- | _ -> pp f "@[<2>%s@;%a@]" s (self#list self#label_x_expression_param) l (*FIXME assert false*)
+ | _ -> pp f "@[<2>%s@;%a@]" s
+ (self#list self#label_x_expression_param) l
+ (*FIXME assert false*)
)
| _ ->
pp f "@[<hov2>%a@]" begin fun f (e,l) ->
pp f "%a@ %a" self#expression2 e
- (self#list self#reset#label_x_expression_param) l
- (*reset here only because [function,match,try,sequence] are lower priority*)
+ (self#list self#reset#label_x_expression_param) l
+ (*reset here only because [function,match,try,sequence] are
+ lower priority*)
end (e,l))
| Pexp_construct (li, Some eo)
@@ -571,11 +585,13 @@ class printer ()= object(self:'self)
self#simple_expr eo
| _ -> assert false)
| Pexp_setfield (e1, li, e2) ->
- pp f "@[<2>%a.%a@ <-@ %a@]" self#simple_expr e1 self#longident_loc li self#expression e2;
+ pp f "@[<2>%a.%a@ <-@ %a@]" self#simple_expr e1 self#longident_loc li
+ self#expression e2;
| Pexp_ifthenelse (e1, e2, eo) ->
(* @;@[<2>else@ %a@]@] *)
let fmt:(_,_,_)format ="@[<hv0>@[<2>if@ %a@]@;@[<2>then@ %a@]%a@]" in
- pp f fmt self#under_ifthenelse#expression e1 self#under_ifthenelse#expression e2
+ pp f fmt self#under_ifthenelse#expression e1
+ self#under_ifthenelse#expression e2
(fun f eo -> match eo with
| Some x -> pp f "@;@[<2>else@;%a@]" self#under_semi#expression x
| None -> () (* pp f "()" *)) eo
@@ -603,7 +619,8 @@ class printer ()= object(self:'self)
pp f "@[<hov2>assert@ %a@]" self#simple_expr e
| Pexp_lazy (e) ->
pp f "@[<hov2>lazy@ %a@]" self#simple_expr e
- (* Pexp_poly: impossible but we should print it anyway, rather than assert false *)
+ (* Pexp_poly: impossible but we should print it anyway, rather
+ than assert false *)
| Pexp_poly (e, None) ->
pp f "@[<hov2>!poly!@ %a@]" self#simple_expr e
| Pexp_poly (e, Some ct) ->
@@ -624,7 +641,8 @@ class printer ()= object(self:'self)
method expression2 f x =
if x.pexp_attributes <> [] then self#expression f x
else match x.pexp_desc with
- | Pexp_field (e, li) -> pp f "@[<hov2>%a.%a@]" self#simple_expr e self#longident_loc li
+ | Pexp_field (e, li) ->
+ pp f "@[<hov2>%a.%a@]" self#simple_expr e self#longident_loc li
| Pexp_send (e, s) -> pp f "@[<hov2>%a#%s@]" self#simple_expr e s
| _ -> self#simple_expr f x
@@ -635,7 +653,9 @@ class printer ()= object(self:'self)
(match view_expr x with
| `nil -> pp f "[]"
| `tuple -> pp f "()"
- | `list xs -> pp f "@[<hv0>[%a]@]" (self#list self#under_semi#expression ~sep:";@;") xs
+ | `list xs ->
+ pp f "@[<hv0>[%a]@]"
+ (self#list self#under_semi#expression ~sep:";@;") xs
| `simple x -> self#longident f x
| _ -> assert false)
| Pexp_ident li ->
@@ -654,7 +674,8 @@ class printer ()= object(self:'self)
pp f "(%a : %a)" self#expression e self#core_type ct
| Pexp_coerce (e, cto1, ct) ->
pp f "(%a%a :> %a)" self#expression e
- (self#option self#core_type ~first:" : " ~last:" ") cto1 (* no sep hint*)
+ (self#option self#core_type ~first:" : " ~last:" ")
+ cto1 (* no sep hint*)
self#core_type ct
| Pexp_variant (l, None) -> pp f "`%s" l
| Pexp_record (l, eo) ->
@@ -663,7 +684,9 @@ class printer ()= object(self:'self)
| Pexp_ident {txt;_} when li.txt = txt ->
pp f "@[<hov2>%a@]" self#longident_loc li
| _ ->
- pp f "@[<hov2>%a@;=@;%a@]" self#longident_loc li self#simple_expr e in
+ pp f "@[<hov2>%a@;=@;%a@]" self#longident_loc li self#simple_expr
+ e
+ in
pp f "@[<hv0>@[<hv2>{@;%a%a@]@;}@]"(* "@[<hov2>{%a%a}@]" *)
(self#option ~last:" with@;" self#simple_expr) eo
(self#list longident_x_expression ~sep:";@;") l
@@ -676,7 +699,8 @@ class printer ()= object(self:'self)
| Pexp_for (s, e1, e2, df, e3) ->
let fmt:(_,_,_)format =
"@[<hv0>@[<hv2>@[<2>for %a =@;%a@;%a%a@;do@]@;%a@]@;done@]" in
- pp f fmt self#pattern s self#expression e1 self#direction_flag df self#expression e2 self#expression e3
+ pp f fmt self#pattern s self#expression e1 self#direction_flag df
+ self#expression e2 self#expression e3
| _ -> self#paren true self#expression f x
method attributes f l =
@@ -904,7 +928,8 @@ class printer ()= object(self:'self)
(self#list self#core_type ~sep:"," ~first:"(" ~last:")")
ls self#longident_loc li self#type_declaration td
| Pwith_module (li, li2) ->
- pp f "module %a =@ %a" self#longident_loc li self#longident_loc li2;
+ pp f "module %a =@ %a" self#longident_loc li self#longident_loc
+ li2;
| Pwith_typesubst ({ptype_params=ls;_} as td) ->
let ls = List.map fst ls in
pp f "type@ %a %s :=@ %a"
@@ -1099,7 +1124,8 @@ class printer ()= object(self:'self)
self#item_attributes attrs
| Pstr_type (_, []) -> assert false
| Pstr_type (rf, l) -> self#type_def_list f (rf, l)
- | Pstr_value (rf, l) -> (* pp f "@[<hov2>let %a%a@]" self#rec_flag rf self#bindings l *)
+ | Pstr_value (rf, l) ->
+ (* pp f "@[<hov2>let %a%a@]" self#rec_flag rf self#bindings l *)
pp f "@[<2>%a@]" self#bindings (rf,l)
| Pstr_typext te -> self#type_extension f te
| Pstr_exception ed -> self#exception_declaration f ed
@@ -1122,7 +1148,7 @@ class printer ()= object(self:'self)
({pmty_desc=(Pmty_ident (_)
| Pmty_signature (_));_} as mt))
when me.pmod_attributes = [] ->
- pp f " :@;%a@;=@;%a@;" self#module_type mt self#module_expr me'
+ pp f " :@;%a@;=@;%a@;" self#module_type mt self#module_expr me'
| _ ->
pp f " =@ %a" self#module_expr me
)) x.pmb_expr
@@ -1336,7 +1362,8 @@ class printer ()= object(self:'self)
method extension_constructor f x =
match x.pext_kind with
| Pext_decl(l, r) ->
- self#constructor_declaration f (x.pext_name.txt, l, r, x.pext_attributes)
+ self#constructor_declaration f (x.pext_name.txt, l, r,
+ x.pext_attributes)
| Pext_rebind li ->
pp f "%s%a@;=@;%a" x.pext_name.txt
self#attributes x.pext_attributes
@@ -1345,7 +1372,9 @@ class printer ()= object(self:'self)
method case_list f l : unit =
let aux f {pc_lhs; pc_guard; pc_rhs} =
pp f "@;| @[<2>%a%a@;->@;%a@]"
- self#pattern pc_lhs (self#option self#expression ~first:"@;when@;") pc_guard self#under_pipe#expression pc_rhs in
+ self#pattern pc_lhs (self#option self#expression ~first:"@;when@;")
+ pc_guard self#under_pipe#expression pc_rhs
+ in
self#list aux f l ~sep:""
method label_x_expression_param f (l,e) =
let simple_name = match e.pexp_desc with
diff --git a/parsing/pprintast.mli b/parsing/pprintast.mli
index 98105928dd..a77fb6c16d 100644
--- a/parsing/pprintast.mli
+++ b/parsing/pprintast.mli
@@ -37,7 +37,10 @@ class printer :
Format.formatter -> Parsetree.class_type_declaration list -> unit
method constant : Format.formatter -> Asttypes.constant -> unit
method constant_string : Format.formatter -> string -> unit
- method constructor_declaration : Format.formatter -> (string * Parsetree.constructor_arguments * Parsetree.core_type option * Parsetree.attributes) -> unit
+ method constructor_declaration :
+ Format.formatter -> (string * Parsetree.constructor_arguments
+ * Parsetree.core_type option * Parsetree.attributes)
+ -> unit
method core_type : Format.formatter -> Parsetree.core_type -> unit
method core_type1 : Format.formatter -> Parsetree.core_type -> unit
method direction_flag :
@@ -107,7 +110,8 @@ class printer :
method type_declaration :
Format.formatter -> Parsetree.type_declaration -> unit
method type_def_list :
- Format.formatter -> Asttypes.rec_flag * Parsetree.type_declaration list -> unit
+ Format.formatter -> Asttypes.rec_flag * Parsetree.type_declaration list
+ -> unit
method type_extension :
Format.formatter -> Parsetree.type_extension -> unit
method type_param :
diff --git a/stdlib/camlinternalFormat.ml b/stdlib/camlinternalFormat.ml
index a217895fb8..9d4ba4f4bf 100644
--- a/stdlib/camlinternalFormat.ml
+++ b/stdlib/camlinternalFormat.ml
@@ -1,3 +1,16 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Benoit Vaugon, ENSTA *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU Library General Public License, with *)
+(* the special exception on linking described in file ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
open CamlinternalFormatBasics
(******************************************************************************)
@@ -108,15 +121,19 @@ type ('b, 'c) acc_formatting_gen =
(* Reversed list of printing atoms. *)
(* Used to accumulate printf arguments. *)
and ('b, 'c) acc =
- | Acc_formatting_lit of ('b, 'c) acc * formatting_lit (* Special fmtting (box) *)
- | Acc_formatting_gen of ('b, 'c) acc * ('b, 'c) acc_formatting_gen (* Special fmtting (box) *)
- | Acc_string_literal of ('b, 'c) acc * string (* Literal string *)
- | Acc_char_literal of ('b, 'c) acc * char (* Literal char *)
- | Acc_data_string of ('b, 'c) acc * string (* Generated string *)
- | Acc_data_char of ('b, 'c) acc * char (* Generated char *)
- | Acc_delay of ('b, 'c) acc * ('b -> 'c) (* Delayed printing (%a, %t) *)
- | Acc_flush of ('b, 'c) acc (* Flush *)
- | Acc_invalid_arg of ('b, 'c) acc * string (* Raise Invalid_argument msg *)
+ | Acc_formatting_lit of ('b, 'c) acc * formatting_lit
+ (* Special fmtting (box) *)
+ | Acc_formatting_gen of ('b, 'c) acc * ('b, 'c) acc_formatting_gen
+ (* Special fmtting (box) *)
+ | Acc_string_literal of ('b, 'c) acc * string (* Literal string *)
+ | Acc_char_literal of ('b, 'c) acc * char (* Literal char *)
+ | Acc_data_string of ('b, 'c) acc * string (* Generated string *)
+ | Acc_data_char of ('b, 'c) acc * char (* Generated char *)
+ | Acc_delay of ('b, 'c) acc * ('b -> 'c)
+ (* Delayed printing (%a, %t) *)
+ | Acc_flush of ('b, 'c) acc (* Flush *)
+ | Acc_invalid_arg of ('b, 'c) acc * string
+ (* Raise Invalid_argument msg *)
| End_of_acc
(* List of heterogeneous values. *)
@@ -1059,7 +1076,9 @@ and type_format_gen :
Format_subst_ty (sub_fmtty1, _sub_fmtty2, fmtty_rest) ->
if Fmtty_EBB (erase_rel sub_fmtty) <> Fmtty_EBB (erase_rel sub_fmtty1) then
raise Type_mismatch;
- let Fmt_fmtty_EBB (fmt', fmtty') = type_format_gen fmt_rest (erase_rel fmtty_rest) in
+ let Fmt_fmtty_EBB (fmt', fmtty') =
+ type_format_gen fmt_rest (erase_rel fmtty_rest)
+ in
Fmt_fmtty_EBB (Format_subst (pad_opt, sub_fmtty1, fmt'), fmtty')
(* Printf and Format specific constructors: *)
| Alpha fmt_rest, Alpha_ty fmtty_rest ->
@@ -1133,7 +1152,9 @@ fun ign fmt fmtty -> match ign with
| Ignored_format_subst (pad_opt, sub_fmtty) ->
let Fmtty_fmt_EBB (sub_fmtty', Fmt_fmtty_EBB (fmt', fmtty')) =
type_ignored_format_substitution sub_fmtty fmt fmtty in
- Fmt_fmtty_EBB (Ignored_param (Ignored_format_subst (pad_opt, sub_fmtty'), fmt'), fmtty')
+ Fmt_fmtty_EBB (Ignored_param (Ignored_format_subst (pad_opt, sub_fmtty'),
+ fmt'),
+ fmtty')
| Ignored_reader -> (
match fmtty with
| Ignored_reader_ty fmtty_rest ->
@@ -1215,15 +1236,20 @@ fun sub_fmtty fmt fmtty -> match sub_fmtty, fmtty with
| Format_subst_ty (sub1_fmtty, sub2_fmtty, sub_fmtty_rest),
Format_subst_ty (sub1_fmtty', sub2_fmtty', fmtty_rest) ->
(* TODO define Fmtty_rel_EBB to remove those erase_rel *)
- if Fmtty_EBB (erase_rel sub1_fmtty) <> Fmtty_EBB (erase_rel sub1_fmtty') then raise Type_mismatch;
- if Fmtty_EBB (erase_rel sub2_fmtty) <> Fmtty_EBB (erase_rel sub2_fmtty') then raise Type_mismatch;
+ if Fmtty_EBB (erase_rel sub1_fmtty) <> Fmtty_EBB (erase_rel sub1_fmtty')
+ then raise Type_mismatch;
+ if Fmtty_EBB (erase_rel sub2_fmtty) <> Fmtty_EBB (erase_rel sub2_fmtty')
+ then raise Type_mismatch;
let sub_fmtty' = trans (symm sub1_fmtty') sub2_fmtty' in
let _, f2, _, f4 = fmtty_rel_det sub_fmtty' in
let Refl = f2 Refl in
let Refl = f4 Refl in
let Fmtty_fmt_EBB (sub_fmtty_rest', fmt') =
- type_ignored_format_substitution (erase_rel sub_fmtty_rest) fmt fmtty_rest in
- Fmtty_fmt_EBB (Format_subst_ty (sub1_fmtty', sub2_fmtty', symm sub_fmtty_rest'), fmt')
+ type_ignored_format_substitution (erase_rel sub_fmtty_rest) fmt fmtty_rest
+ in
+ Fmtty_fmt_EBB (Format_subst_ty (sub1_fmtty', sub2_fmtty',
+ symm sub_fmtty_rest'),
+ fmt')
| End_of_fmtty, fmtty ->
Fmtty_fmt_EBB (End_of_fmtty, type_format_gen fmt fmtty)
| _ -> raise Type_mismatch
@@ -1949,7 +1975,8 @@ let fmt_ebb_of_string ?legacy_behavior str =
| '_' -> parse_flags pct_ind (str_ind+1) end_ind true
| _ -> parse_flags pct_ind str_ind end_ind false
- and parse_flags : type e f . int -> int -> int -> bool -> (_, _, e, f) fmt_ebb =
+ and parse_flags : type e f . int -> int -> int -> bool -> (_, _, e, f) fmt_ebb
+ =
fun pct_ind str_ind end_ind ign ->
let zero = ref false and minus = ref false
and plus = ref false and space = ref false
@@ -2193,9 +2220,9 @@ let fmt_ebb_of_string ?legacy_behavior str =
| None -> char_format fmt_rest
| Some 0 -> scan_format fmt_rest
| Some _n ->
- if not legacy_behavior
- then invalid_nonnull_char_width str_ind
- else (* legacy ignores %c widths *) char_format fmt_rest
+ if not legacy_behavior
+ then invalid_nonnull_char_width str_ind
+ else (* legacy ignores %c widths *) char_format fmt_rest
end
| 'C' ->
let Fmt_EBB fmt_rest = parse str_ind end_ind in
@@ -2571,8 +2598,9 @@ let fmt_ebb_of_string ?legacy_behavior str =
parse_char_set_content (str_ind + 1) end_ind
| c' ->
if c = '%' then fail_single_percent str_ind;
- (* note that '@' alone is accepted, as done by the legacy implementation;
- the documentation specifically requires %@ so we could warn on that *)
+ (* note that '@' alone is accepted, as done by the legacy
+ implementation; the documentation specifically requires %@
+ so we could warn on that *)
add_char c;
parse_char_set_after_char (str_ind + 1) end_ind c'
diff --git a/stdlib/camlinternalFormat.mli b/stdlib/camlinternalFormat.mli
index dd8da62d2b..036bcb0ec7 100644
--- a/stdlib/camlinternalFormat.mli
+++ b/stdlib/camlinternalFormat.mli
@@ -1,3 +1,16 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Benoit Vaugon, ENSTA *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU Library General Public License, with *)
+(* the special exception on linking described in file ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
(* No comments, OCaml stdlib internal use only. *)
open CamlinternalFormatBasics
@@ -55,7 +68,8 @@ val type_format :
('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmtty ->
('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt
-val fmt_ebb_of_string : ?legacy_behavior:bool -> string -> ('b, 'c, 'e, 'f) fmt_ebb
+val fmt_ebb_of_string :
+ ?legacy_behavior:bool -> string -> ('b, 'c, 'e, 'f) fmt_ebb
(* warning: the optional flag legacy_behavior is EXPERIMENTAL and will
be removed in the next version. You must not set it explicitly. It
is only used by the type-checker implementation.
diff --git a/stdlib/camlinternalFormatBasics.ml b/stdlib/camlinternalFormatBasics.ml
index 4e5db73db9..60a74524ec 100644
--- a/stdlib/camlinternalFormatBasics.ml
+++ b/stdlib/camlinternalFormatBasics.ml
@@ -1,3 +1,16 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Benoit Vaugon, ENSTA *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU Library General Public License, with *)
+(* the special exception on linking described in file ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
(* Padding position. *)
type padty =
| Left (* Text is left justified ('-' option). *)
@@ -135,7 +148,7 @@ parameter is as follows:
(char -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1,
char -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel
-In the general case, the term structure of fmtty_rel is (almost¹)
+In the general case, the term structure of fmtty_rel is (almost[1])
isomorphic to the fmtty of the previous implementation: every
constructor is re-read with a binary, relational type, instead of the
previous unary typing. fmtty can then be re-defined as the diagonal of
@@ -169,7 +182,7 @@ to transpose between related format types.
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel
-> ('a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmt
-NOTE ¹: the typing of Format_subst_ty requires not one format type, but
+NOTE [1]: the typing of Format_subst_ty requires not one format type, but
two, one to establish the link between the format argument and the
first six parameters, and the other for the link between the format
argumant and the last six parameters.
@@ -290,7 +303,8 @@ and ('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel ->
(('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1,
- ('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel
+ ('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2)
+ fmtty_rel
| Format_subst_ty : (* %(...%) *)
('g, 'h, 'i, 'j, 'k, 'l,
'g1, 'b1, 'c1, 'j1, 'd1, 'a1) fmtty_rel *
@@ -299,7 +313,8 @@ and ('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel ->
(('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'g1, 'b1, 'c1, 'j1, 'e1, 'f1,
- ('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'g2, 'b2, 'c2, 'j2, 'e2, 'f2) fmtty_rel
+ ('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'g2, 'b2, 'c2, 'j2, 'e2, 'f2)
+ fmtty_rel
(* Printf and Format specific constructors. *)
| Alpha_ty : (* %a *)
@@ -312,7 +327,7 @@ and ('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel ->
(('b1 -> 'c1) -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1,
('b2 -> 'c2) -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel
- | Any_ty : (* Used for custom formats *)
+ | Any_ty : (* Used for custom formats *)
('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel ->
('x -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1,
diff --git a/stdlib/camlinternalFormatBasics.mli b/stdlib/camlinternalFormatBasics.mli
index 80866e8332..ee0235661b 100644
--- a/stdlib/camlinternalFormatBasics.mli
+++ b/stdlib/camlinternalFormatBasics.mli
@@ -1,3 +1,16 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Benoit Vaugon, ENSTA *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU Library General Public License, with *)
+(* the special exception on linking described in file ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
(* No comments, OCaml stdlib internal use only. *)
type padty = Left | Right | Zeros
@@ -126,7 +139,7 @@ and ('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel ->
(('b1 -> 'c1) -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1,
('b2 -> 'c2) -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel
-| Any_ty : (* Used for custom formats *)
+| Any_ty : (* Used for custom formats *)
('a1, 'b1, 'c1, 'd1, 'e1, 'f1,
'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel ->
('x -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1,
diff --git a/stdlib/pervasives.mli b/stdlib/pervasives.mli
index e5182a8ee7..4464866c9d 100644
--- a/stdlib/pervasives.mli
+++ b/stdlib/pervasives.mli
@@ -596,7 +596,7 @@ external ( .() <- ) : 'a array -> int -> 'a -> unit = "%array_opt_set"
(** {6 String index operators} *)
-external ( .[] ) : string -> int -> char= "%string_opt_get"
+external ( .[] ) : string -> int -> char = "%string_opt_get"
(** Bracket index operator for strings.
[ a.[index] ] is desugared to [ (.[]) a index ]. *)
diff --git a/stdlib/scanf.ml b/stdlib/scanf.ml
index ed2b556a24..7e19b6a703 100644
--- a/stdlib/scanf.ml
+++ b/stdlib/scanf.ml
@@ -1043,8 +1043,10 @@ fun k fmt -> match fmt with
| Scan_next_char rest -> take_format_readers k rest
| Formatting_lit (_, rest) -> take_format_readers k rest
- | Formatting_gen (Open_tag (Format (fmt, _)), rest) -> take_format_readers k (concat_fmt fmt rest)
- | Formatting_gen (Open_box (Format (fmt, _)), rest) -> take_format_readers k (concat_fmt fmt rest)
+ | Formatting_gen (Open_tag (Format (fmt, _)), rest) ->
+ take_format_readers k (concat_fmt fmt rest)
+ | Formatting_gen (Open_box (Format (fmt, _)), rest) ->
+ take_format_readers k (concat_fmt fmt rest)
| Format_arg (_, _, rest) -> take_format_readers k rest
| Format_subst (_, fmtty, rest) ->
@@ -1136,10 +1138,12 @@ fun ib fmt readers -> match fmt with
pad_prec_scanf ib str_rest readers pad No_precision scan token_string
| String (pad, Formatting_gen (Open_tag (Format (fmt', _)), rest)) ->
let scan width _ ib = scan_string (Some '{') width ib in
- pad_prec_scanf ib (concat_fmt fmt' rest) readers pad No_precision scan token_string
+ pad_prec_scanf ib (concat_fmt fmt' rest) readers pad No_precision scan
+ token_string
| String (pad, Formatting_gen (Open_box (Format (fmt', _)), rest)) ->
let scan width _ ib = scan_string (Some '[') width ib in
- pad_prec_scanf ib (concat_fmt fmt' rest) readers pad No_precision scan token_string
+ pad_prec_scanf ib (concat_fmt fmt' rest) readers pad No_precision scan
+ token_string
| String (pad, rest) ->
let scan width _ ib = scan_string None width ib in
pad_prec_scanf ib rest readers pad No_precision scan token_string
diff --git a/testsuite/tests/asmcomp/power.S b/testsuite/tests/asmcomp/power.S
index f12b1a5226..d13035a46e 100644
--- a/testsuite/tests/asmcomp/power.S
+++ b/testsuite/tests/asmcomp/power.S
@@ -69,7 +69,7 @@
addi 2, 2, (.TOC. - 0b)@l; \
.localentry name, . - 0b
#endif
-
+
FUNCTION(call_gen_code)
/* Allocate and link stack frame */
stgu 1, -(WORD*18 + 8*18 + RESERVED_STACK)(1)
diff --git a/testsuite/tests/basic-modules/main.ml b/testsuite/tests/basic-modules/main.ml
index 7f3f44d72b..aee809319f 100644
--- a/testsuite/tests/basic-modules/main.ml
+++ b/testsuite/tests/basic-modules/main.ml
@@ -1,3 +1,15 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Jacques Garrigue, Nagoya University *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
+(***********************************************************************)
+
(* PR#6435 *)
module F (M : sig
diff --git a/testsuite/tests/basic-modules/offset.ml b/testsuite/tests/basic-modules/offset.ml
index 457947dcd5..a2b380410e 100644
--- a/testsuite/tests/basic-modules/offset.ml
+++ b/testsuite/tests/basic-modules/offset.ml
@@ -1,3 +1,15 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Jacques Garrigue, Nagoya University *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
+(***********************************************************************)
+
module M = struct
type t = string
diff --git a/testsuite/tests/basic-modules/pr6726.ml b/testsuite/tests/basic-modules/pr6726.ml
index 33ad956979..1c8f150bc0 100644
--- a/testsuite/tests/basic-modules/pr6726.ml
+++ b/testsuite/tests/basic-modules/pr6726.ml
@@ -1,10 +1,22 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Jacques Garrigue, Nagoya University *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
+(***********************************************************************)
+
module ExtUnixAll = struct
external unused : unit -> unit = "caml_blit_string"
module BigEndian = struct
let get_uint8 str off = 33
end
end
-
+
module ExtUnix = struct
module All = ExtUnixAll
end
diff --git a/testsuite/tests/basic/constprop.ml b/testsuite/tests/basic/constprop.ml
index 6661291316..62bf5f25c7 100644
--- a/testsuite/tests/basic/constprop.ml
+++ b/testsuite/tests/basic/constprop.ml
@@ -1,13 +1,13 @@
(***********************************************************************)
-(* *)
-(* OCaml *)
-(* *)
-(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *)
-(* *)
-(* Copyright 2014 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
+(* *)
+(* OCaml *)
+(* *)
+(* Xavier Leroy, projet Gallium, INRIA Rocquencourt *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
(***********************************************************************)
(* Test constant propagation through inlining *)
@@ -28,45 +28,89 @@ let _ =
begin
let x = 89809344 and y = 457455773 and s = 7 in
let xh = hide x and yh = hide y and sh = hide s in
- do_test "integers" ((-x, x + y, x - y, x * y, x / y, x mod y, x land y, x lor y, x lxor y, x lsl s, x lsr s, x asr s, x = y, x <> y, x < y, x <= y, x > y, x >= y, succ x, pred y)) ((-xh, xh + yh, xh - yh, xh * yh, xh / yh, xh mod yh, xh land yh, xh lor yh, xh lxor yh, xh lsl sh, xh lsr sh, xh asr sh, xh = yh, xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh, succ xh, pred yh))
+ do_test "integers"
+ ((-x, x + y, x - y, x * y, x / y, x mod y, x land y,
+ x lor y, x lxor y, x lsl s, x lsr s, x asr s, x = y,
+ x <> y, x < y, x <= y, x > y, x >= y, succ x, pred y))
+ ((-xh, xh + yh, xh - yh, xh * yh, xh / yh, xh mod yh, xh land yh,
+ xh lor yh, xh lxor yh, xh lsl sh, xh lsr sh, xh asr sh, xh = yh,
+ xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh, succ xh, pred yh))
end;
begin
let x = 3.141592654 and y = 0.341638588598232096 in
let xh = hide x and yh = hide y in
- do_test "floats" ((int_of_float x, x +. y, x -. y, x *. y, x /. y, x = y, x <> y, x < y, x <= y, x > y, x >= y)) ((int_of_float xh, xh +. yh, xh -. yh, xh *. yh, xh /. yh, xh = yh, xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh))
+ do_test "floats"
+ ((int_of_float x, x +. y, x -. y, x *. y, x /. y, x = y,
+ x <> y, x < y, x <= y, x > y, x >= y))
+ ((int_of_float xh, xh +. yh, xh -. yh, xh *. yh, xh /. yh, xh = yh,
+ xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh))
end;
begin
let x = 781944104l and y = 308219921l and s = 3 in
let xh = hide x and yh = hide y and sh = hide s in
- do_test "32-bit integers" (Int32.(neg x, add x y, sub x y, mul x y, div x y, rem x y, logand x y, logor x y, logxor x y, shift_left x s, shift_right x s, shift_right_logical x s, x = y, x <> y, x < y, x <= y, x > y, x >= y)) (Int32.(neg xh, add xh yh, sub xh yh, mul xh yh, div xh yh, rem xh yh, logand xh yh, logor xh yh, logxor xh yh, shift_left xh sh, shift_right xh sh, shift_right_logical xh sh, xh = yh, xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh))
+ do_test "32-bit integers"
+ (Int32.(neg x, add x y, sub x y, mul x y, div x y, rem x y,
+ logand x y, logor x y, logxor x y, shift_left x s,
+ shift_right x s, shift_right_logical x s, x = y, x <> y,
+ x < y, x <= y, x > y, x >= y))
+ (Int32.(neg xh, add xh yh, sub xh yh, mul xh yh, div xh yh, rem xh yh,
+ logand xh yh, logor xh yh, logxor xh yh, shift_left xh sh,
+ shift_right xh sh, shift_right_logical xh sh, xh = yh, xh <> yh,
+ xh < yh, xh <= yh, xh > yh, xh >= yh))
end;
begin
let x = 1828697041n and y = -521695949n and s = 8 in
let xh = hide x and yh = hide y and sh = hide s in
- do_test "native integers" (Nativeint.(neg x, add x y, sub x y, mul x y, div x y, rem x y, logand x y, logor x y, logxor x y, shift_left x s, shift_right x s, shift_right_logical x s, x = y, x <> y, x < y, x <= y, x > y, x >= y)) (Nativeint.(neg xh, add xh yh, sub xh yh, mul xh yh, div xh yh, rem xh yh, logand xh yh, logor xh yh, logxor xh yh, shift_left xh sh, shift_right xh sh, shift_right_logical xh sh, xh = yh, xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh))
+ do_test "native integers"
+ (Nativeint.(neg x, add x y, sub x y, mul x y, div x y,
+ rem x y, logand x y, logor x y, logxor x y,
+ shift_left x s, shift_right x s,
+ shift_right_logical x s, x = y, x <> y, x < y,
+ x <= y, x > y, x >= y))
+ (Nativeint.(neg xh, add xh yh, sub xh yh, mul xh yh, div xh yh,
+ rem xh yh, logand xh yh, logor xh yh, logxor xh yh,
+ shift_left xh sh, shift_right xh sh,
+ shift_right_logical xh sh, xh = yh, xh <> yh, xh < yh,
+ xh <= yh, xh > yh, xh >= yh))
end;
begin
let x = 1511491586921138079L and y = 6677538715441746158L and s = 17 in
let xh = hide x and yh = hide y and sh = hide s in
- do_test "64-bit integers" (Int64.(neg x, add x y, sub x y, mul x y, div x y, rem x y, logand x y, logor x y, logxor x y, shift_left x s, shift_right x s, shift_right_logical x s, x = y, x <> y, x < y, x <= y, x > y, x >= y)) (Int64.(neg xh, add xh yh, sub xh yh, mul xh yh, div xh yh, rem xh yh, logand xh yh, logor xh yh, logxor xh yh, shift_left xh sh, shift_right xh sh, shift_right_logical xh sh, xh = yh, xh <> yh, xh < yh, xh <= yh, xh > yh, xh >= yh))
+ do_test "64-bit integers"
+ (Int64.(neg x, add x y, sub x y, mul x y, div x y, rem x y,
+ logand x y, logor x y, logxor x y, shift_left x s,
+ shift_right x s, shift_right_logical x s, x = y, x <> y,
+ x < y, x <= y, x > y, x >= y))
+ (Int64.(neg xh, add xh yh, sub xh yh, mul xh yh, div xh yh, rem xh yh,
+ logand xh yh, logor xh yh, logxor xh yh, shift_left xh sh,
+ shift_right xh sh, shift_right_logical xh sh, xh = yh, xh <> yh,
+ xh < yh, xh <= yh, xh > yh, xh >= yh))
end;
begin
let x = 1000807289 in
let xh = hide x in
- do_test "integer conversions" ((float_of_int x, Int32.of_int x, Nativeint.of_int x, Int64.of_int x)) ((float_of_int xh, Int32.of_int xh, Nativeint.of_int xh, Int64.of_int xh))
+ do_test "integer conversions"
+ ((float_of_int x, Int32.of_int x, Nativeint.of_int x, Int64.of_int x))
+ ((float_of_int xh, Int32.of_int xh, Nativeint.of_int xh, Int64.of_int xh))
end;
begin
let x = 10486393l in
let xh = hide x in
- do_test "32-bit integer conversions" ((Int32.to_int x, Nativeint.of_int32 x, Int64.of_int32 x)) ((Int32.to_int xh, Nativeint.of_int32 xh, Int64.of_int32 xh))
+ do_test "32-bit integer conversions"
+ ((Int32.to_int x, Nativeint.of_int32 x, Int64.of_int32 x))
+ ((Int32.to_int xh, Nativeint.of_int32 xh, Int64.of_int32 xh))
end;
begin
let x = -131134014n in
let xh = hide x in
- do_test "native integer conversions" ((Nativeint.to_int x, Nativeint.to_int32 x, Int64.of_nativeint x)) ((Nativeint.to_int xh, Nativeint.to_int32 xh, Int64.of_nativeint xh))
+ do_test "native integer conversions"
+ ((Nativeint.to_int x, Nativeint.to_int32 x, Int64.of_nativeint x))
+ ((Nativeint.to_int xh, Nativeint.to_int32 xh, Int64.of_nativeint xh))
end;
begin
let x = 531871273453404175L in
let xh = hide x in
- do_test "64-bit integer conversions" ((Int64.to_int x, Int64.to_int32 x, Int64.to_nativeint x)) ((Int64.to_int xh, Int64.to_int32 xh, Int64.to_nativeint xh))
+ do_test "64-bit integer conversions"
+ ((Int64.to_int x, Int64.to_int32 x, Int64.to_nativeint x))
+ ((Int64.to_int xh, Int64.to_int32 xh, Int64.to_nativeint xh))
end
diff --git a/testsuite/tests/basic/constprop.mlp b/testsuite/tests/basic/constprop.mlp
index 305a98dd95..40bcf42389 100644
--- a/testsuite/tests/basic/constprop.mlp
+++ b/testsuite/tests/basic/constprop.mlp
@@ -57,7 +57,7 @@
logand x y, logor x y, logxor x y, \
shift_left x s, shift_right x s, shift_right_logical x s, \
x = y, x <> y, x < y, x <= y, x > y, x >= y)
-
+
#define tnativeint(x,y,s) \
Nativeint.(neg x, add x y, sub x y, mul x y, div x y, rem x y, \
logand x y, logor x y, logxor x y, \
@@ -69,7 +69,7 @@
logand x y, logor x y, logxor x y, \
shift_left x s, shift_right x s, shift_right_logical x s, \
x = y, x <> y, x < y, x <= y, x > y, x >= y)
-
+
let do_test msg res1 res2 =
Printf.printf "%s: %s\n" msg (if res1 = res2 then "passed" else "FAILED")
@@ -120,11 +120,10 @@ let _ =
begin
let x = -131134014n in
let xh = hide x in
- do_test "native integer conversions" (tconvnativeint(x)) (tconvnativeint(xh))
+ do_test "native integer conversions" (tconvnativeint(x))(tconvnativeint(xh))
end;
begin
let x = 531871273453404175L in
let xh = hide x in
do_test "64-bit integer conversions" (tconvint64(x)) (tconvint64(xh))
end
-
diff --git a/testsuite/tests/basic/divint.ml b/testsuite/tests/basic/divint.ml
index 60f09962ff..e5a3d59dd1 100644
--- a/testsuite/tests/basic/divint.ml
+++ b/testsuite/tests/basic/divint.ml
@@ -87,30 +87,63 @@ let _ =
printf "12 int\n"; WithInt.do_test 12 (fun x -> x / 12)(fun x -> x mod 12);
printf "25 int\n"; WithInt.do_test 25 (fun x -> x / 25)(fun x -> x mod 25);
printf "55 int\n"; WithInt.do_test 55 (fun x -> x / 55)(fun x -> x mod 55);
- printf "125 int\n"; WithInt.do_test 125 (fun x -> x / 125)(fun x -> x mod 125);
- printf "625 int\n"; WithInt.do_test 625 (fun x -> x / 625)(fun x -> x mod 625);
- printf "-1 int\n"; WithInt.do_test (-1) (fun x -> x / (-1))(fun x -> x mod (-1));
- printf "-2 int\n"; WithInt.do_test (-2) (fun x -> x / (-2))(fun x -> x mod (-2));
- printf "-3 int\n"; WithInt.do_test (-3) (fun x -> x / (-3))(fun x -> x mod (-3));
-
- printf "1 nat\n"; WithNat.do_test 1 (fun x -> Nativeint.div x 1n)(fun x -> Nativeint.rem x 1n);
- printf "2 nat\n"; WithNat.do_test 2 (fun x -> Nativeint.div x 2n)(fun x -> Nativeint.rem x 2n);
- printf "3 nat\n"; WithNat.do_test 3 (fun x -> Nativeint.div x 3n)(fun x -> Nativeint.rem x 3n);
- printf "4 nat\n"; WithNat.do_test 4 (fun x -> Nativeint.div x 4n)(fun x -> Nativeint.rem x 4n);
- printf "5 nat\n"; WithNat.do_test 5 (fun x -> Nativeint.div x 5n)(fun x -> Nativeint.rem x 5n);
- printf "6 nat\n"; WithNat.do_test 6 (fun x -> Nativeint.div x 6n)(fun x -> Nativeint.rem x 6n);
- printf "7 nat\n"; WithNat.do_test 7 (fun x -> Nativeint.div x 7n)(fun x -> Nativeint.rem x 7n);
- printf "9 nat\n"; WithNat.do_test 9 (fun x -> Nativeint.div x 9n)(fun x -> Nativeint.rem x 9n);
- printf "10 nat\n"; WithNat.do_test 10 (fun x -> Nativeint.div x 10n)(fun x -> Nativeint.rem x 10n);
- printf "11 nat\n"; WithNat.do_test 11 (fun x -> Nativeint.div x 11n)(fun x -> Nativeint.rem x 11n);
- printf "12 nat\n"; WithNat.do_test 12 (fun x -> Nativeint.div x 12n)(fun x -> Nativeint.rem x 12n);
- printf "25 nat\n"; WithNat.do_test 25 (fun x -> Nativeint.div x 25n)(fun x -> Nativeint.rem x 25n);
- printf "55 nat\n"; WithNat.do_test 55 (fun x -> Nativeint.div x 55n)(fun x -> Nativeint.rem x 55n);
- printf "125 nat\n"; WithNat.do_test 125 (fun x -> Nativeint.div x 125n)(fun x -> Nativeint.rem x 125n);
- printf "625 nat\n"; WithNat.do_test 625 (fun x -> Nativeint.div x 625n)(fun x -> Nativeint.rem x 625n);
- printf "-1 nat\n"; WithNat.do_test (-1) (fun x -> Nativeint.div x (-1n))(fun x -> Nativeint.rem x (-1n));
- printf "-2 nat\n"; WithNat.do_test (-2) (fun x -> Nativeint.div x (-2n))(fun x -> Nativeint.rem x (-2n));
- printf "-3 nat\n"; WithNat.do_test (-3) (fun x -> Nativeint.div x (-3n))(fun x -> Nativeint.rem x (-3n));
+ printf "125 int\n";
+ WithInt.do_test 125 (fun x -> x / 125)(fun x -> x mod 125);
+ printf "625 int\n";
+ WithInt.do_test 625 (fun x -> x / 625)(fun x -> x mod 625);
+ printf "-1 int\n";
+ WithInt.do_test (-1) (fun x -> x / (-1))(fun x -> x mod (-1));
+ printf "-2 int\n";
+ WithInt.do_test (-2) (fun x -> x / (-2))(fun x -> x mod (-2));
+ printf "-3 int\n";
+ WithInt.do_test (-3) (fun x -> x / (-3))(fun x -> x mod (-3));
+
+ printf "1 nat\n";
+ WithNat.do_test 1 (fun x -> Nativeint.div x 1n)(fun x -> Nativeint.rem x 1n);
+ printf "2 nat\n";
+ WithNat.do_test 2 (fun x -> Nativeint.div x 2n)(fun x -> Nativeint.rem x 2n);
+ printf "3 nat\n";
+ WithNat.do_test 3 (fun x -> Nativeint.div x 3n)(fun x -> Nativeint.rem x 3n);
+ printf "4 nat\n";
+ WithNat.do_test 4 (fun x -> Nativeint.div x 4n)(fun x -> Nativeint.rem x 4n);
+ printf "5 nat\n";
+ WithNat.do_test 5 (fun x -> Nativeint.div x 5n)(fun x -> Nativeint.rem x 5n);
+ printf "6 nat\n";
+ WithNat.do_test 6 (fun x -> Nativeint.div x 6n)(fun x -> Nativeint.rem x 6n);
+ printf "7 nat\n";
+ WithNat.do_test 7 (fun x -> Nativeint.div x 7n)(fun x -> Nativeint.rem x 7n);
+ printf "9 nat\n";
+ WithNat.do_test 9 (fun x -> Nativeint.div x 9n)(fun x -> Nativeint.rem x 9n);
+ printf "10 nat\n";
+ WithNat.do_test 10 (fun x -> Nativeint.div x 10n)
+ (fun x -> Nativeint.rem x 10n);
+ printf "11 nat\n";
+ WithNat.do_test 11 (fun x -> Nativeint.div x 11n)
+ (fun x -> Nativeint.rem x 11n);
+ printf "12 nat\n";
+ WithNat.do_test 12 (fun x -> Nativeint.div x 12n)
+ (fun x -> Nativeint.rem x 12n);
+ printf "25 nat\n";
+ WithNat.do_test 25 (fun x -> Nativeint.div x 25n)
+ (fun x -> Nativeint.rem x 25n);
+ printf "55 nat\n";
+ WithNat.do_test 55 (fun x -> Nativeint.div x 55n)
+ (fun x -> Nativeint.rem x 55n);
+ printf "125 nat\n";
+ WithNat.do_test 125 (fun x -> Nativeint.div x 125n)
+ (fun x -> Nativeint.rem x 125n);
+ printf "625 nat\n";
+ WithNat.do_test 625 (fun x -> Nativeint.div x 625n)
+ (fun x -> Nativeint.rem x 625n);
+ printf "-1 nat\n";
+ WithNat.do_test (-1) (fun x -> Nativeint.div x (-1n))
+ (fun x -> Nativeint.rem x (-1n));
+ printf "-2 nat\n";
+ WithNat.do_test (-2) (fun x -> Nativeint.div x (-2n))
+ (fun x -> Nativeint.rem x (-2n));
+ printf "-3 nat\n";
+ WithNat.do_test (-3) (fun x -> Nativeint.div x (-3n))
+ (fun x -> Nativeint.rem x (-3n));
if !error then printf "TEST FAILED.\n" else printf "Test passed.\n"
diff --git a/testsuite/tests/basic/patmatch.ml b/testsuite/tests/basic/patmatch.ml
index 4ef50a73cb..0f759bc408 100644
--- a/testsuite/tests/basic/patmatch.ml
+++ b/testsuite/tests/basic/patmatch.ml
@@ -474,26 +474,33 @@ let test_match tok = match tok with
5
| ITEM2(Edif, TLIST [ID id], TLIST lst) ->
6
- | ITEM2(Instance, TLIST [ID instid], TLIST[ITEM2(Viewref, TLIST [ID netlist],
- TLIST[ITEM(Cellref, TLIST [ID cellid])])]) -> 7
+ | ITEM2(Instance,
+ TLIST [ID instid],
+ TLIST[ITEM2(Viewref, TLIST [ID netlist],
+ TLIST[ITEM(Cellref, TLIST [ID cellid])])]) ->
+ 7
-
- | ITEM2(Instance, TLIST [ID instid], TLIST[ITEM2(Viewref, TLIST [ID netlist],
- TLIST[ITEM2(Cellref, TLIST [ID cellid],
- TLIST [ITEM (Libraryref, TLIST [ID libid])])])]) -> 8
+
+ | ITEM2(Instance,
+ TLIST [ID instid],
+ TLIST[ITEM2(Viewref, TLIST [ID netlist],
+ TLIST[ITEM2(Cellref, TLIST [ID cellid],
+ TLIST [ITEM (Libraryref,
+ TLIST [ID libid])])])]) ->
+ 8
(* *)
| ITEM2(Instance, TLIST [ID instid],
- TLIST [ITEM2(viewref,
- TLIST [ID netlist],
- TLIST [ITEM2(cellref,
- TLIST [ID cellid],
- TLIST [ITEM(libraryref,
- TLIST [ID libid])])]);
- ITEM2(property, TLIST [ID xstlib],
- TLIST [ITEM2(bool1,
- TLIST [],
- TLIST [ITEM(True, TLIST [])]);
- ITEM(owner, TLIST [str])])]) -> 9
+ TLIST [ITEM2(viewref,
+ TLIST [ID netlist],
+ TLIST [ITEM2(cellref,
+ TLIST [ID cellid],
+ TLIST [ITEM(libraryref,
+ TLIST [ID libid])])]);
+ ITEM2(property, TLIST [ID xstlib],
+ TLIST [ITEM2(bool1,
+ TLIST [],
+ TLIST [ITEM(True, TLIST [])]);
+ ITEM(owner, TLIST [str])])]) -> 9
(* *)
| ITEM2(Interface, TLIST [], TLIST lst) -> 100
| ITEM2(Joined, TLIST [], TLIST lst) -> 10
@@ -508,9 +515,13 @@ let test_match tok = match tok with
| ITEM2(Net, _, _) -> 16
| ITEM2(Port, TLIST [], TLIST lst) -> 17
| ITEM2(Port, TLIST [ID id], TLIST lst) -> 18
- | ITEM2(Portref, TLIST [ID id], TLIST [ITEM (Instanceref, TLIST [ID ref])]) ->19
- | ITEM2(Portref, TLIST [], TLIST [ITEM (Member, TLIST [ID mref; INT idx])]) -> 20
- | ITEM2(Portref, TLIST [], TLIST[ITEM (Member, TLIST [ID mref; INT idx]); ITEM (Instanceref, TLIST [ID instref])]) -> 21
+ | ITEM2(Portref, TLIST [ID id], TLIST [ITEM (Instanceref, TLIST [ID ref])]) ->
+ 19
+ | ITEM2(Portref, TLIST [], TLIST [ITEM (Member, TLIST [ID mref; INT idx])]) ->
+ 20
+ | ITEM2(Portref, TLIST [], TLIST[ITEM (Member, TLIST [ID mref; INT idx]);
+ ITEM (Instanceref, TLIST [ID instref])]) ->
+ 21
| ITEM2(Program, TLIST [STRING progid], TLIST lst) ->21
| ITEM2(Property, TLIST [ID part], TLIST lst) -> 22
| ITEM2(Status, TLIST lst1, TLIST lst2) -> 23
@@ -537,7 +548,9 @@ let test_match tok = match tok with
| ITEM (Rename, TLIST [ID id; STRING str]) -> 33
| ITEM (String, TLIST [STRING str]) -> 32
| ITEM (String, TLIST lst) -> 34
- | ITEM (Timestamp, TLIST [INT yr; INT mon; INT day; INT hour; INT min; INT sec]) -> 32
+ | ITEM (Timestamp, TLIST [INT yr; INT mon; INT day; INT hour; INT min;
+ INT sec]) ->
+ 32
| ITEM (Version, TLIST [STRING str]) -> 32
| ITEM (Viewtype, TLIST [ID "NETLIST"]) -> 32
| ITEM (Designator, TLIST lst) -> 34
@@ -895,7 +908,8 @@ let test_match tok = match tok with
| ITEM2(Ediflevel, _, _) -> failwith " ITEM2(Ediflevel, _, _) "
| ITEM2(Edifversion, _, _) -> failwith " ITEM2(Edifversion, _, _) "
| ITEM2(Else, _, _) -> failwith " ITEM2(Else, _, _) "
- | ITEM2(Enclosuredistance, _, _) -> failwith " ITEM2(Enclosuredistance, _, _) "
+ | ITEM2(Enclosuredistance, _, _) ->
+ failwith " ITEM2(Enclosuredistance, _, _) "
| ITEM2(Endtype, _, _) -> failwith " ITEM2(Endtype, _, _) "
| ITEM2(Entry, _, _) -> failwith " ITEM2(Entry, _, _) "
| ITEM2(Equal, _, _) -> failwith " ITEM2(Equal, _, _) "
@@ -908,8 +922,10 @@ let test_match tok = match tok with
| ITEM2(Figure, _, _) -> failwith " ITEM2(Figure, _, _) "
| ITEM2(Figurearea, _, _) -> failwith " ITEM2(Figurearea, _, _) "
| ITEM2(Figuregroup, _, _) -> failwith " ITEM2(Figuregroup, _, _) "
- | ITEM2(Figuregroupobject, _, _) -> failwith " ITEM2(Figuregroupobject, _, _) "
- | ITEM2(Figuregroupoverride, _, _) -> failwith " ITEM2(Figuregroupoverride, _, _) "
+ | ITEM2(Figuregroupobject, _, _) ->
+ failwith " ITEM2(Figuregroupobject, _, _) "
+ | ITEM2(Figuregroupoverride, _, _) ->
+ failwith " ITEM2(Figuregroupoverride, _, _) "
| ITEM2(Figuregroupref, _, _) -> failwith " ITEM2(Figuregroupref, _, _) "
| ITEM2(Figureperimeter, _, _) -> failwith " ITEM2(Figureperimeter, _, _) "
| ITEM2(Figurewidth, _, _) -> failwith " ITEM2(Figurewidth, _, _) "
@@ -924,11 +940,13 @@ let test_match tok = match tok with
| ITEM2(Gridmap, _, _) -> failwith " ITEM2(Gridmap, _, _) "
| ITEM2(If, _, _) -> failwith " ITEM2(If, _, _) "
| ITEM2(Ignore, _, _) -> failwith " ITEM2(Ignore, _, _) "
- | ITEM2(Includefiguregroup, _, _) -> failwith " ITEM2(Includefiguregroup, _, _) "
+ | ITEM2(Includefiguregroup, _, _) ->
+ failwith " ITEM2(Includefiguregroup, _, _) "
| ITEM2(Increasing, _, _) -> failwith " ITEM2(Increasing, _, _) "
| ITEM2(Initial, _, _) -> failwith " ITEM2(Initial, _, _) "
| ITEM2(Instance, arg1, arg2) -> failwith (" ITEM2(Instance, ) ")
- | ITEM2(Instancebackannotate, _, _) -> failwith " ITEM2(Instancebackannotate, _, _) "
+ | ITEM2(Instancebackannotate, _, _) ->
+ failwith " ITEM2(Instancebackannotate, _, _) "
| ITEM2(Instancegroup, _, _) -> failwith " ITEM2(Instancegroup, _, _) "
| ITEM2(Instancemap, _, _) -> failwith " ITEM2(Instancemap, _, _) "
| ITEM2(Instancenamedef, _, _) -> failwith " ITEM2(Instancenamedef, _, _) "
@@ -936,9 +954,11 @@ let test_match tok = match tok with
| ITEM2(Integer, _, _) -> failwith " ITEM2(Integer, _, _) "
| ITEM2(Integerdisplay, _, _) -> failwith " ITEM2(Integerdisplay, _, _) "
| ITEM2(Interface, _, _) -> failwith " ITEM2(Interface, _, _) "
- | ITEM2(Interfiguregroupspacing, _, _) -> failwith " ITEM2(Interfiguregroupspacing, _, _) "
+ | ITEM2(Interfiguregroupspacing, _, _) ->
+ failwith " ITEM2(Interfiguregroupspacing, _, _) "
| ITEM2(Intersection, _, _) -> failwith " ITEM2(Intersection, _, _) "
- | ITEM2(Intrafiguregroupspacing, _, _) -> failwith " ITEM2(Intrafiguregroupspacing, _, _) "
+ | ITEM2(Intrafiguregroupspacing, _, _) ->
+ failwith " ITEM2(Intrafiguregroupspacing, _, _) "
| ITEM2(Inverse, _, _) -> failwith " ITEM2(Inverse, _, _) "
| ITEM2(Isolated, _, _) -> failwith " ITEM2(Isolated, _, _) "
| ITEM2(Iterate, _, _) -> failwith " ITEM2(Iterate, _, _) "
@@ -1013,7 +1033,8 @@ let test_match tok = match tok with
| ITEM2(Pathdelay, _, _) -> failwith " ITEM2(Pathdelay, _, _) "
| ITEM2(Pathwidth, _, _) -> failwith " ITEM2(Pathwidth, _, _) "
| ITEM2(Permutable, _, _) -> failwith " ITEM2(Permutable, _, _) "
- | ITEM2(Physicaldesignrule, _, _) -> failwith " ITEM2(Physicaldesignrule, _, _) "
+ | ITEM2(Physicaldesignrule, _, _) ->
+ failwith " ITEM2(Physicaldesignrule, _, _) "
| ITEM2(Plug, _, _) -> failwith " ITEM2(Plug, _, _) "
| ITEM2(Point, _, _) -> failwith " ITEM2(Point, _, _) "
| ITEM2(Pointdisplay, _, _) -> failwith " ITEM2(Pointdisplay, _, _) "
@@ -1026,7 +1047,8 @@ let test_match tok = match tok with
| ITEM2(Portbundle, _, _) -> failwith " ITEM2(Portbundle, _, _) "
| ITEM2(Portdelay, _, _) -> failwith " ITEM2(Portdelay, _, _) "
| ITEM2(Portgroup, _, _) -> failwith " ITEM2(Portgroup, _, _) "
- | ITEM2(Portimplementation, _, _) -> failwith " ITEM2(Portimplementation, _, _) "
+ | ITEM2(Portimplementation, _, _) ->
+ failwith " ITEM2(Portimplementation, _, _) "
| ITEM2(Portinstance, _, _) -> failwith " ITEM2(Portinstance, _, _) "
| ITEM2(Portlist, _, _) -> failwith " ITEM2(Portlist, _, _) "
| ITEM2(Portlistalias, _, _) -> failwith " ITEM2(Portlistalias, _, _) "
@@ -1057,7 +1079,8 @@ let test_match tok = match tok with
| ITEM2(Statement, _, _) -> failwith " ITEM2(Statement, _, _) "
| ITEM2(Status, _, _) -> failwith " ITEM2(Status, _, _) "
| ITEM2(Steady, _, _) -> failwith " ITEM2(Steady, _, _) "
- | ITEM2(Strictlyincreasing, _, _) -> failwith " ITEM2(Strictlyincreasing, _, _) "
+ | ITEM2(Strictlyincreasing, _, _) ->
+ failwith " ITEM2(Strictlyincreasing, _, _) "
| ITEM2(String, _, _) -> failwith " ITEM2(String, _, _) "
| ITEM2(Stringdisplay, _, _) -> failwith " ITEM2(Stringdisplay, _, _) "
| ITEM2(Strong, _, _) -> failwith " ITEM2(Strong, _, _) "
@@ -1224,9 +1247,11 @@ let test_match tok = match tok with
| ITEM(Integer, _) -> failwith " ITEM(Integer, _) "
| ITEM(Integerdisplay, _) -> failwith " ITEM(Integerdisplay, _) "
| ITEM(Interface, _) -> failwith " ITEM(Interface, _) "
- | ITEM(Interfiguregroupspacing, _) -> failwith " ITEM(Interfiguregroupspacing, _) "
+ | ITEM(Interfiguregroupspacing, _) ->
+ failwith " ITEM(Interfiguregroupspacing, _) "
| ITEM(Intersection, _) -> failwith " ITEM(Intersection, _) "
- | ITEM(Intrafiguregroupspacing, _) -> failwith " ITEM(Intrafiguregroupspacing, _) "
+ | ITEM(Intrafiguregroupspacing, _) ->
+ failwith " ITEM(Intrafiguregroupspacing, _) "
| ITEM(Inverse, _) -> failwith " ITEM(Inverse, _) "
| ITEM(Isolated, _) -> failwith " ITEM(Isolated, _) "
| ITEM(Iterate, _) -> failwith " ITEM(Iterate, _) "
@@ -1401,7 +1426,8 @@ let test_match tok = match tok with
| ITEM(RPAREN, _) -> failwith " ITEM(RPAREN, _) "
| ITEM(EMPTY, _) -> failwith " ITEM(EMPTY, _) "
| ITEM ((ITEM _|ITEM2 _), _) -> failwith " ITEM ((ITEM _|ITEM2 _), _) "
- | ITEM2 ((ITEM _|ITEM2 _), _, _) -> failwith " ITEM2 ((ITEM _|ITEM2 _), _, _) "
+ | ITEM2 ((ITEM _|ITEM2 _), _, _) ->
+ failwith " ITEM2 ((ITEM _|ITEM2 _), _, _) "
let () = printf "PR#6646=Ok\n%!"
diff --git a/testsuite/tests/basic/stringmatch.ml b/testsuite/tests/basic/stringmatch.ml
index e1f4bdb471..c0bbbaae57 100644
--- a/testsuite/tests/basic/stringmatch.ml
+++ b/testsuite/tests/basic/stringmatch.ml
@@ -1,3 +1,15 @@
+(***********************************************************************)
+(* *)
+(* OCaml *)
+(* *)
+(* Luc Maranget, projet Gallium, INRIA Rocquencourt *)
+(* *)
+(* Copyright 2014 Institut National de Recherche en Informatique et *)
+(* en Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the Q Public License version 1.0. *)
+(* *)
+(***********************************************************************)
+
(* Empty string oddities *)
let rec tst01 s = match s with
diff --git a/testsuite/tests/formats-transition/ignored_scan_counters.ml b/testsuite/tests/formats-transition/ignored_scan_counters.ml
index 706a1af6f9..307f8a59cf 100644
--- a/testsuite/tests/formats-transition/ignored_scan_counters.ml
+++ b/testsuite/tests/formats-transition/ignored_scan_counters.ml
@@ -1,4 +1,4 @@
-(* Benoît's patch did not support %_[nlNL]; test their behavior *)
+(* Benoit's patch did not support %_[nlNL]; test their behavior *)
(* not supported by Printf or Format: fails at runtime *)
let () = Printf.printf "%_n"
diff --git a/testsuite/tests/formats-transition/invalid_formats.ml b/testsuite/tests/formats-transition/invalid_formats.ml
deleted file mode 100644
index 71f796b04b..0000000000
--- a/testsuite/tests/formats-transition/invalid_formats.ml
+++ /dev/null
@@ -1,4 +0,0 @@
-(* Empty file added to create a conflict with branch 4.02 because
- the test only makes sense on 4.02.x and will not work on 4.03+
- When merging, don't forget to remove also the .ml.reference file.
- *)
diff --git a/testsuite/tests/int64-unboxing/test.ml b/testsuite/tests/int64-unboxing/test.ml
index f4e7edb1ed..e0af54ca7b 100644
--- a/testsuite/tests/int64-unboxing/test.ml
+++ b/testsuite/tests/int64-unboxing/test.ml
@@ -17,7 +17,8 @@ external ( - ) : (int64 [@unboxed]) -> (int64 [@unboxed]) -> (int64 [@unboxed])
external ( * ) : (int64 [@unboxed]) -> (int64 [@unboxed]) -> (int64 [@unboxed])
= "" "noalloc" "test_int64_mul"
-external ignore_int64 : (int64 [@unboxed]) -> unit = "" "noalloc" "test_ignore_int64"
+external ignore_int64 :
+ (int64 [@unboxed]) -> unit = "" "noalloc" "test_ignore_int64"
let f () =
let r = ref 1L in
diff --git a/testsuite/tests/lib-bigarray/bigarrays.ml b/testsuite/tests/lib-bigarray/bigarrays.ml
index d5b2ec72e8..1f2b5ccbed 100644
--- a/testsuite/tests/lib-bigarray/bigarrays.ml
+++ b/testsuite/tests/lib-bigarray/bigarrays.ml
@@ -163,8 +163,9 @@ let _ =
set 1 vals;
a in
- (* Test indexing arrays. This test has to be copy-pasted, otherwise indexing may not
- use the optimizations in Cmmgen.bigarray_indexing. *)
+ (* Test indexing arrays. This test has to be copy-pasted, otherwise
+ indexing may not use the optimizations in
+ Cmmgen.bigarray_indexing. *)
begin
let v = 123 in
let cb = Array1.create int8_signed c_layout 1000 in
diff --git a/testsuite/tests/lib-dynlink-native/Makefile b/testsuite/tests/lib-dynlink-native/Makefile
index dc72a9f979..38d298e8e6 100644
--- a/testsuite/tests/lib-dynlink-native/Makefile
+++ b/testsuite/tests/lib-dynlink-native/Makefile
@@ -15,7 +15,8 @@ BASEDIR=../..
COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix \
-I $(OTOPDIR)/otherlibs/systhreads \
-I $(OTOPDIR)/otherlibs/dynlink
-LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/systhreads:$(TOPDIR)/otherlibs/dynlink
+LD_PATH = $(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/systhreads\
+:$(TOPDIR)/otherlibs/dynlink
.PHONY: default
default:
diff --git a/testsuite/tests/lib-num/test_big_ints.ml b/testsuite/tests/lib-num/test_big_ints.ml
index 36718b0d3d..96b71ca570 100644
--- a/testsuite/tests/lib-num/test_big_ints.ml
+++ b/testsuite/tests/lib-num/test_big_ints.ml
@@ -770,30 +770,38 @@ testing_function "big_int_of_int64";;
test 1 eq_big_int
(big_int_of_int64 0L, zero_big_int);;
test 2 eq_big_int
- (big_int_of_int64 9223372036854775807L, big_int_of_string "9223372036854775807");;
+ (big_int_of_int64 9223372036854775807L,
+ big_int_of_string "9223372036854775807");;
test 3 eq_big_int
- (big_int_of_int64 (-9223372036854775808L), big_int_of_string "-9223372036854775808");;
+ (big_int_of_int64 (-9223372036854775808L),
+ big_int_of_string "-9223372036854775808");;
test 4 eq_big_int (*PR#4792*)
- (big_int_of_int64 (Int64.of_int32 Int32.min_int), big_int_of_string "-2147483648");;
+ (big_int_of_int64 (Int64.of_int32 Int32.min_int),
+ big_int_of_string "-2147483648");;
test 5 eq_big_int
(big_int_of_int64 1234L, big_int_of_string "1234");;
test 6 eq_big_int
- (big_int_of_int64 0x1234567890ABCDEFL, big_int_of_string "1311768467294899695");;
+ (big_int_of_int64 0x1234567890ABCDEFL,
+ big_int_of_string "1311768467294899695");;
test 7 eq_big_int
(big_int_of_int64 (-1234L), big_int_of_string "-1234");;
test 8 eq_big_int
- (big_int_of_int64 (-0x1234567890ABCDEFL), big_int_of_string "-1311768467294899695");;
+ (big_int_of_int64 (-0x1234567890ABCDEFL),
+ big_int_of_string "-1311768467294899695");;
testing_function "int64_of_big_int";;
test 1 eq_int64
(int64_of_big_int zero_big_int, 0L);;
test 2 eq_int64
- (int64_of_big_int (big_int_of_string "9223372036854775807"), 9223372036854775807L);;
+ (int64_of_big_int (big_int_of_string "9223372036854775807"),
+ 9223372036854775807L);;
test 3 eq_int64
- (int64_of_big_int (big_int_of_string "-9223372036854775808"), -9223372036854775808L);;
+ (int64_of_big_int (big_int_of_string "-9223372036854775808"),
+ -9223372036854775808L);;
test 4 eq_int64
- (int64_of_big_int (big_int_of_string "-9223372036854775"), -9223372036854775L);;
+ (int64_of_big_int (big_int_of_string "-9223372036854775"),
+ -9223372036854775L);;
test 5 eq_int64 (* PR#4804 *)
(int64_of_big_int (big_int_of_string "2147483648"), 2147483648L);;
let should_fail s =
@@ -908,7 +916,9 @@ test 3 eq_big_int
(shift_right_big_int (big_int_of_string "5299989648942") 32,
big_int_of_int 1234);;
test 4 eq_big_int
- (shift_right_big_int (big_int_of_string "5846006549323611672814739330865132078623730171904") 67,
+ (shift_right_big_int (big_int_of_string
+ "5846006549323611672814739330865132078623730171904")
+ 67,
big_int_of_string "39614081257132168796771975168");;
test 5 eq_big_int
(shift_right_big_int (big_int_of_string "-5299989648942") 32,
@@ -923,7 +933,9 @@ test 1 eq_big_int
(shift_right_towards_zero_big_int (big_int_of_string "-5299989648942") 32,
big_int_of_int (-1234));;
test 2 eq_big_int
- (shift_right_towards_zero_big_int (big_int_of_string "-16570089876543209725755392") 27,
+ (shift_right_towards_zero_big_int (big_int_of_string
+ "-16570089876543209725755392")
+ 27,
big_int_of_string "-123456790123456789");;
testing_function "extract_big_int";;
@@ -956,7 +968,8 @@ test 9 eq_big_int
(extract_big_int (minus_big_int (power_int_positive_int 2 64)) 64 20,
big_int_of_int 0xFFFFF);;
test 10 eq_big_int
- (extract_big_int (pred_big_int (minus_big_int (power_int_positive_int 2 64))) 64 20,
+ (extract_big_int (pred_big_int (minus_big_int (power_int_positive_int 2 64)))
+ 64 20,
big_int_of_int 0xFFFFE);;
testing_function "hashing of big integers";;
diff --git a/testsuite/tests/lib-num/test_ratios.ml b/testsuite/tests/lib-num/test_ratios.ml
index 69f0626600..087d0fcae0 100644
--- a/testsuite/tests/lib-num/test_ratios.ml
+++ b/testsuite/tests/lib-num/test_ratios.ml
@@ -1205,4 +1205,3 @@ for i = 1 to 100 do
done;
test 1 eq (!ok, true)
;;
-
diff --git a/testsuite/tests/lib-str/t01.ml b/testsuite/tests/lib-str/t01.ml
index 0a562b100c..1f9ebd2426 100644
--- a/testsuite/tests/lib-str/t01.ml
+++ b/testsuite/tests/lib-str/t01.ml
@@ -502,7 +502,9 @@ let automated_test() =
[||];
start_test "Search for /^[a-z0-9][a-z0-9-]*\\(\\.[a-z0-9][A-Z0-9-]*\\)*\\.$/";
- let r = Str.regexp_case_fold "^[a-z0-9][a-z0-9-]*\\(\\.[a-z0-9][A-Z0-9-]*\\)*\\.$" in
+ let r =
+ Str.regexp_case_fold "^[a-z0-9][a-z0-9-]*\\(\\.[a-z0-9][A-Z0-9-]*\\)*\\.$"
+ in
let n = 1 in
test_search_forward r n "a."
[|"a."; "~"|];
@@ -523,8 +525,12 @@ let automated_test() =
test_search_forward r n "-abc.peq."
[||];
- start_test "Search for /^\\*\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\\(\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\\)*$/";
- let r = Str.regexp "^\\*\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\\(\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\\)*$" in
+ start_test "Search for /^\\*\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\
+ \\(\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\\)*$/";
+ let r =
+ Str.regexp "^\\*\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\
+ \\(\\.[a-z]\\([a-z0-9-]*[a-z0-9]+\\)?\\)*$"
+ in
let n = 3 in
test_search_forward r n "*.a"
[|"*.a"; "~"; "~"; "~"|];
@@ -569,8 +575,12 @@ let automated_test() =
test_search_forward r n "\"1234\" : things"
[||];
- start_test "Search for /^\\(a\\(b\\(c\\)\\)\\)\\(d\\(e\\(f\\)\\)\\)\\(h\\(i\\(j\\)\\)\\)$/";
- let r = Str.regexp "^\\(a\\(b\\(c\\)\\)\\)\\(d\\(e\\(f\\)\\)\\)\\(h\\(i\\(j\\)\\)\\)$" in
+ start_test "Search for /^\\(a\\(b\\(c\\)\\)\\)\\(d\\(e\\(f\\)\\)\\)\
+ \\(h\\(i\\(j\\)\\)\\)$/";
+ let r =
+ Str.regexp "^\\(a\\(b\\(c\\)\\)\\)\\(d\\(e\\(f\\)\\)\\)\
+ \\(h\\(i\\(j\\)\\)\\)$"
+ in
let n = 9 in
test_search_forward r n "abcdefhij"
[|"abcdefhij"; "abc"; "bc"; "c"; "def"; "ef"; "f"; "hij"; "ij"; "j"|];
@@ -581,8 +591,11 @@ let automated_test() =
test_search_forward r n ".^$*(+)|{?,?}"
[|".^$*(+)|{?,?}"|];
- start_test "Search for /\\(cat\\(a\\(ract\\|tonic\\)\\|erpillar\\)\\) \\1\\(\\)2\\(3\\)/";
- let r = Str.regexp "\\(cat\\(a\\(ract\\|tonic\\)\\|erpillar\\)\\) \\1\\(\\)2\\(3\\)" in
+ start_test "Search for /\\(cat\\(a\\(ract\\|tonic\\)\\|erpillar\\)\\) \
+ \\1\\(\\)2\\(3\\)/";
+ let r =
+ Str.regexp "\\(cat\\(a\\(ract\\|tonic\\)\\|erpillar\\)\\) \\1\\(\\)2\\(3\\)"
+ in
let n = 5 in
test_search_forward r n "cataract cataract23"
[|"cataract cataract23"; "cataract"; "aract"; "ract"; ""; "3"|];
@@ -591,8 +604,12 @@ let automated_test() =
test_search_forward r n "caterpillar caterpillar23"
[|"caterpillar caterpillar23"; "caterpillar"; "erpillar"; "~"; ""; "3"|];
- start_test "Search for /^From +\\([^ ]+\\) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/";
- let r = Str.regexp "^From +\\([^ ]+\\) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]" in
+ start_test "Search for /^From +\\([^ ]+\\) +[a-zA-Z][a-zA-Z][a-zA-Z] \
+ +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/";
+ let r =
+ Str.regexp "^From +\\([^ ]+\\) +[a-zA-Z][a-zA-Z][a-zA-Z] \
+ +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]"
+ in
let n = 1 in
test_search_forward r n "From abcd Mon Sep 01 12:33:02 1997"
[|"From abcd Mon Sep 01 12:33"; "abcd"|];
@@ -776,19 +793,38 @@ let automated_test() =
let _NameChar = "[A-Za-z0-9_:.-]\\|[^\x00-\x7F]" in
let _Name = "\\(" ^ _NameStrt ^ "\\)\\(" ^ _NameChar ^ "\\)*" in
let _QuoteSE = "\"[^\"]*\"\\|'[^']*'" in
- let _DT_IdentSE = _S ^ _Name ^ "\\(" ^ _S ^ "\\(" ^ _Name ^ "\\|" ^ _QuoteSE ^ "\\)\\)*" in
+ let _DT_IdentSE =
+ _S ^ _Name ^ "\\(" ^ _S ^ "\\(" ^ _Name ^ "\\|" ^ _QuoteSE ^ "\\)\\)*"
+ in
let _MarkupDeclCE = "\\([^]\"'><]\\|" ^ _QuoteSE ^ "\\)*>" in
let _S1 = "[\n\r\t ]" in
let _UntilQMs = "[^?]*\\?+" in
- let _PI_Tail = "\\?>\\|" ^ _S1 ^ _UntilQMs ^ "\\([^>?]" ^ _UntilQMs ^ "\\)*>" in
- let _DT_ItemSE = "<\\(!\\(--" ^ _Until2Hyphens ^ ">\\|[^-]" ^ _MarkupDeclCE ^ "\\)\\|\\?" ^ _Name ^ "\\(" ^ _PI_Tail ^ "\\)\\)\\|%" ^ _Name ^ ";\\|" ^ _S1 in
- let _DocTypeCE = _DT_IdentSE ^ "\\(" ^ _S ^ "\\)?\\(\\[\\(" ^ _DT_ItemSE ^ "\\)*]\\(" ^ _S ^ "\\)?\\)?>?" in
- let _DeclCE = "--\\(" ^ _CommentCE ^ "\\)?\\|\\[_CDATA\\[\\(" ^ _CDATA_CE ^ "\\)?\\|_DOCTYPE\\(" ^ _DocTypeCE ^ "\\)?" in
+ let _PI_Tail =
+ "\\?>\\|" ^ _S1 ^ _UntilQMs ^ "\\([^>?]" ^ _UntilQMs ^ "\\)*>"
+ in
+ let _DT_ItemSE =
+ "<\\(!\\(--" ^ _Until2Hyphens ^ ">\\|[^-]" ^ _MarkupDeclCE ^ "\\)\\|\\?"
+ ^ _Name ^ "\\(" ^ _PI_Tail ^ "\\)\\)\\|%" ^ _Name ^ ";\\|" ^ _S1
+ in
+ let _DocTypeCE =
+ _DT_IdentSE ^ "\\(" ^ _S ^ "\\)?\\(\\[\\(" ^ _DT_ItemSE ^ "\\)*]\\("
+ ^ _S ^ "\\)?\\)?>?"
+ in
+ let _DeclCE =
+ "--\\(" ^ _CommentCE ^ "\\)?\\|\\[_CDATA\\[\\(" ^ _CDATA_CE
+ ^ "\\)?\\|_DOCTYPE\\(" ^ _DocTypeCE ^ "\\)?"
+ in
let _PI_CE = _Name ^ "\\(" ^ _PI_Tail ^ "\\)?" in
let _EndTagCE = _Name ^ "\\(" ^ _S ^ "\\)?>?" in
let _AttValSE = "\"[^<\"]*\"\\|'[^<']*'" in
- let _ElemTagCE = _Name ^ "\\(" ^ _S ^ _Name ^ "\\(" ^ _S ^ "\\)?=\\(" ^ _S ^ "\\)?\\(" ^ _AttValSE ^ "\\)\\)*\\(" ^ _S ^ "\\)?/?>?" in
- let _MarkupSPE = "<\\(!\\(" ^ _DeclCE ^ "\\)?\\|\\?\\(" ^ _PI_CE ^ "\\)?\\|/\\(" ^ _EndTagCE ^ "\\)?\\|\\(" ^ _ElemTagCE ^ "\\)?\\)" in
+ let _ElemTagCE =
+ _Name ^ "\\(" ^ _S ^ _Name ^ "\\(" ^ _S ^ "\\)?=\\(" ^ _S ^ "\\)?\\("
+ ^ _AttValSE ^ "\\)\\)*\\(" ^ _S ^ "\\)?/?>?"
+ in
+ let _MarkupSPE =
+ "<\\(!\\(" ^ _DeclCE ^ "\\)?\\|\\?\\(" ^ _PI_CE ^ "\\)?\\|/\\("
+ ^ _EndTagCE ^ "\\)?\\|\\(" ^ _ElemTagCE ^ "\\)?\\)"
+ in
let _XML_SPE = _TextSE ^ "\\|" ^ _MarkupSPE in
let input = "\
<?xml version=\"1.0\"?>
@@ -974,7 +1010,29 @@ escaped text]]>
"\n";
"</food>";
"\n";
- "<!--\n<food>\n\t<name></name>\n\t<mfr></mfr>\n\t<serving units=\"g\"></serving>\n\t<calories total=\"\" fat=\"\"/>\n\t<total-fat></total-fat>\n\t<saturated-fat></saturated-fat>\n\t<cholesterol></cholesterol>\n\t<sodium></sodium>\n\t<carb></carb>\n\t<fiber></fiber>\n\t<protein></protein>\n\t<vitamins>\n\t\t<a></a>\n\t\t<c></c>\n\t</vitamins>\n\t<minerals>\n\t\t<ca></ca>\n\t\t<fe></fe>\n\t</minerals>\n</food>\n-->";
+ "<!--\n\
+ <food>\n\
+ \t<name></name>\n\
+ \t<mfr></mfr>\n\
+ \t<serving units=\"g\"></serving>\n\
+ \t<calories total=\"\" fat=\"\"/>\n\
+ \t<total-fat></total-fat>\n\
+ \t<saturated-fat></saturated-fat>\n\
+ \t<cholesterol></cholesterol>\n\
+ \t<sodium></sodium>\n\
+ \t<carb></carb>\n\
+ \t<fiber></fiber>\n\
+ \t<protein></protein>\n\
+ \t<vitamins>\n\
+ \t\t<a></a>\n\
+ \t\t<c></c>\n\
+ \t</vitamins>\n\
+ \t<minerals>\n\
+ \t\t<ca></ca>\n\
+ \t\t<fe></fe>\n\
+ \t</minerals>\n\
+ </food>\n\
+ -->";
"\n"] in
let re = Str.regexp _XML_SPE in
let rec process i l =
diff --git a/testsuite/tests/match-exception/allocation.ml b/testsuite/tests/match-exception/allocation.ml
index fa943ffa3f..72055c3a2e 100644
--- a/testsuite/tests/match-exception/allocation.ml
+++ b/testsuite/tests/match-exception/allocation.ml
@@ -15,7 +15,8 @@ let test_multiple_match_does_not_allocate =
let allocated_bytes'' = Gc.allocated_bytes () in
let _ = f a b in
let allocated_bytes''' = Gc.allocated_bytes () in
- if allocated_bytes' -. allocated_bytes = allocated_bytes''' -. allocated_bytes''
+ if allocated_bytes' -. allocated_bytes
+ = allocated_bytes''' -. allocated_bytes''
then
Printf.printf "no allocations for multiple-value match\n"
else
diff --git a/testsuite/tests/match-exception/exception_propagation.ml b/testsuite/tests/match-exception/exception_propagation.ml
index 38d2cfd689..eedde78417 100644
--- a/testsuite/tests/match-exception/exception_propagation.ml
+++ b/testsuite/tests/match-exception/exception_propagation.ml
@@ -3,7 +3,7 @@
*)
let () =
try
- match
+ match
(let _ = raise Not_found in
assert false)
with
diff --git a/testsuite/tests/match-exception/match_failure.ml b/testsuite/tests/match-exception/match_failure.ml
index c6149bf3bd..40c60595f7 100644
--- a/testsuite/tests/match-exception/match_failure.ml
+++ b/testsuite/tests/match-exception/match_failure.ml
@@ -5,8 +5,8 @@ let return_some_3 () = Some (1 + 2)
;;
let test_match_partial_match =
- try
- let _ = (match return_some_3 () with
+ try
+ let _ = (match return_some_3 () with
| Some x when x < 3 -> "Some x"
| exception Failure _ -> "failure"
| exception Invalid_argument _ -> "invalid argument"
diff --git a/testsuite/tests/match-exception/nested_handlers.ml b/testsuite/tests/match-exception/nested_handlers.ml
index 0314cb103b..7f2a6514c3 100644
--- a/testsuite/tests/match-exception/nested_handlers.ml
+++ b/testsuite/tests/match-exception/nested_handlers.ml
@@ -7,8 +7,8 @@ let test_multiple_handlers =
let collect v = trace := v :: !trace in
let _ =
match
- begin
- match
+ begin
+ match
begin
collect "one";
failwith "two"
@@ -17,14 +17,14 @@ let test_multiple_handlers =
() -> collect "failure one"
| exception (Failure x) ->
collect x;
- failwith "three"
+ failwith "three"
end
with
- () ->
+ () ->
collect "failure two";
| exception (Failure x) ->
collect x;
- match
+ match
begin
collect "four";
failwith "five"
diff --git a/testsuite/tests/match-exception/streams.ml b/testsuite/tests/match-exception/streams.ml
index 42e9a5f1da..43a3151055 100644
--- a/testsuite/tests/match-exception/streams.ml
+++ b/testsuite/tests/match-exception/streams.ml
@@ -17,7 +17,7 @@ let make_stream_up_to n =
let stream_get (Stream (x, s)) = (x, Lazy.force s)
;;
-let rec iter_stream_match f s =
+let rec iter_stream_match f s =
match stream_get s
with exception End_of_stream -> ()
| (x, s') ->
@@ -26,7 +26,7 @@ let rec iter_stream_match f s =
iter_stream_match f s'
end
;;
-
+
let test_iter_stream =
let limit = 10000000 in
try
diff --git a/testsuite/tests/misc-unsafe/almabench.ml b/testsuite/tests/misc-unsafe/almabench.ml
index e5cdf36c3b..2fe54177e6 100644
--- a/testsuite/tests/misc-unsafe/almabench.ml
+++ b/testsuite/tests/misc-unsafe/almabench.ml
@@ -47,7 +47,8 @@ and test_length = 36525
and sineps = 0.3977771559319137
and coseps = 0.9174820620691818
-and amas = [| 6023600.0; 408523.5; 328900.5; 3098710.0; 1047.355; 3498.5; 22869.0; 19314.0 |]
+and amas = [| 6023600.0; 408523.5; 328900.5; 3098710.0;
+ 1047.355; 3498.5; 22869.0; 19314.0 |]
(*
* tables giving the mean keplerian elements, limited to t**2 terms:
diff --git a/testsuite/tests/tool-ocaml/t340-weak.ml b/testsuite/tests/tool-ocaml/t340-weak.ml
index e36dbab503..7ced585dcc 100644
--- a/testsuite/tests/tool-ocaml/t340-weak.ml
+++ b/testsuite/tests/tool-ocaml/t340-weak.ml
@@ -22,2530 +22,3 @@ for i = 0 to 19 do
| _ -> raise Not_found
done
;;
-
-(**
- 0 CONSTINT 42
- 2 PUSHACC0
- 3 MAKEBLOCK1 0
- 5 POP 1
- 7 SETGLOBAL Lib
- 9 BRANCH 746
- 11 RESTART
- 12 GRAB 1
- 14 ACC0
- 15 BRANCHIFNOT 28
- 17 ACC1
- 18 PUSHACC1
- 19 GETFIELD1
- 20 PUSHOFFSETCLOSURE0
- 21 APPLY2
- 22 PUSHACC1
- 23 GETFIELD0
- 24 MAKEBLOCK2 0
- 26 RETURN 2
- 28 ACC1
- 29 RETURN 2
- 31 RESTART
- 32 GRAB 3
- 34 CONST0
- 35 PUSHACC4
- 36 LEINT
- 37 BRANCHIFNOT 42
- 39 CONST0
- 40 RETURN 4
- 42 ACC3
- 43 PUSHACC3
- 44 PUSHACC3
- 45 PUSHACC3
- 46 C_CALL4 caml_input
- 48 PUSHCONST0
- 49 PUSHACC1
- 50 EQ
- 51 BRANCHIFNOT 58
- 53 GETGLOBAL End_of_file
- 55 MAKEBLOCK1 0
- 57 RAISE
- 58 ACC0
- 59 PUSHACC5
- 60 SUBINT
- 61 PUSHACC1
- 62 PUSHACC5
- 63 ADDINT
- 64 PUSHACC4
- 65 PUSHACC4
- 66 PUSHOFFSETCLOSURE0
- 67 APPTERM 4, 9
- 70 ACC0
- 71 C_CALL1 caml_input_scan_line
- 73 PUSHCONST0
- 74 PUSHACC1
- 75 EQ
- 76 BRANCHIFNOT 83
- 78 GETGLOBAL End_of_file
- 80 MAKEBLOCK1 0
- 82 RAISE
- 83 CONST0
- 84 PUSHACC1
- 85 GTINT
- 86 BRANCHIFNOT 107
- 88 ACC0
- 89 OFFSETINT -1
- 91 C_CALL1 create_string
- 93 PUSHACC1
- 94 OFFSETINT -1
- 96 PUSHCONST0
- 97 PUSHACC2
- 98 PUSHACC5
- 99 C_CALL4 caml_input
- 101 ACC2
- 102 C_CALL1 caml_input_char
- 104 ACC0
- 105 RETURN 3
- 107 ACC0
- 108 NEGINT
- 109 C_CALL1 create_string
- 111 PUSHACC1
- 112 NEGINT
- 113 PUSHCONST0
- 114 PUSHACC2
- 115 PUSHACC5
- 116 C_CALL4 caml_input
- 118 CONST0
- 119 PUSHTRAP 130
- 121 ACC6
- 122 PUSHOFFSETCLOSURE0
- 123 APPLY1
- 124 PUSHACC5
- 125 PUSHENVACC1
- 126 APPLY2
- 127 POPTRAP
- 128 RETURN 3
- 130 PUSHGETGLOBAL End_of_file
- 132 PUSHACC1
- 133 GETFIELD0
- 134 EQ
- 135 BRANCHIFNOT 140
- 137 ACC1
- 138 RETURN 4
- 140 ACC0
- 141 RAISE
- 142 ACC0
- 143 C_CALL1 caml_flush
- 145 RETURN 1
- 147 RESTART
- 148 GRAB 1
- 150 ACC1
- 151 PUSHACC1
- 152 C_CALL2 caml_output_char
- 154 RETURN 2
- 156 RESTART
- 157 GRAB 1
- 159 ACC1
- 160 PUSHACC1
- 161 C_CALL2 caml_output_char
- 163 RETURN 2
- 165 RESTART
- 166 GRAB 1
- 168 ACC1
- 169 PUSHACC1
- 170 C_CALL2 caml_output_int
- 172 RETURN 2
- 174 RESTART
- 175 GRAB 1
- 177 ACC1
- 178 PUSHACC1
- 179 C_CALL2 caml_seek_out
- 181 RETURN 2
- 183 ACC0
- 184 C_CALL1 caml_pos_out
- 186 RETURN 1
- 188 ACC0
- 189 C_CALL1 caml_channel_size
- 191 RETURN 1
- 193 RESTART
- 194 GRAB 1
- 196 ACC1
- 197 PUSHACC1
- 198 C_CALL2 caml_set_binary_mode
- 200 RETURN 2
- 202 ACC0
- 203 C_CALL1 caml_input_char
- 205 RETURN 1
- 207 ACC0
- 208 C_CALL1 caml_input_char
- 210 RETURN 1
- 212 ACC0
- 213 C_CALL1 caml_input_int
- 215 RETURN 1
- 217 ACC0
- 218 C_CALL1 input_value
- 220 RETURN 1
- 222 RESTART
- 223 GRAB 1
- 225 ACC1
- 226 PUSHACC1
- 227 C_CALL2 caml_seek_in
- 229 RETURN 2
- 231 ACC0
- 232 C_CALL1 caml_pos_in
- 234 RETURN 1
- 236 ACC0
- 237 C_CALL1 caml_channel_size
- 239 RETURN 1
- 241 ACC0
- 242 C_CALL1 caml_close_channel
- 244 RETURN 1
- 246 RESTART
- 247 GRAB 1
- 249 ACC1
- 250 PUSHACC1
- 251 C_CALL2 caml_set_binary_mode
- 253 RETURN 2
- 255 CONST0
- 256 PUSHENVACC1
- 257 APPLY1
- 258 ACC0
- 259 C_CALL1 sys_exit
- 261 RETURN 1
- 263 CONST0
- 264 PUSHENVACC1
- 265 GETFIELD0
- 266 APPTERM1 2
- 268 CONST0
- 269 PUSHENVACC1
- 270 APPLY1
- 271 CONST0
- 272 PUSHENVACC2
- 273 APPTERM1 2
- 275 ENVACC1
- 276 GETFIELD0
- 277 PUSHACC0
- 278 PUSHACC2
- 279 CLOSURE 2, 268
- 282 PUSHENVACC1
- 283 SETFIELD0
- 284 RETURN 2
- 286 ENVACC1
- 287 C_CALL1 caml_flush
- 289 ENVACC2
- 290 C_CALL1 caml_flush
- 292 RETURN 1
- 294 CONST0
- 295 PUSHENVACC1
- 296 APPLY1
- 297 C_CALL1 float_of_string
- 299 RETURN 1
- 301 CONST0
- 302 PUSHENVACC1
- 303 APPLY1
- 304 C_CALL1 int_of_string
- 306 RETURN 1
- 308 ENVACC2
- 309 C_CALL1 caml_flush
- 311 ENVACC1
- 312 PUSHENVACC3
- 313 APPTERM1 2
- 315 CONSTINT 13
- 317 PUSHENVACC1
- 318 C_CALL2 caml_output_char
- 320 ENVACC1
- 321 C_CALL1 caml_flush
- 323 RETURN 1
- 325 ACC0
- 326 PUSHENVACC1
- 327 PUSHENVACC2
- 328 APPLY2
- 329 CONSTINT 13
- 331 PUSHENVACC1
- 332 C_CALL2 caml_output_char
- 334 ENVACC1
- 335 C_CALL1 caml_flush
- 337 RETURN 1
- 339 ACC0
- 340 PUSHENVACC1
- 341 APPLY1
- 342 PUSHENVACC2
- 343 PUSHENVACC3
- 344 APPTERM2 3
- 346 ACC0
- 347 PUSHENVACC1
- 348 APPLY1
- 349 PUSHENVACC2
- 350 PUSHENVACC3
- 351 APPTERM2 3
- 353 ACC0
- 354 PUSHENVACC1
- 355 PUSHENVACC2
- 356 APPTERM2 3
- 358 ACC0
- 359 PUSHENVACC1
- 360 C_CALL2 caml_output_char
- 362 RETURN 1
- 364 CONSTINT 13
- 366 PUSHENVACC1
- 367 C_CALL2 caml_output_char
- 369 ENVACC1
- 370 C_CALL1 caml_flush
- 372 RETURN 1
- 374 ACC0
- 375 PUSHENVACC1
- 376 PUSHENVACC2
- 377 APPLY2
- 378 CONSTINT 13
- 380 PUSHENVACC1
- 381 C_CALL2 caml_output_char
- 383 RETURN 1
- 385 ACC0
- 386 PUSHENVACC1
- 387 APPLY1
- 388 PUSHENVACC2
- 389 PUSHENVACC3
- 390 APPTERM2 3
- 392 ACC0
- 393 PUSHENVACC1
- 394 APPLY1
- 395 PUSHENVACC2
- 396 PUSHENVACC3
- 397 APPTERM2 3
- 399 ACC0
- 400 PUSHENVACC1
- 401 PUSHENVACC2
- 402 APPTERM2 3
- 404 ACC0
- 405 PUSHENVACC1
- 406 C_CALL2 caml_output_char
- 408 RETURN 1
- 410 RESTART
- 411 GRAB 3
- 413 CONST0
- 414 PUSHACC3
- 415 LTINT
- 416 BRANCHIF 427
- 418 ACC1
- 419 C_CALL1 ml_string_length
- 421 PUSHACC4
- 422 PUSHACC4
- 423 ADDINT
- 424 GTINT
- 425 BRANCHIFNOT 432
- 427 GETGLOBAL "really_input"
- 429 PUSHENVACC1
- 430 APPTERM1 5
- 432 ACC3
- 433 PUSHACC3
- 434 PUSHACC3
- 435 PUSHACC3
- 436 PUSHENVACC2
- 437 APPTERM 4, 8
- 440 RESTART
- 441 GRAB 3
- 443 CONST0
- 444 PUSHACC3
- 445 LTINT
- 446 BRANCHIF 457
- 448 ACC1
- 449 C_CALL1 ml_string_length
- 451 PUSHACC4
- 452 PUSHACC4
- 453 ADDINT
- 454 GTINT
- 455 BRANCHIFNOT 462
- 457 GETGLOBAL "input"
- 459 PUSHENVACC1
- 460 APPTERM1 5
- 462 ACC3
- 463 PUSHACC3
- 464 PUSHACC3
- 465 PUSHACC3
- 466 C_CALL4 caml_input
- 468 RETURN 4
- 470 ACC0
- 471 PUSHCONST0
- 472 PUSHGETGLOBAL <0>(0, <0>(6, 0))
- 474 PUSHENVACC1
- 475 APPTERM3 4
- 477 ACC0
- 478 PUSHCONST0
- 479 PUSHGETGLOBAL <0>(0, <0>(7, 0))
- 481 PUSHENVACC1
- 482 APPTERM3 4
- 484 RESTART
- 485 GRAB 2
- 487 ACC1
- 488 PUSHACC1
- 489 PUSHACC4
- 490 C_CALL3 sys_open
- 492 C_CALL1 caml_open_descriptor
- 494 RETURN 3
- 496 ACC0
- 497 C_CALL1 caml_flush
- 499 ACC0
- 500 C_CALL1 caml_close_channel
- 502 RETURN 1
- 504 RESTART
- 505 GRAB 1
- 507 CONST0
- 508 PUSHACC2
- 509 PUSHACC2
- 510 C_CALL3 output_value
- 512 RETURN 2
- 514 RESTART
- 515 GRAB 3
- 517 CONST0
- 518 PUSHACC3
- 519 LTINT
- 520 BRANCHIF 531
- 522 ACC1
- 523 C_CALL1 ml_string_length
- 525 PUSHACC4
- 526 PUSHACC4
- 527 ADDINT
- 528 GTINT
- 529 BRANCHIFNOT 536
- 531 GETGLOBAL "output"
- 533 PUSHENVACC1
- 534 APPTERM1 5
- 536 ACC3
- 537 PUSHACC3
- 538 PUSHACC3
- 539 PUSHACC3
- 540 C_CALL4 caml_output
- 542 RETURN 4
- 544 RESTART
- 545 GRAB 1
- 547 ACC1
- 548 C_CALL1 ml_string_length
- 550 PUSHCONST0
- 551 PUSHACC3
- 552 PUSHACC3
- 553 C_CALL4 caml_output
- 555 RETURN 2
- 557 ACC0
- 558 PUSHCONSTINT 438
- 560 PUSHGETGLOBAL <0>(1, <0>(3, <0>(4, <0>(6, 0))))
- 562 PUSHENVACC1
- 563 APPTERM3 4
- 565 ACC0
- 566 PUSHCONSTINT 438
- 568 PUSHGETGLOBAL <0>(1, <0>(3, <0>(4, <0>(7, 0))))
- 570 PUSHENVACC1
- 571 APPTERM3 4
- 573 RESTART
- 574 GRAB 2
- 576 ACC1
- 577 PUSHACC1
- 578 PUSHACC4
- 579 C_CALL3 sys_open
- 581 C_CALL1 caml_open_descriptor
- 583 RETURN 3
- 585 ACC0
- 586 PUSHGETGLOBAL "%.12g"
- 588 C_CALL2 format_float
- 590 RETURN 1
- 592 ACC0
- 593 PUSHGETGLOBAL "%d"
- 595 C_CALL2 format_int
- 597 RETURN 1
- 599 GETGLOBAL "false"
- 601 PUSHACC1
- 602 C_CALL2 string_equal
- 604 BRANCHIFNOT 609
- 606 CONST0
- 607 RETURN 1
- 609 GETGLOBAL "true"
- 611 PUSHACC1
- 612 C_CALL2 string_equal
- 614 BRANCHIFNOT 619
- 616 CONST1
- 617 RETURN 1
- 619 GETGLOBAL "bool_of_string"
- 621 PUSHENVACC1
- 622 APPTERM1 2
- 624 ACC0
- 625 BRANCHIFNOT 631
- 627 GETGLOBAL "true"
- 629 RETURN 1
- 631 GETGLOBAL "false"
- 633 RETURN 1
- 635 CONST0
- 636 PUSHACC1
- 637 LTINT
- 638 BRANCHIF 646
- 640 CONSTINT 255
- 642 PUSHACC1
- 643 GTINT
- 644 BRANCHIFNOT 651
- 646 GETGLOBAL "char_of_int"
- 648 PUSHENVACC1
- 649 APPTERM1 2
- 651 ACC0
- 652 RETURN 1
- 654 RESTART
- 655 GRAB 1
- 657 ACC0
- 658 C_CALL1 ml_string_length
- 660 PUSHACC2
- 661 C_CALL1 ml_string_length
- 663 PUSHACC0
- 664 PUSHACC2
- 665 ADDINT
- 666 C_CALL1 create_string
- 668 PUSHACC2
- 669 PUSHCONST0
- 670 PUSHACC2
- 671 PUSHCONST0
- 672 PUSHACC7
- 673 C_CALL5 blit_string
- 675 ACC1
- 676 PUSHACC3
- 677 PUSHACC2
- 678 PUSHCONST0
- 679 PUSHACC 8
- 681 C_CALL5 blit_string
- 683 ACC0
- 684 RETURN 5
- 686 CONSTINT -1
- 688 PUSHACC1
- 689 XORINT
- 690 RETURN 1
- 692 CONST0
- 693 PUSHACC1
- 694 GEINT
- 695 BRANCHIFNOT 700
- 697 ACC0
- 698 RETURN 1
- 700 ACC0
- 701 NEGINT
- 702 RETURN 1
- 704 RESTART
- 705 GRAB 1
- 707 ACC1
- 708 PUSHACC1
- 709 C_CALL2 greaterequal
- 711 BRANCHIFNOT 716
- 713 ACC0
- 714 RETURN 2
- 716 ACC1
- 717 RETURN 2
- 719 RESTART
- 720 GRAB 1
- 722 ACC1
- 723 PUSHACC1
- 724 C_CALL2 lessequal
- 726 BRANCHIFNOT 731
- 728 ACC0
- 729 RETURN 2
- 731 ACC1
- 732 RETURN 2
- 734 ACC0
- 735 PUSHGETGLOBAL Invalid_argument
- 737 MAKEBLOCK2 0
- 739 RAISE
- 740 ACC0
- 741 PUSHGETGLOBAL Failure
- 743 MAKEBLOCK2 0
- 745 RAISE
- 746 CLOSURE 0, 740
- 749 PUSH
- 750 CLOSURE 0, 734
- 753 PUSHGETGLOBAL "Pervasives.Exit"
- 755 MAKEBLOCK1 0
- 757 PUSHGETGLOBAL "Pervasives.Assert_failure"
- 759 MAKEBLOCK1 0
- 761 PUSH
- 762 CLOSURE 0, 720
- 765 PUSH
- 766 CLOSURE 0, 705
- 769 PUSH
- 770 CLOSURE 0, 692
- 773 PUSH
- 774 CLOSURE 0, 686
- 777 PUSHCONST0
- 778 PUSHCONSTINT 31
- 780 PUSHCONST1
- 781 LSLINT
- 782 EQ
- 783 BRANCHIFNOT 789
- 785 CONSTINT 30
- 787 BRANCH 791
- 789 CONSTINT 62
- 791 PUSHCONST1
- 792 LSLINT
- 793 PUSHACC0
- 794 OFFSETINT -1
- 796 PUSH
- 797 CLOSURE 0, 655
- 800 PUSHACC 9
- 802 CLOSURE 1, 635
- 805 PUSH
- 806 CLOSURE 0, 624
- 809 PUSHACC 11
- 811 CLOSURE 1, 599
- 814 PUSH
- 815 CLOSURE 0, 592
- 818 PUSH
- 819 CLOSURE 0, 585
- 822 PUSH
- 823 CLOSUREREC 0, 12
- 827 CONST0
- 828 C_CALL1 caml_open_descriptor
- 830 PUSHCONST1
- 831 C_CALL1 caml_open_descriptor
- 833 PUSHCONST2
- 834 C_CALL1 caml_open_descriptor
- 836 PUSH
- 837 CLOSURE 0, 574
- 840 PUSHACC0
- 841 CLOSURE 1, 565
- 844 PUSHACC1
- 845 CLOSURE 1, 557
- 848 PUSH
- 849 CLOSURE 0, 545
- 852 PUSHACC 22
- 854 CLOSURE 1, 515
- 857 PUSH
- 858 CLOSURE 0, 505
- 861 PUSH
- 862 CLOSURE 0, 496
- 865 PUSH
- 866 CLOSURE 0, 485
- 869 PUSHACC0
- 870 CLOSURE 1, 477
- 873 PUSHACC1
- 874 CLOSURE 1, 470
- 877 PUSHACC 28
- 879 CLOSURE 1, 441
- 882 PUSH
- 883 CLOSUREREC 0, 32
- 887 ACC0
- 888 PUSHACC 31
- 890 CLOSURE 2, 411
- 893 PUSHACC 22
- 895 CLOSUREREC 1, 70
- 899 ACC 15
- 901 CLOSURE 1, 404
- 904 PUSHACC 11
- 906 PUSHACC 17
- 908 CLOSURE 2, 399
- 911 PUSHACC 12
- 913 PUSHACC 18
- 915 PUSHACC 23
- 917 CLOSURE 3, 392
- 920 PUSHACC 13
- 922 PUSHACC 19
- 924 PUSHACC 23
- 926 CLOSURE 3, 385
- 929 PUSHACC 14
- 931 PUSHACC 20
- 933 CLOSURE 2, 374
- 936 PUSHACC 20
- 938 CLOSURE 1, 364
- 941 PUSHACC 20
- 943 CLOSURE 1, 358
- 946 PUSHACC 17
- 948 PUSHACC 22
- 950 CLOSURE 2, 353
- 953 PUSHACC 18
- 955 PUSHACC 23
- 957 PUSHACC 29
- 959 CLOSURE 3, 346
- 962 PUSHACC 19
- 964 PUSHACC 24
- 966 PUSHACC 29
- 968 CLOSURE 3, 339
- 971 PUSHACC 20
- 973 PUSHACC 25
- 975 CLOSURE 2, 325
- 978 PUSHACC 25
- 980 CLOSURE 1, 315
- 983 PUSHACC 12
- 985 PUSHACC 28
- 987 PUSHACC 30
- 989 CLOSURE 3, 308
- 992 PUSHACC0
- 993 CLOSURE 1, 301
- 996 PUSHACC1
- 997 CLOSURE 1, 294
- 1000 PUSHACC 29
- 1002 PUSHACC 31
- 1004 CLOSURE 2, 286
- 1007 MAKEBLOCK1 0
- 1009 PUSHACC0
- 1010 CLOSURE 1, 275
- 1013 PUSHACC1
- 1014 CLOSURE 1, 263
- 1017 PUSHACC0
- 1018 CLOSURE 1, 255
- 1021 PUSHACC1
- 1022 PUSHACC 22
- 1024 PUSHACC4
- 1025 PUSHACC3
- 1026 PUSH
- 1027 CLOSURE 0, 247
- 1030 PUSH
- 1031 CLOSURE 0, 241
- 1034 PUSH
- 1035 CLOSURE 0, 236
- 1038 PUSH
- 1039 CLOSURE 0, 231
- 1042 PUSH
- 1043 CLOSURE 0, 223
- 1046 PUSH
- 1047 CLOSURE 0, 217
- 1050 PUSH
- 1051 CLOSURE 0, 212
- 1054 PUSH
- 1055 CLOSURE 0, 207
- 1058 PUSHACC 32
- 1060 PUSHACC 35
- 1062 PUSHACC 33
- 1064 PUSH
- 1065 CLOSURE 0, 202
- 1068 PUSHACC 41
- 1070 PUSHACC 40
- 1072 PUSHACC 42
- 1074 PUSH
- 1075 CLOSURE 0, 194
- 1078 PUSHACC 46
- 1080 PUSH
- 1081 CLOSURE 0, 188
- 1084 PUSH
- 1085 CLOSURE 0, 183
- 1088 PUSH
- 1089 CLOSURE 0, 175
- 1092 PUSHACC 51
- 1094 PUSH
- 1095 CLOSURE 0, 166
- 1098 PUSH
- 1099 CLOSURE 0, 157
- 1102 PUSHACC 55
- 1104 PUSHACC 57
- 1106 PUSH
- 1107 CLOSURE 0, 148
- 1110 PUSH
- 1111 CLOSURE 0, 142
- 1114 PUSHACC 63
- 1116 PUSHACC 62
- 1118 PUSHACC 64
- 1120 PUSHACC 38
- 1122 PUSHACC 40
- 1124 PUSHACC 42
- 1126 PUSHACC 44
- 1128 PUSHACC 46
- 1130 PUSHACC 48
- 1132 PUSHACC 50
- 1134 PUSHACC 52
- 1136 PUSHACC 54
- 1138 PUSHACC 56
- 1140 PUSHACC 58
- 1142 PUSHACC 60
- 1144 PUSHACC 62
- 1146 PUSHACC 64
- 1148 PUSHACC 66
- 1150 PUSHACC 82
- 1152 PUSHACC 84
- 1154 PUSHACC 86
- 1156 PUSHACC 88
- 1158 PUSHACC 90
- 1160 PUSHACC 92
- 1162 PUSHACC 94
- 1164 PUSHACC 96
- 1166 PUSHACC 98
- 1168 PUSHACC 100
- 1170 PUSHACC 104
- 1172 PUSHACC 104
- 1174 PUSHACC 104
- 1176 PUSHACC 108
- 1178 PUSHACC 110
- 1180 PUSHACC 112
- 1182 PUSHACC 117
- 1184 PUSHACC 117
- 1186 PUSHACC 117
- 1188 PUSHACC 117
- 1190 MAKEBLOCK 69, 0
- 1193 POP 53
- 1195 SETGLOBAL Pervasives
- 1197 BRANCH 2177
- 1199 RESTART
- 1200 GRAB 1
- 1202 ACC1
- 1203 BRANCHIFNOT 1213
- 1205 ACC1
- 1206 GETFIELD1
- 1207 PUSHACC1
- 1208 OFFSETINT 1
- 1210 PUSHOFFSETCLOSURE0
- 1211 APPTERM2 4
- 1213 ACC0
- 1214 RETURN 2
- 1216 RESTART
- 1217 GRAB 1
- 1219 ACC0
- 1220 BRANCHIFNOT 1251
- 1222 CONST0
- 1223 PUSHACC2
- 1224 EQ
- 1225 BRANCHIFNOT 1231
- 1227 ACC0
- 1228 GETFIELD0
- 1229 RETURN 2
- 1231 CONST0
- 1232 PUSHACC2
- 1233 GTINT
- 1234 BRANCHIFNOT 1244
- 1236 ACC1
- 1237 OFFSETINT -1
- 1239 PUSHACC1
- 1240 GETFIELD1
- 1241 PUSHOFFSETCLOSURE0
- 1242 APPTERM2 4
- 1244 GETGLOBAL "List.nth"
- 1246 PUSHGETGLOBALFIELD Pervasives, 2
- 1249 APPTERM1 3
- 1251 GETGLOBAL "nth"
- 1253 PUSHGETGLOBALFIELD Pervasives, 3
- 1256 APPTERM1 3
- 1258 RESTART
- 1259 GRAB 1
- 1261 ACC0
- 1262 BRANCHIFNOT 1274
- 1264 ACC1
- 1265 PUSHACC1
- 1266 GETFIELD0
- 1267 MAKEBLOCK2 0
- 1269 PUSHACC1
- 1270 GETFIELD1
- 1271 PUSHOFFSETCLOSURE0
- 1272 APPTERM2 4
- 1274 ACC1
- 1275 RETURN 2
- 1277 ACC0
- 1278 BRANCHIFNOT 1291
- 1280 ACC0
- 1281 GETFIELD1
- 1282 PUSHOFFSETCLOSURE0
- 1283 APPLY1
- 1284 PUSHACC1
- 1285 GETFIELD0
- 1286 PUSHGETGLOBALFIELD Pervasives, 16
- 1289 APPTERM2 3
- 1291 RETURN 1
- 1293 RESTART
- 1294 GRAB 1
- 1296 ACC1
- 1297 BRANCHIFNOT 1313
- 1299 ACC1
- 1300 GETFIELD0
- 1301 PUSHACC1
- 1302 APPLY1
- 1303 PUSHACC2
- 1304 GETFIELD1
- 1305 PUSHACC2
- 1306 PUSHOFFSETCLOSURE0
- 1307 APPLY2
- 1308 PUSHACC1
- 1309 MAKEBLOCK2 0
- 1311 POP 1
- 1313 RETURN 2
- 1315 RESTART
- 1316 GRAB 1
- 1318 ACC1
- 1319 BRANCHIFNOT 1331
- 1321 ACC1
- 1322 GETFIELD0
- 1323 PUSHACC1
- 1324 APPLY1
- 1325 ACC1
- 1326 GETFIELD1
- 1327 PUSHACC1
- 1328 PUSHOFFSETCLOSURE0
- 1329 APPTERM2 4
- 1331 RETURN 2
- 1333 RESTART
- 1334 GRAB 2
- 1336 ACC2
- 1337 BRANCHIFNOT 1350
- 1339 ACC2
- 1340 GETFIELD1
- 1341 PUSHACC3
- 1342 GETFIELD0
- 1343 PUSHACC3
- 1344 PUSHACC3
- 1345 APPLY2
- 1346 PUSHACC2
- 1347 PUSHOFFSETCLOSURE0
- 1348 APPTERM3 6
- 1350 ACC1
- 1351 RETURN 3
- 1353 RESTART
- 1354 GRAB 2
- 1356 ACC1
- 1357 BRANCHIFNOT 1370
- 1359 ACC2
- 1360 PUSHACC2
- 1361 GETFIELD1
- 1362 PUSHACC2
- 1363 PUSHOFFSETCLOSURE0
- 1364 APPLY3
- 1365 PUSHACC2
- 1366 GETFIELD0
- 1367 PUSHACC2
- 1368 APPTERM2 5
- 1370 ACC2
- 1371 RETURN 3
- 1373 RESTART
- 1374 GRAB 2
- 1376 ACC1
- 1377 BRANCHIFNOT 1400
- 1379 ACC2
- 1380 BRANCHIFNOT 1407
- 1382 ACC2
- 1383 GETFIELD0
- 1384 PUSHACC2
- 1385 GETFIELD0
- 1386 PUSHACC2
- 1387 APPLY2
- 1388 PUSHACC3
- 1389 GETFIELD1
- 1390 PUSHACC3
- 1391 GETFIELD1
- 1392 PUSHACC3
- 1393 PUSHOFFSETCLOSURE0
- 1394 APPLY3
- 1395 PUSHACC1
- 1396 MAKEBLOCK2 0
- 1398 RETURN 4
- 1400 ACC2
- 1401 BRANCHIFNOT 1405
- 1403 BRANCH 1407
- 1405 RETURN 3
- 1407 GETGLOBAL "List.map2"
- 1409 PUSHGETGLOBALFIELD Pervasives, 2
- 1412 APPTERM1 4
- 1414 RESTART
- 1415 GRAB 2
- 1417 ACC1
- 1418 BRANCHIFNOT 1437
- 1420 ACC2
- 1421 BRANCHIFNOT 1444
- 1423 ACC2
- 1424 GETFIELD0
- 1425 PUSHACC2
- 1426 GETFIELD0
- 1427 PUSHACC2
- 1428 APPLY2
- 1429 ACC2
- 1430 GETFIELD1
- 1431 PUSHACC2
- 1432 GETFIELD1
- 1433 PUSHACC2
- 1434 PUSHOFFSETCLOSURE0
- 1435 APPTERM3 6
- 1437 ACC2
- 1438 BRANCHIFNOT 1442
- 1440 BRANCH 1444
- 1442 RETURN 3
- 1444 GETGLOBAL "List.iter2"
- 1446 PUSHGETGLOBALFIELD Pervasives, 2
- 1449 APPTERM1 4
- 1451 RESTART
- 1452 GRAB 3
- 1454 ACC2
- 1455 BRANCHIFNOT 1476
- 1457 ACC3
- 1458 BRANCHIFNOT 1482
- 1460 ACC3
- 1461 GETFIELD1
- 1462 PUSHACC3
- 1463 GETFIELD1
- 1464 PUSHACC5
- 1465 GETFIELD0
- 1466 PUSHACC5
- 1467 GETFIELD0
- 1468 PUSHACC5
- 1469 PUSHACC5
- 1470 APPLY3
- 1471 PUSHACC3
- 1472 PUSHOFFSETCLOSURE0
- 1473 APPTERM 4, 8
- 1476 ACC3
- 1477 BRANCHIF 1482
- 1479 ACC1
- 1480 RETURN 4
- 1482 GETGLOBAL "List.fold_left2"
- 1484 PUSHGETGLOBALFIELD Pervasives, 2
- 1487 APPTERM1 5
- 1489 RESTART
- 1490 GRAB 3
- 1492 ACC1
- 1493 BRANCHIFNOT 1516
- 1495 ACC2
- 1496 BRANCHIFNOT 1522
- 1498 PUSH_RETADDR 1509
- 1500 ACC6
- 1501 PUSHACC6
- 1502 GETFIELD1
- 1503 PUSHACC6
- 1504 GETFIELD1
- 1505 PUSHACC6
- 1506 PUSHOFFSETCLOSURE0
- 1507 APPLY 4
- 1509 PUSHACC3
- 1510 GETFIELD0
- 1511 PUSHACC3
- 1512 GETFIELD0
- 1513 PUSHACC3
- 1514 APPTERM3 7
- 1516 ACC2
- 1517 BRANCHIF 1522
- 1519 ACC3
- 1520 RETURN 4
- 1522 GETGLOBAL "List.fold_right2"
- 1524 PUSHGETGLOBALFIELD Pervasives, 2
- 1527 APPTERM1 5
- 1529 RESTART
- 1530 GRAB 1
- 1532 ACC1
- 1533 BRANCHIFNOT 1549
- 1535 ACC1
- 1536 GETFIELD0
- 1537 PUSHACC1
- 1538 APPLY1
- 1539 BRANCHIFNOT 1547
- 1541 ACC1
- 1542 GETFIELD1
- 1543 PUSHACC1
- 1544 PUSHOFFSETCLOSURE0
- 1545 APPTERM2 4
- 1547 RETURN 2
- 1549 CONST1
- 1550 RETURN 2
- 1552 RESTART
- 1553 GRAB 1
- 1555 ACC1
- 1556 BRANCHIFNOT 1570
- 1558 ACC1
- 1559 GETFIELD0
- 1560 PUSHACC1
- 1561 APPLY1
- 1562 BRANCHIF 1570
- 1564 ACC1
- 1565 GETFIELD1
- 1566 PUSHACC1
- 1567 PUSHOFFSETCLOSURE0
- 1568 APPTERM2 4
- 1570 RETURN 2
- 1572 RESTART
- 1573 GRAB 2
- 1575 ACC1
- 1576 BRANCHIFNOT 1599
- 1578 ACC2
- 1579 BRANCHIFNOT 1605
- 1581 ACC2
- 1582 GETFIELD0
- 1583 PUSHACC2
- 1584 GETFIELD0
- 1585 PUSHACC2
- 1586 APPLY2
- 1587 BRANCHIFNOT 1597
- 1589 ACC2
- 1590 GETFIELD1
- 1591 PUSHACC2
- 1592 GETFIELD1
- 1593 PUSHACC2
- 1594 PUSHOFFSETCLOSURE0
- 1595 APPTERM3 6
- 1597 RETURN 3
- 1599 ACC2
- 1600 BRANCHIF 1605
- 1602 CONST1
- 1603 RETURN 3
- 1605 GETGLOBAL "List.for_all2"
- 1607 PUSHGETGLOBALFIELD Pervasives, 2
- 1610 APPTERM1 4
- 1612 RESTART
- 1613 GRAB 2
- 1615 ACC1
- 1616 BRANCHIFNOT 1639
- 1618 ACC2
- 1619 BRANCHIFNOT 1646
- 1621 ACC2
- 1622 GETFIELD0
- 1623 PUSHACC2
- 1624 GETFIELD0
- 1625 PUSHACC2
- 1626 APPLY2
- 1627 BRANCHIF 1637
- 1629 ACC2
- 1630 GETFIELD1
- 1631 PUSHACC2
- 1632 GETFIELD1
- 1633 PUSHACC2
- 1634 PUSHOFFSETCLOSURE0
- 1635 APPTERM3 6
- 1637 RETURN 3
- 1639 ACC2
- 1640 BRANCHIFNOT 1644
- 1642 BRANCH 1646
- 1644 RETURN 3
- 1646 GETGLOBAL "List.exists2"
- 1648 PUSHGETGLOBALFIELD Pervasives, 2
- 1651 APPTERM1 4
- 1653 RESTART
- 1654 GRAB 1
- 1656 ACC1
- 1657 BRANCHIFNOT 1672
- 1659 ACC0
- 1660 PUSHACC2
- 1661 GETFIELD0
- 1662 C_CALL2 equal
- 1664 BRANCHIF 1672
- 1666 ACC1
- 1667 GETFIELD1
- 1668 PUSHACC1
- 1669 PUSHOFFSETCLOSURE0
- 1670 APPTERM2 4
- 1672 RETURN 2
- 1674 RESTART
- 1675 GRAB 1
- 1677 ACC1
- 1678 BRANCHIFNOT 1692
- 1680 ACC0
- 1681 PUSHACC2
- 1682 GETFIELD0
- 1683 EQ
- 1684 BRANCHIF 1692
- 1686 ACC1
- 1687 GETFIELD1
- 1688 PUSHACC1
- 1689 PUSHOFFSETCLOSURE0
- 1690 APPTERM2 4
- 1692 RETURN 2
- 1694 RESTART
- 1695 GRAB 1
- 1697 ACC1
- 1698 BRANCHIFNOT 1719
- 1700 ACC1
- 1701 GETFIELD0
- 1702 PUSHACC1
- 1703 PUSHACC1
- 1704 GETFIELD0
- 1705 C_CALL2 equal
- 1707 BRANCHIFNOT 1713
- 1709 ACC0
- 1710 GETFIELD1
- 1711 RETURN 3
- 1713 ACC2
- 1714 GETFIELD1
- 1715 PUSHACC2
- 1716 PUSHOFFSETCLOSURE0
- 1717 APPTERM2 5
- 1719 GETGLOBAL Not_found
- 1721 MAKEBLOCK1 0
- 1723 RAISE
- 1724 RESTART
- 1725 GRAB 1
- 1727 ACC1
- 1728 BRANCHIFNOT 1748
- 1730 ACC1
- 1731 GETFIELD0
- 1732 PUSHACC1
- 1733 PUSHACC1
- 1734 GETFIELD0
- 1735 EQ
- 1736 BRANCHIFNOT 1742
- 1738 ACC0
- 1739 GETFIELD1
- 1740 RETURN 3
- 1742 ACC2
- 1743 GETFIELD1
- 1744 PUSHACC2
- 1745 PUSHOFFSETCLOSURE0
- 1746 APPTERM2 5
- 1748 GETGLOBAL Not_found
- 1750 MAKEBLOCK1 0
- 1752 RAISE
- 1753 RESTART
- 1754 GRAB 1
- 1756 ACC1
- 1757 BRANCHIFNOT 1773
- 1759 ACC0
- 1760 PUSHACC2
- 1761 GETFIELD0
- 1762 GETFIELD0
- 1763 C_CALL2 equal
- 1765 BRANCHIF 1773
- 1767 ACC1
- 1768 GETFIELD1
- 1769 PUSHACC1
- 1770 PUSHOFFSETCLOSURE0
- 1771 APPTERM2 4
- 1773 RETURN 2
- 1775 RESTART
- 1776 GRAB 1
- 1778 ACC1
- 1779 BRANCHIFNOT 1794
- 1781 ACC0
- 1782 PUSHACC2
- 1783 GETFIELD0
- 1784 GETFIELD0
- 1785 EQ
- 1786 BRANCHIF 1794
- 1788 ACC1
- 1789 GETFIELD1
- 1790 PUSHACC1
- 1791 PUSHOFFSETCLOSURE0
- 1792 APPTERM2 4
- 1794 RETURN 2
- 1796 RESTART
- 1797 GRAB 1
- 1799 ACC1
- 1800 BRANCHIFNOT 1825
- 1802 ACC1
- 1803 GETFIELD0
- 1804 PUSHACC2
- 1805 GETFIELD1
- 1806 PUSHACC2
- 1807 PUSHACC2
- 1808 GETFIELD0
- 1809 C_CALL2 equal
- 1811 BRANCHIFNOT 1816
- 1813 ACC0
- 1814 RETURN 4
- 1816 ACC0
- 1817 PUSHACC3
- 1818 PUSHOFFSETCLOSURE0
- 1819 APPLY2
- 1820 PUSHACC2
- 1821 MAKEBLOCK2 0
- 1823 POP 2
- 1825 RETURN 2
- 1827 RESTART
- 1828 GRAB 1
- 1830 ACC1
- 1831 BRANCHIFNOT 1855
- 1833 ACC1
- 1834 GETFIELD0
- 1835 PUSHACC2
- 1836 GETFIELD1
- 1837 PUSHACC2
- 1838 PUSHACC2
- 1839 GETFIELD0
- 1840 EQ
- 1841 BRANCHIFNOT 1846
- 1843 ACC0
- 1844 RETURN 4
- 1846 ACC0
- 1847 PUSHACC3
- 1848 PUSHOFFSETCLOSURE0
- 1849 APPLY2
- 1850 PUSHACC2
- 1851 MAKEBLOCK2 0
- 1853 POP 2
- 1855 RETURN 2
- 1857 RESTART
- 1858 GRAB 1
- 1860 ACC1
- 1861 BRANCHIFNOT 1879
- 1863 ACC1
- 1864 GETFIELD0
- 1865 PUSHACC0
- 1866 PUSHACC2
- 1867 APPLY1
- 1868 BRANCHIFNOT 1873
- 1870 ACC0
- 1871 RETURN 3
- 1873 ACC2
- 1874 GETFIELD1
- 1875 PUSHACC2
- 1876 PUSHOFFSETCLOSURE0
- 1877 APPTERM2 5
- 1879 GETGLOBAL Not_found
- 1881 MAKEBLOCK1 0
- 1883 RAISE
- 1884 RESTART
- 1885 GRAB 2
- 1887 ACC2
- 1888 BRANCHIFNOT 1917
- 1890 ACC2
- 1891 GETFIELD0
- 1892 PUSHACC3
- 1893 GETFIELD1
- 1894 PUSHACC1
- 1895 PUSHENVACC2
- 1896 APPLY1
- 1897 BRANCHIFNOT 1908
- 1899 ACC0
- 1900 PUSHACC4
- 1901 PUSHACC4
- 1902 PUSHACC4
- 1903 MAKEBLOCK2 0
- 1905 PUSHOFFSETCLOSURE0
- 1906 APPTERM3 8
- 1908 ACC0
- 1909 PUSHACC4
- 1910 PUSHACC3
- 1911 MAKEBLOCK2 0
- 1913 PUSHACC4
- 1914 PUSHOFFSETCLOSURE0
- 1915 APPTERM3 8
- 1917 ACC1
- 1918 PUSHENVACC1
- 1919 APPLY1
- 1920 PUSHACC1
- 1921 PUSHENVACC1
- 1922 APPLY1
- 1923 MAKEBLOCK2 0
- 1925 RETURN 3
- 1927 RESTART
- 1928 GRAB 1
- 1930 ACC0
- 1931 PUSHENVACC1
- 1932 CLOSUREREC 2, 1885
- 1936 ACC2
- 1937 PUSHCONST0
- 1938 PUSHCONST0
- 1939 PUSHACC3
- 1940 APPTERM3 6
- 1942 ACC0
- 1943 BRANCHIFNOT 1967
- 1945 ACC0
- 1946 GETFIELD0
- 1947 PUSHACC1
- 1948 GETFIELD1
- 1949 PUSHOFFSETCLOSURE0
- 1950 APPLY1
- 1951 PUSHACC0
- 1952 GETFIELD1
- 1953 PUSHACC2
- 1954 GETFIELD1
- 1955 MAKEBLOCK2 0
- 1957 PUSHACC1
- 1958 GETFIELD0
- 1959 PUSHACC3
- 1960 GETFIELD0
- 1961 MAKEBLOCK2 0
- 1963 MAKEBLOCK2 0
- 1965 RETURN 3
- 1967 GETGLOBAL <0>(0, 0)
- 1969 RETURN 1
- 1971 RESTART
- 1972 GRAB 1
- 1974 ACC0
- 1975 BRANCHIFNOT 1996
- 1977 ACC1
- 1978 BRANCHIFNOT 2003
- 1980 ACC1
- 1981 GETFIELD1
- 1982 PUSHACC1
- 1983 GETFIELD1
- 1984 PUSHOFFSETCLOSURE0
- 1985 APPLY2
- 1986 PUSHACC2
- 1987 GETFIELD0
- 1988 PUSHACC2
- 1989 GETFIELD0
- 1990 MAKEBLOCK2 0
- 1992 MAKEBLOCK2 0
- 1994 RETURN 2
- 1996 ACC1
- 1997 BRANCHIFNOT 2001
- 1999 BRANCH 2003
- 2001 RETURN 2
- 2003 GETGLOBAL "List.combine"
- 2005 PUSHGETGLOBALFIELD Pervasives, 2
- 2008 APPTERM1 3
- 2010 RESTART
- 2011 GRAB 1
- 2013 ACC1
- 2014 BRANCHIFNOT 2038
- 2016 ACC1
- 2017 GETFIELD0
- 2018 PUSHACC2
- 2019 GETFIELD1
- 2020 PUSHACC1
- 2021 PUSHENVACC2
- 2022 APPLY1
- 2023 BRANCHIFNOT 2033
- 2025 ACC0
- 2026 PUSHACC3
- 2027 PUSHACC3
- 2028 MAKEBLOCK2 0
- 2030 PUSHOFFSETCLOSURE0
- 2031 APPTERM2 6
- 2033 ACC0
- 2034 PUSHACC3
- 2035 PUSHOFFSETCLOSURE0
- 2036 APPTERM2 6
- 2038 ACC0
- 2039 PUSHENVACC1
- 2040 APPTERM1 3
- 2042 ACC0
- 2043 PUSHENVACC1
- 2044 CLOSUREREC 2, 2011
- 2048 CONST0
- 2049 PUSHACC1
- 2050 APPTERM1 3
- 2052 RESTART
- 2053 GRAB 2
- 2055 ACC1
- 2056 BRANCHIFNOT 2077
- 2058 ACC2
- 2059 BRANCHIFNOT 2084
- 2061 ACC2
- 2062 GETFIELD1
- 2063 PUSHACC2
- 2064 GETFIELD1
- 2065 PUSHACC2
- 2066 PUSHACC5
- 2067 GETFIELD0
- 2068 PUSHACC5
- 2069 GETFIELD0
- 2070 PUSHENVACC1
- 2071 APPLY2
- 2072 MAKEBLOCK2 0
- 2074 PUSHOFFSETCLOSURE0
- 2075 APPTERM3 6
- 2077 ACC2
- 2078 BRANCHIFNOT 2082
- 2080 BRANCH 2084
- 2082 RETURN 3
- 2084 GETGLOBAL "List.rev_map2"
- 2086 PUSHGETGLOBALFIELD Pervasives, 2
- 2089 APPTERM1 4
- 2091 RESTART
- 2092 GRAB 2
- 2094 ACC0
- 2095 CLOSUREREC 1, 2053
- 2099 ACC3
- 2100 PUSHACC3
- 2101 PUSHCONST0
- 2102 PUSHACC3
- 2103 APPTERM3 7
- 2105 RESTART
- 2106 GRAB 1
- 2108 ACC1
- 2109 BRANCHIFNOT 2123
- 2111 ACC1
- 2112 GETFIELD1
- 2113 PUSHACC1
- 2114 PUSHACC3
- 2115 GETFIELD0
- 2116 PUSHENVACC1
- 2117 APPLY1
- 2118 MAKEBLOCK2 0
- 2120 PUSHOFFSETCLOSURE0
- 2121 APPTERM2 4
- 2123 ACC0
- 2124 RETURN 2
- 2126 RESTART
- 2127 GRAB 1
- 2129 ACC0
- 2130 CLOSUREREC 1, 2106
- 2134 ACC2
- 2135 PUSHCONST0
- 2136 PUSHACC2
- 2137 APPTERM2 5
- 2139 CONST0
- 2140 PUSHACC1
- 2141 PUSHENVACC1
- 2142 APPTERM2 3
- 2144 ACC0
- 2145 BRANCHIFNOT 2151
- 2147 ACC0
- 2148 GETFIELD1
- 2149 RETURN 1
- 2151 GETGLOBAL "tl"
- 2153 PUSHGETGLOBALFIELD Pervasives, 3
- 2156 APPTERM1 2
- 2158 ACC0
- 2159 BRANCHIFNOT 2165
- 2161 ACC0
- 2162 GETFIELD0
- 2163 RETURN 1
- 2165 GETGLOBAL "hd"
- 2167 PUSHGETGLOBALFIELD Pervasives, 3
- 2170 APPTERM1 2
- 2172 ACC0
- 2173 PUSHCONST0
- 2174 PUSHENVACC1
- 2175 APPTERM2 3
- 2177 CLOSUREREC 0, 1200
- 2181 ACC0
- 2182 CLOSURE 1, 2172
- 2185 PUSH
- 2186 CLOSURE 0, 2158
- 2189 PUSH
- 2190 CLOSURE 0, 2144
- 2193 PUSH
- 2194 CLOSUREREC 0, 1217
- 2198 GETGLOBALFIELD Pervasives, 16
- 2201 PUSH
- 2202 CLOSUREREC 0, 1259
- 2206 ACC0
- 2207 CLOSURE 1, 2139
- 2210 PUSH
- 2211 CLOSUREREC 0, 1277
- 2215 CLOSUREREC 0, 1294
- 2219 CLOSURE 0, 2127
- 2222 PUSH
- 2223 CLOSUREREC 0, 1316
- 2227 CLOSUREREC 0, 1334
- 2231 CLOSUREREC 0, 1354
- 2235 CLOSUREREC 0, 1374
- 2239 CLOSURE 0, 2092
- 2242 PUSH
- 2243 CLOSUREREC 0, 1415
- 2247 CLOSUREREC 0, 1452
- 2251 CLOSUREREC 0, 1490
- 2255 CLOSUREREC 0, 1530
- 2259 CLOSUREREC 0, 1553
- 2263 CLOSUREREC 0, 1573
- 2267 CLOSUREREC 0, 1613
- 2271 CLOSUREREC 0, 1654
- 2275 CLOSUREREC 0, 1675
- 2279 CLOSUREREC 0, 1695
- 2283 CLOSUREREC 0, 1725
- 2287 CLOSUREREC 0, 1754
- 2291 CLOSUREREC 0, 1776
- 2295 CLOSUREREC 0, 1797
- 2299 CLOSUREREC 0, 1828
- 2303 CLOSUREREC 0, 1858
- 2307 ACC 24
- 2309 CLOSURE 1, 2042
- 2312 PUSHACC 25
- 2314 CLOSUREREC 1, 1928
- 2318 CLOSUREREC 0, 1942
- 2322 CLOSUREREC 0, 1972
- 2326 ACC0
- 2327 PUSHACC2
- 2328 PUSHACC7
- 2329 PUSHACC 9
- 2331 PUSHACC 11
- 2333 PUSHACC 13
- 2335 PUSHACC 15
- 2337 PUSHACC 17
- 2339 PUSHACC 10
- 2341 PUSHACC 12
- 2343 PUSHACC 13
- 2345 PUSHACC 15
- 2347 PUSHACC 23
- 2349 PUSHACC 25
- 2351 PUSHACC 27
- 2353 PUSHACC 29
- 2355 PUSHACC 31
- 2357 PUSHACC 33
- 2359 PUSHACC 35
- 2361 PUSHACC 37
- 2363 PUSHACC 40
- 2365 PUSHACC 42
- 2367 PUSHACC 41
- 2369 PUSHACC 45
- 2371 PUSHACC 47
- 2373 PUSHACC 50
- 2375 PUSHACC 52
- 2377 PUSHACC 51
- 2379 PUSHACC 55
- 2381 PUSHACC 56
- 2383 PUSHACC 59
- 2385 PUSHACC 61
- 2387 PUSHACC 60
- 2389 PUSHACC 64
- 2391 PUSHACC 66
- 2393 PUSHACC 68
- 2395 PUSHACC 70
- 2397 MAKEBLOCK 37, 0
- 2400 POP 36
- 2402 SETGLOBAL List
- 2404 BRANCH 2622
- 2406 CONSTINT 97
- 2408 PUSHACC1
- 2409 GEINT
- 2410 BRANCHIFNOT 2418
- 2412 CONSTINT 122
- 2414 PUSHACC1
- 2415 LEINT
- 2416 BRANCHIF 2442
- 2418 CONSTINT 224
- 2420 PUSHACC1
- 2421 GEINT
- 2422 BRANCHIFNOT 2430
- 2424 CONSTINT 246
- 2426 PUSHACC1
- 2427 LEINT
- 2428 BRANCHIF 2442
- 2430 CONSTINT 248
- 2432 PUSHACC1
- 2433 GEINT
- 2434 BRANCHIFNOT 2447
- 2436 CONSTINT 254
- 2438 PUSHACC1
- 2439 LEINT
- 2440 BRANCHIFNOT 2447
- 2442 ACC0
- 2443 OFFSETINT -32
- 2445 RETURN 1
- 2447 ACC0
- 2448 RETURN 1
- 2450 CONSTINT 65
- 2452 PUSHACC1
- 2453 GEINT
- 2454 BRANCHIFNOT 2462
- 2456 CONSTINT 90
- 2458 PUSHACC1
- 2459 LEINT
- 2460 BRANCHIF 2486
- 2462 CONSTINT 192
- 2464 PUSHACC1
- 2465 GEINT
- 2466 BRANCHIFNOT 2474
- 2468 CONSTINT 214
- 2470 PUSHACC1
- 2471 LEINT
- 2472 BRANCHIF 2486
- 2474 CONSTINT 216
- 2476 PUSHACC1
- 2477 GEINT
- 2478 BRANCHIFNOT 2491
- 2480 CONSTINT 222
- 2482 PUSHACC1
- 2483 LEINT
- 2484 BRANCHIFNOT 2491
- 2486 ACC0
- 2487 OFFSETINT 32
- 2489 RETURN 1
- 2491 ACC0
- 2492 RETURN 1
- 2494 CONSTINT 39
- 2496 PUSHACC1
- 2497 LTINT
- 2498 BRANCHIFNOT 2520
- 2500 CONSTINT 9
- 2502 PUSHACC1
- 2503 EQ
- 2504 BRANCHIFNOT 2510
- 2506 GETGLOBAL "\\t"
- 2508 RETURN 1
- 2510 CONSTINT 13
- 2512 PUSHACC1
- 2513 EQ
- 2514 BRANCHIFNOT 2540
- 2516 GETGLOBAL "\\n"
- 2518 RETURN 1
- 2520 CONSTINT 39
- 2522 PUSHACC1
- 2523 EQ
- 2524 BRANCHIFNOT 2530
- 2526 GETGLOBAL "\\'"
- 2528 RETURN 1
- 2530 CONSTINT 92
- 2532 PUSHACC1
- 2533 EQ
- 2534 BRANCHIFNOT 2540
- 2536 GETGLOBAL "\\\\"
- 2538 RETURN 1
- 2540 ACC0
- 2541 C_CALL1 is_printable
- 2543 BRANCHIFNOT 2555
- 2545 CONST1
- 2546 C_CALL1 create_string
- 2548 PUSHACC1
- 2549 PUSHCONST0
- 2550 PUSHACC2
- 2551 SETSTRINGCHAR
- 2552 ACC0
- 2553 RETURN 2
- 2555 ACC0
- 2556 PUSHCONSTINT 4
- 2558 C_CALL1 create_string
- 2560 PUSHCONSTINT 92
- 2562 PUSHCONST0
- 2563 PUSHACC2
- 2564 SETSTRINGCHAR
- 2565 CONSTINT 100
- 2567 PUSHACC2
- 2568 DIVINT
- 2569 PUSHCONSTINT 48
- 2571 ADDINT
- 2572 PUSHCONST1
- 2573 PUSHACC2
- 2574 SETSTRINGCHAR
- 2575 CONSTINT 10
- 2577 PUSHCONSTINT 10
- 2579 PUSHACC3
- 2580 DIVINT
- 2581 MODINT
- 2582 PUSHCONSTINT 48
- 2584 ADDINT
- 2585 PUSHCONST2
- 2586 PUSHACC2
- 2587 SETSTRINGCHAR
- 2588 CONSTINT 10
- 2590 PUSHACC2
- 2591 MODINT
- 2592 PUSHCONSTINT 48
- 2594 ADDINT
- 2595 PUSHCONST3
- 2596 PUSHACC2
- 2597 SETSTRINGCHAR
- 2598 ACC0
- 2599 RETURN 3
- 2601 CONST0
- 2602 PUSHACC1
- 2603 LTINT
- 2604 BRANCHIF 2612
- 2606 CONSTINT 255
- 2608 PUSHACC1
- 2609 GTINT
- 2610 BRANCHIFNOT 2619
- 2612 GETGLOBAL "Char.chr"
- 2614 PUSHGETGLOBALFIELD Pervasives, 2
- 2617 APPTERM1 2
- 2619 ACC0
- 2620 RETURN 1
- 2622 CLOSURE 0, 2601
- 2625 PUSH
- 2626 CLOSURE 0, 2494
- 2629 PUSH
- 2630 CLOSURE 0, 2450
- 2633 PUSH
- 2634 CLOSURE 0, 2406
- 2637 PUSHACC0
- 2638 PUSHACC2
- 2639 PUSHACC4
- 2640 PUSHACC6
- 2641 MAKEBLOCK 4, 0
- 2644 POP 4
- 2646 SETGLOBAL Char
- 2648 BRANCH 3540
- 2650 RESTART
- 2651 GRAB 3
- 2653 ACC1
- 2654 PUSHACC3
- 2655 GEINT
- 2656 BRANCHIFNOT 2663
- 2658 GETGLOBAL Not_found
- 2660 MAKEBLOCK1 0
- 2662 RAISE
- 2663 ACC3
- 2664 PUSHACC3
- 2665 PUSHACC2
- 2666 GETSTRINGCHAR
- 2667 EQ
- 2668 BRANCHIFNOT 2673
- 2670 ACC2
- 2671 RETURN 4
- 2673 ACC3
- 2674 PUSHACC3
- 2675 OFFSETINT 1
- 2677 PUSHACC3
- 2678 PUSHACC3
- 2679 PUSHOFFSETCLOSURE0
- 2680 APPTERM 4, 8
- 2683 RESTART
- 2684 GRAB 2
- 2686 CONST0
- 2687 PUSHACC2
- 2688 LTINT
- 2689 BRANCHIFNOT 2696
- 2691 GETGLOBAL Not_found
- 2693 MAKEBLOCK1 0
- 2695 RAISE
- 2696 ACC2
- 2697 PUSHACC2
- 2698 PUSHACC2
- 2699 GETSTRINGCHAR
- 2700 EQ
- 2701 BRANCHIFNOT 2706
- 2703 ACC1
- 2704 RETURN 3
- 2706 ACC2
- 2707 PUSHACC2
- 2708 OFFSETINT -1
- 2710 PUSHACC2
- 2711 PUSHOFFSETCLOSURE0
- 2712 APPTERM3 6
- 2714 RESTART
- 2715 GRAB 1
- 2717 ACC1
- 2718 PUSHCONST0
- 2719 PUSHACC2
- 2720 PUSHENVACC1
- 2721 APPTERM3 5
- 2723 RESTART
- 2724 GRAB 2
- 2726 CONST0
- 2727 PUSHACC2
- 2728 LTINT
- 2729 BRANCHIF 2738
- 2731 ACC0
- 2732 C_CALL1 ml_string_length
- 2734 PUSHACC2
- 2735 GEINT
- 2736 BRANCHIFNOT 2745
- 2738 GETGLOBAL "String.rcontains_from"
- 2740 PUSHGETGLOBALFIELD Pervasives, 2
- 2743 APPTERM1 4
- 2745 PUSHTRAP 2756
- 2747 ACC6
- 2748 PUSHACC6
- 2749 PUSHACC6
- 2750 PUSHENVACC1
- 2751 APPLY3
- 2752 CONST1
- 2753 POPTRAP
- 2754 RETURN 3
- 2756 PUSHGETGLOBAL Not_found
- 2758 PUSHACC1
- 2759 GETFIELD0
- 2760 EQ
- 2761 BRANCHIFNOT 2766
- 2763 CONST0
- 2764 RETURN 4
- 2766 ACC0
- 2767 RAISE
- 2768 RESTART
- 2769 GRAB 2
- 2771 CONST0
- 2772 PUSHACC2
- 2773 LTINT
- 2774 BRANCHIF 2783
- 2776 ACC0
- 2777 C_CALL1 ml_string_length
- 2779 PUSHACC2
- 2780 GTINT
- 2781 BRANCHIFNOT 2790
- 2783 GETGLOBAL "String.contains_from"
- 2785 PUSHGETGLOBALFIELD Pervasives, 2
- 2788 APPTERM1 4
- 2790 PUSHTRAP 2811
- 2792 PUSH_RETADDR 2807
- 2794 ACC 9
- 2796 PUSHACC 9
- 2798 PUSHACC 9
- 2800 C_CALL1 ml_string_length
- 2802 PUSHACC 10
- 2804 PUSHENVACC1
- 2805 APPLY 4
- 2807 CONST1
- 2808 POPTRAP
- 2809 RETURN 3
- 2811 PUSHGETGLOBAL Not_found
- 2813 PUSHACC1
- 2814 GETFIELD0
- 2815 EQ
- 2816 BRANCHIFNOT 2821
- 2818 CONST0
- 2819 RETURN 4
- 2821 ACC0
- 2822 RAISE
- 2823 RESTART
- 2824 GRAB 2
- 2826 CONST0
- 2827 PUSHACC2
- 2828 LTINT
- 2829 BRANCHIF 2838
- 2831 ACC0
- 2832 C_CALL1 ml_string_length
- 2834 PUSHACC2
- 2835 GEINT
- 2836 BRANCHIFNOT 2845
- 2838 GETGLOBAL "String.rindex_from"
- 2840 PUSHGETGLOBALFIELD Pervasives, 2
- 2843 APPTERM1 4
- 2845 ACC2
- 2846 PUSHACC2
- 2847 PUSHACC2
- 2848 PUSHENVACC1
- 2849 APPTERM3 6
- 2851 RESTART
- 2852 GRAB 1
- 2854 ACC1
- 2855 PUSHACC1
- 2856 C_CALL1 ml_string_length
- 2858 OFFSETINT -1
- 2860 PUSHACC2
- 2861 PUSHENVACC1
- 2862 APPTERM3 5
- 2864 RESTART
- 2865 GRAB 2
- 2867 CONST0
- 2868 PUSHACC2
- 2869 LTINT
- 2870 BRANCHIF 2879
- 2872 ACC0
- 2873 C_CALL1 ml_string_length
- 2875 PUSHACC2
- 2876 GTINT
- 2877 BRANCHIFNOT 2886
- 2879 GETGLOBAL "String.index_from"
- 2881 PUSHGETGLOBALFIELD Pervasives, 2
- 2884 APPTERM1 4
- 2886 ACC2
- 2887 PUSHACC2
- 2888 PUSHACC2
- 2889 C_CALL1 ml_string_length
- 2891 PUSHACC3
- 2892 PUSHENVACC1
- 2893 APPTERM 4, 7
- 2896 RESTART
- 2897 GRAB 1
- 2899 ACC1
- 2900 PUSHCONST0
- 2901 PUSHACC2
- 2902 C_CALL1 ml_string_length
- 2904 PUSHACC3
- 2905 PUSHENVACC1
- 2906 APPTERM 4, 6
- 2909 ACC0
- 2910 PUSHGETGLOBALFIELD Char, 2
- 2913 PUSHENVACC1
- 2914 APPTERM2 3
- 2916 ACC0
- 2917 PUSHGETGLOBALFIELD Char, 3
- 2920 PUSHENVACC1
- 2921 APPTERM2 3
- 2923 RESTART
- 2924 GRAB 1
- 2926 CONST0
- 2927 PUSHACC2
- 2928 C_CALL1 ml_string_length
- 2930 EQ
- 2931 BRANCHIFNOT 2936
- 2933 ACC1
- 2934 RETURN 2
- 2936 ACC1
- 2937 PUSHENVACC1
- 2938 APPLY1
- 2939 PUSHCONST0
- 2940 PUSHACC3
- 2941 GETSTRINGCHAR
- 2942 PUSHACC2
- 2943 APPLY1
- 2944 PUSHCONST0
- 2945 PUSHACC2
- 2946 SETSTRINGCHAR
- 2947 ACC0
- 2948 RETURN 3
- 2950 ACC0
- 2951 PUSHGETGLOBALFIELD Char, 2
- 2954 PUSHENVACC1
- 2955 APPTERM2 3
- 2957 ACC0
- 2958 PUSHGETGLOBALFIELD Char, 3
- 2961 PUSHENVACC1
- 2962 APPTERM2 3
- 2964 RESTART
- 2965 GRAB 1
- 2967 ACC1
- 2968 C_CALL1 ml_string_length
- 2970 PUSHCONST0
- 2971 PUSHACC1
- 2972 EQ
- 2973 BRANCHIFNOT 2978
- 2975 ACC2
- 2976 RETURN 3
- 2978 ACC0
- 2979 C_CALL1 create_string
- 2981 PUSHCONST0
- 2982 PUSHACC2
- 2983 OFFSETINT -1
- 2985 PUSH
- 2986 BRANCH 3002
- 2988 CHECK_SIGNALS
- 2989 ACC1
- 2990 PUSHACC6
- 2991 GETSTRINGCHAR
- 2992 PUSHACC5
- 2993 APPLY1
- 2994 PUSHACC2
- 2995 PUSHACC4
- 2996 SETSTRINGCHAR
- 2997 ACC1
- 2998 OFFSETINT 1
- 3000 ASSIGN 1
- 3002 ACC0
- 3003 PUSHACC2
- 3004 LEINT
- 3005 BRANCHIF 2988
- 3007 CONST0
- 3008 POP 2
- 3010 ACC0
- 3011 RETURN 4
- 3013 CONST0
- 3014 PUSHCONST0
- 3015 PUSHACC2
- 3016 C_CALL1 ml_string_length
- 3018 OFFSETINT -1
- 3020 PUSH
- 3021 BRANCH 3059
- 3023 CHECK_SIGNALS
- 3024 ACC1
- 3025 PUSHACC4
- 3026 GETSTRINGCHAR
- 3027 PUSHACC0
- 3028 PUSHGETGLOBAL "\000\"\000\000\004\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
- 3030 C_CALL2 bitvect_test
- 3032 BRANCHIFNOT 3038
- 3034 CONST0
- 3035 CONST2
- 3036 BRANCH 3048
- 3038 ACC0
- 3039 C_CALL1 is_printable
- 3041 BRANCHIFNOT 3046
- 3043 CONST1
- 3044 BRANCH 3048
- 3046 CONSTINT 4
- 3048 POP 1
- 3050 PUSHACC3
- 3051 ADDINT
- 3052 ASSIGN 2
- 3054 ACC1
- 3055 OFFSETINT 1
- 3057 ASSIGN 1
- 3059 ACC0
- 3060 PUSHACC2
- 3061 LEINT
- 3062 BRANCHIF 3023
- 3064 CONST0
- 3065 POP 2
- 3067 ACC1
- 3068 C_CALL1 ml_string_length
- 3070 PUSHACC1
- 3071 EQ
- 3072 BRANCHIFNOT 3077
- 3074 ACC1
- 3075 RETURN 2
- 3077 ACC0
- 3078 C_CALL1 create_string
- 3080 PUSHCONST0
- 3081 ASSIGN 1
- 3083 CONST0
- 3084 PUSHACC3
- 3085 C_CALL1 ml_string_length
- 3087 OFFSETINT -1
- 3089 PUSH
- 3090 BRANCH 3245
- 3092 CHECK_SIGNALS
- 3093 ACC1
- 3094 PUSHACC5
- 3095 GETSTRINGCHAR
- 3096 PUSHACC0
- 3097 PUSHGETGLOBAL "\000\000\000\000\004\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
- 3099 C_CALL2 bitvect_test
- 3101 BRANCHIFNOT 3120
- 3103 CONST0
- 3104 CONSTINT 92
- 3106 PUSHACC5
- 3107 PUSHACC5
- 3108 SETSTRINGCHAR
- 3109 ACC4
- 3110 OFFSETINT 1
- 3112 ASSIGN 4
- 3114 ACC0
- 3115 PUSHACC5
- 3116 PUSHACC5
- 3117 SETSTRINGCHAR
- 3118 BRANCH 3233
- 3120 CONSTINT 9
- 3122 PUSHACC1
- 3123 EQ
- 3124 BRANCHIFNOT 3143
- 3126 CONSTINT 92
- 3128 PUSHACC5
- 3129 PUSHACC5
- 3130 SETSTRINGCHAR
- 3131 ACC4
- 3132 OFFSETINT 1
- 3134 ASSIGN 4
- 3136 CONSTINT 116
- 3138 PUSHACC5
- 3139 PUSHACC5
- 3140 SETSTRINGCHAR
- 3141 BRANCH 3233
- 3143 CONSTINT 13
- 3145 PUSHACC1
- 3146 EQ
- 3147 BRANCHIFNOT 3166
- 3149 CONSTINT 92
- 3151 PUSHACC5
- 3152 PUSHACC5
- 3153 SETSTRINGCHAR
- 3154 ACC4
- 3155 OFFSETINT 1
- 3157 ASSIGN 4
- 3159 CONSTINT 110
- 3161 PUSHACC5
- 3162 PUSHACC5
- 3163 SETSTRINGCHAR
- 3164 BRANCH 3233
- 3166 ACC0
- 3167 C_CALL1 is_printable
- 3169 BRANCHIFNOT 3177
- 3171 ACC0
- 3172 PUSHACC5
- 3173 PUSHACC5
- 3174 SETSTRINGCHAR
- 3175 BRANCH 3233
- 3177 ACC0
- 3178 PUSHCONSTINT 92
- 3180 PUSHACC6
- 3181 PUSHACC6
- 3182 SETSTRINGCHAR
- 3183 ACC5
- 3184 OFFSETINT 1
- 3186 ASSIGN 5
- 3188 CONSTINT 100
- 3190 PUSHACC1
- 3191 DIVINT
- 3192 PUSHCONSTINT 48
- 3194 ADDINT
- 3195 PUSHACC6
- 3196 PUSHACC6
- 3197 SETSTRINGCHAR
- 3198 ACC5
- 3199 OFFSETINT 1
- 3201 ASSIGN 5
- 3203 CONSTINT 10
- 3205 PUSHCONSTINT 10
- 3207 PUSHACC2
- 3208 DIVINT
- 3209 MODINT
- 3210 PUSHCONSTINT 48
- 3212 ADDINT
- 3213 PUSHACC6
- 3214 PUSHACC6
- 3215 SETSTRINGCHAR
- 3216 ACC5
- 3217 OFFSETINT 1
- 3219 ASSIGN 5
- 3221 CONSTINT 10
- 3223 PUSHACC1
- 3224 MODINT
- 3225 PUSHCONSTINT 48
- 3227 ADDINT
- 3228 PUSHACC6
- 3229 PUSHACC6
- 3230 SETSTRINGCHAR
- 3231 POP 1
- 3233 POP 1
- 3235 ACC3
- 3236 OFFSETINT 1
- 3238 ASSIGN 3
- 3240 ACC1
- 3241 OFFSETINT 1
- 3243 ASSIGN 1
- 3245 ACC0
- 3246 PUSHACC2
- 3247 LEINT
- 3248 BRANCHIF 3092
- 3250 CONST0
- 3251 POP 2
- 3253 ACC0
- 3254 RETURN 3
- 3256 ENVACC1
- 3257 C_CALL1 ml_string_length
- 3259 PUSHENVACC3
- 3260 GETFIELD0
- 3261 PUSHENVACC2
- 3262 PUSHCONST0
- 3263 PUSHENVACC1
- 3264 C_CALL5 blit_string
- 3266 ENVACC1
- 3267 C_CALL1 ml_string_length
- 3269 PUSHENVACC3
- 3270 GETFIELD0
- 3271 ADDINT
- 3272 PUSHENVACC3
- 3273 SETFIELD0
- 3274 ACC0
- 3275 C_CALL1 ml_string_length
- 3277 PUSHENVACC3
- 3278 GETFIELD0
- 3279 PUSHENVACC2
- 3280 PUSHCONST0
- 3281 PUSHACC4
- 3282 C_CALL5 blit_string
- 3284 ACC0
- 3285 C_CALL1 ml_string_length
- 3287 PUSHENVACC3
- 3288 GETFIELD0
- 3289 ADDINT
- 3290 PUSHENVACC3
- 3291 SETFIELD0
- 3292 RETURN 1
- 3294 ENVACC1
- 3295 OFFSETREF 1
- 3297 ACC0
- 3298 C_CALL1 ml_string_length
- 3300 PUSHENVACC2
- 3301 GETFIELD0
- 3302 ADDINT
- 3303 PUSHENVACC2
- 3304 SETFIELD0
- 3305 RETURN 1
- 3307 RESTART
- 3308 GRAB 1
- 3310 ACC1
- 3311 BRANCHIFNOT 3374
- 3313 ACC1
- 3314 GETFIELD0
- 3315 PUSHCONST0
- 3316 MAKEBLOCK1 0
- 3318 PUSHCONST0
- 3319 MAKEBLOCK1 0
- 3321 PUSHACC4
- 3322 PUSHACC1
- 3323 PUSHACC3
- 3324 CLOSURE 2, 3294
- 3327 PUSHGETGLOBALFIELD List, 9
- 3330 APPLY2
- 3331 ACC1
- 3332 GETFIELD0
- 3333 OFFSETINT -1
- 3335 PUSHACC4
- 3336 C_CALL1 ml_string_length
- 3338 MULINT
- 3339 PUSHACC1
- 3340 GETFIELD0
- 3341 ADDINT
- 3342 C_CALL1 create_string
- 3344 PUSHACC3
- 3345 C_CALL1 ml_string_length
- 3347 PUSHCONST0
- 3348 PUSHACC2
- 3349 PUSHCONST0
- 3350 PUSHACC7
- 3351 C_CALL5 blit_string
- 3353 ACC3
- 3354 C_CALL1 ml_string_length
- 3356 MAKEBLOCK1 0
- 3358 PUSHACC6
- 3359 GETFIELD1
- 3360 PUSHACC1
- 3361 PUSHACC3
- 3362 PUSHACC 8
- 3364 CLOSURE 3, 3256
- 3367 PUSHGETGLOBALFIELD List, 9
- 3370 APPLY2
- 3371 ACC1
- 3372 RETURN 7
- 3374 GETGLOBAL ""
- 3376 RETURN 2
- 3378 RESTART
- 3379 GRAB 4
- 3381 CONST0
- 3382 PUSHACC5
- 3383 LTINT
- 3384 BRANCHIF 3414
- 3386 CONST0
- 3387 PUSHACC2
- 3388 LTINT
- 3389 BRANCHIF 3414
- 3391 ACC0
- 3392 C_CALL1 ml_string_length
- 3394 PUSHACC5
- 3395 PUSHACC3
- 3396 ADDINT
- 3397 GTINT
- 3398 BRANCHIF 3414
- 3400 CONST0
- 3401 PUSHACC4
- 3402 LTINT
- 3403 BRANCHIF 3414
- 3405 ACC2
- 3406 C_CALL1 ml_string_length
- 3408 PUSHACC5
- 3409 PUSHACC5
- 3410 ADDINT
- 3411 GTINT
- 3412 BRANCHIFNOT 3421
- 3414 GETGLOBAL "String.blit"
- 3416 PUSHGETGLOBALFIELD Pervasives, 2
- 3419 APPTERM1 6
- 3421 ACC4
- 3422 PUSHACC4
- 3423 PUSHACC4
- 3424 PUSHACC4
- 3425 PUSHACC4
- 3426 C_CALL5 blit_string
- 3428 RETURN 5
- 3430 RESTART
- 3431 GRAB 3
- 3433 CONST0
- 3434 PUSHACC2
- 3435 LTINT
- 3436 BRANCHIF 3452
- 3438 CONST0
- 3439 PUSHACC3
- 3440 LTINT
- 3441 BRANCHIF 3452
- 3443 ACC0
- 3444 C_CALL1 ml_string_length
- 3446 PUSHACC3
- 3447 PUSHACC3
- 3448 ADDINT
- 3449 GTINT
- 3450 BRANCHIFNOT 3459
- 3452 GETGLOBAL "String.fill"
- 3454 PUSHGETGLOBALFIELD Pervasives, 2
- 3457 APPTERM1 5
- 3459 ACC3
- 3460 PUSHACC3
- 3461 PUSHACC3
- 3462 PUSHACC3
- 3463 C_CALL4 fill_string
- 3465 RETURN 4
- 3467 RESTART
- 3468 GRAB 2
- 3470 CONST0
- 3471 PUSHACC2
- 3472 LTINT
- 3473 BRANCHIF 3489
- 3475 CONST0
- 3476 PUSHACC3
- 3477 LTINT
- 3478 BRANCHIF 3489
- 3480 ACC0
- 3481 C_CALL1 ml_string_length
- 3483 PUSHACC3
- 3484 PUSHACC3
- 3485 ADDINT
- 3486 GTINT
- 3487 BRANCHIFNOT 3496
- 3489 GETGLOBAL "String.sub"
- 3491 PUSHGETGLOBALFIELD Pervasives, 2
- 3494 APPTERM1 4
- 3496 ACC2
- 3497 C_CALL1 create_string
- 3499 PUSHACC3
- 3500 PUSHCONST0
- 3501 PUSHACC2
- 3502 PUSHACC5
- 3503 PUSHACC5
- 3504 C_CALL5 blit_string
- 3506 ACC0
- 3507 RETURN 4
- 3509 ACC0
- 3510 C_CALL1 ml_string_length
- 3512 PUSHACC0
- 3513 C_CALL1 create_string
- 3515 PUSHACC1
- 3516 PUSHCONST0
- 3517 PUSHACC2
- 3518 PUSHCONST0
- 3519 PUSHACC6
- 3520 C_CALL5 blit_string
- 3522 ACC0
- 3523 RETURN 3
- 3525 RESTART
- 3526 GRAB 1
- 3528 ACC0
- 3529 C_CALL1 create_string
- 3531 PUSHACC2
- 3532 PUSHACC2
- 3533 PUSHCONST0
- 3534 PUSHACC3
- 3535 C_CALL4 fill_string
- 3537 ACC0
- 3538 RETURN 3
- 3540 CLOSURE 0, 3526
- 3543 PUSH
- 3544 CLOSURE 0, 3509
- 3547 PUSH
- 3548 CLOSURE 0, 3468
- 3551 PUSH
- 3552 CLOSURE 0, 3431
- 3555 PUSH
- 3556 CLOSURE 0, 3379
- 3559 PUSH
- 3560 CLOSURE 0, 3308
- 3563 PUSH
- 3564 CLOSURE 0, 3013
- 3567 PUSH
- 3568 CLOSURE 0, 2965
- 3571 PUSHACC0
- 3572 CLOSURE 1, 2957
- 3575 PUSHACC1
- 3576 CLOSURE 1, 2950
- 3579 PUSHACC 8
- 3581 CLOSURE 1, 2924
- 3584 PUSHACC0
- 3585 CLOSURE 1, 2916
- 3588 PUSHACC1
- 3589 CLOSURE 1, 2909
- 3592 PUSH
- 3593 CLOSUREREC 0, 2651
- 3597 ACC0
- 3598 CLOSURE 1, 2897
- 3601 PUSHACC1
- 3602 CLOSURE 1, 2865
- 3605 PUSH
- 3606 CLOSUREREC 0, 2684
- 3610 ACC0
- 3611 CLOSURE 1, 2852
- 3614 PUSHACC1
- 3615 CLOSURE 1, 2824
- 3618 PUSHACC5
- 3619 CLOSURE 1, 2769
- 3622 PUSHACC3
- 3623 CLOSURE 1, 2724
- 3626 PUSHACC1
- 3627 CLOSURE 1, 2715
- 3630 PUSHACC 9
- 3632 PUSHACC 11
- 3634 PUSHACC 14
- 3636 PUSHACC 16
- 3638 PUSHACC5
- 3639 PUSHACC7
- 3640 PUSHACC6
- 3641 PUSHACC 10
- 3643 PUSHACC 14
- 3645 PUSHACC 13
- 3647 PUSHACC 17
- 3649 PUSHACC 26
- 3651 PUSHACC 28
- 3653 PUSHACC 30
- 3655 PUSHACC 32
- 3657 PUSHACC 34
- 3659 PUSHACC 36
- 3661 PUSHACC 38
- 3663 MAKEBLOCK 18, 0
- 3666 POP 22
- 3668 SETGLOBAL String
- 3670 GETGLOBAL ""
- 3672 PUSHCONSTINT 20
- 3674 C_CALL2 make_vect
- 3676 PUSHCONSTINT 20
- 3678 C_CALL1 weak_create
- 3680 PUSHCONST0
- 3681 PUSHCONSTINT 19
- 3683 PUSH
- 3684 BRANCH 3712
- 3686 CHECK_SIGNALS
- 3687 CONSTINT 115
- 3689 PUSHCONSTINT 20
- 3691 PUSHGETGLOBALFIELD String, 0
- 3694 APPLY2
- 3695 PUSHACC2
- 3696 PUSHACC5
- 3697 SETVECTITEM
- 3698 ACC1
- 3699 PUSHACC4
- 3700 GETVECTITEM
- 3701 MAKEBLOCK1 0
- 3703 PUSHACC2
- 3704 PUSHACC4
- 3705 C_CALL3 weak_set
- 3707 ACC1
- 3708 OFFSETINT 1
- 3710 ASSIGN 1
- 3712 ACC0
- 3713 PUSHACC2
- 3714 LEINT
- 3715 BRANCHIF 3686
- 3717 CONST0
- 3718 POP 2
- 3720 CONST0
- 3721 C_CALL1 gc_full_major
- 3723 CONST0
- 3724 PUSHCONSTINT 19
- 3726 PUSH
- 3727 BRANCH 3750
- 3729 CHECK_SIGNALS
- 3730 ACC1
- 3731 PUSHACC3
- 3732 C_CALL2 weak_get
- 3734 PUSHACC0
- 3735 BRANCHIF 3742
- 3737 GETGLOBAL Not_found
- 3739 MAKEBLOCK1 0
- 3741 RAISE
- 3742 CONST0
- 3743 POP 1
- 3745 ACC1
- 3746 OFFSETINT 1
- 3748 ASSIGN 1
- 3750 ACC0
- 3751 PUSHACC2
- 3752 LEINT
- 3753 BRANCHIF 3729
- 3755 CONST0
- 3756 POP 2
- 3758 CONST0
- 3759 PUSHCONSTINT 19
- 3761 PUSH
- 3762 BRANCH 3782
- 3764 CHECK_SIGNALS
- 3765 CONST0
- 3766 PUSHCONST2
- 3767 PUSHACC3
- 3768 MODINT
- 3769 EQ
- 3770 BRANCHIFNOT 3777
- 3772 GETGLOBAL ""
- 3774 PUSHACC2
- 3775 PUSHACC5
- 3776 SETVECTITEM
- 3777 ACC1
- 3778 OFFSETINT 1
- 3780 ASSIGN 1
- 3782 ACC0
- 3783 PUSHACC2
- 3784 LEINT
- 3785 BRANCHIF 3764
- 3787 CONST0
- 3788 POP 2
- 3790 CONST0
- 3791 C_CALL1 gc_full_major
- 3793 CONST0
- 3794 PUSHCONSTINT 19
- 3796 PUSH
- 3797 BRANCH 3851
- 3799 CHECK_SIGNALS
- 3800 ACC1
- 3801 PUSHACC3
- 3802 C_CALL2 weak_get
- 3804 PUSHACC0
- 3805 BRANCHIFNOT 3829
- 3807 CONST1
- 3808 PUSHCONST2
- 3809 PUSHACC4
- 3810 MODINT
- 3811 EQ
- 3812 BRANCHIFNOT 3839
- 3814 CONSTINT 115
- 3816 PUSHCONSTINT 5
- 3818 PUSHACC2
- 3819 GETFIELD0
- 3820 GETSTRINGCHAR
- 3821 NEQ
- 3822 BRANCHIFNOT 3844
- 3824 GETGLOBAL Not_found
- 3826 MAKEBLOCK1 0
- 3828 RAISE
- 3829 CONST0
- 3830 PUSHCONST2
- 3831 PUSHACC4
- 3832 MODINT
- 3833 EQ
- 3834 BRANCHIFNOT 3839
- 3836 CONST0
- 3837 BRANCH 3844
- 3839 GETGLOBAL Not_found
- 3841 MAKEBLOCK1 0
- 3843 RAISE
- 3844 POP 1
- 3846 ACC1
- 3847 OFFSETINT 1
- 3849 ASSIGN 1
- 3851 ACC0
- 3852 PUSHACC2
- 3853 LEINT
- 3854 BRANCHIF 3799
- 3856 CONST0
- 3857 POP 4
- 3859 ATOM0
- 3860 SETGLOBAL T340-weak
- 3862 STOP
-**)
diff --git a/testsuite/tests/tool-ocaml/t350-heapcheck.ml b/testsuite/tests/tool-ocaml/t350-heapcheck.ml
index ef4557cd52..45295eaaca 100644
--- a/testsuite/tests/tool-ocaml/t350-heapcheck.ml
+++ b/testsuite/tests/tool-ocaml/t350-heapcheck.ml
@@ -23,2532 +23,3 @@ for i = 0 to 19 do
| _ -> raise Not_found
done
;;
-
-(**
- 0 CONSTINT 42
- 2 PUSHACC0
- 3 MAKEBLOCK1 0
- 5 POP 1
- 7 SETGLOBAL Lib
- 9 BRANCH 746
- 11 RESTART
- 12 GRAB 1
- 14 ACC0
- 15 BRANCHIFNOT 28
- 17 ACC1
- 18 PUSHACC1
- 19 GETFIELD1
- 20 PUSHOFFSETCLOSURE0
- 21 APPLY2
- 22 PUSHACC1
- 23 GETFIELD0
- 24 MAKEBLOCK2 0
- 26 RETURN 2
- 28 ACC1
- 29 RETURN 2
- 31 RESTART
- 32 GRAB 3
- 34 CONST0
- 35 PUSHACC4
- 36 LEINT
- 37 BRANCHIFNOT 42
- 39 CONST0
- 40 RETURN 4
- 42 ACC3
- 43 PUSHACC3
- 44 PUSHACC3
- 45 PUSHACC3
- 46 C_CALL4 caml_input
- 48 PUSHCONST0
- 49 PUSHACC1
- 50 EQ
- 51 BRANCHIFNOT 58
- 53 GETGLOBAL End_of_file
- 55 MAKEBLOCK1 0
- 57 RAISE
- 58 ACC0
- 59 PUSHACC5
- 60 SUBINT
- 61 PUSHACC1
- 62 PUSHACC5
- 63 ADDINT
- 64 PUSHACC4
- 65 PUSHACC4
- 66 PUSHOFFSETCLOSURE0
- 67 APPTERM 4, 9
- 70 ACC0
- 71 C_CALL1 caml_input_scan_line
- 73 PUSHCONST0
- 74 PUSHACC1
- 75 EQ
- 76 BRANCHIFNOT 83
- 78 GETGLOBAL End_of_file
- 80 MAKEBLOCK1 0
- 82 RAISE
- 83 CONST0
- 84 PUSHACC1
- 85 GTINT
- 86 BRANCHIFNOT 107
- 88 ACC0
- 89 OFFSETINT -1
- 91 C_CALL1 create_string
- 93 PUSHACC1
- 94 OFFSETINT -1
- 96 PUSHCONST0
- 97 PUSHACC2
- 98 PUSHACC5
- 99 C_CALL4 caml_input
- 101 ACC2
- 102 C_CALL1 caml_input_char
- 104 ACC0
- 105 RETURN 3
- 107 ACC0
- 108 NEGINT
- 109 C_CALL1 create_string
- 111 PUSHACC1
- 112 NEGINT
- 113 PUSHCONST0
- 114 PUSHACC2
- 115 PUSHACC5
- 116 C_CALL4 caml_input
- 118 CONST0
- 119 PUSHTRAP 130
- 121 ACC6
- 122 PUSHOFFSETCLOSURE0
- 123 APPLY1
- 124 PUSHACC5
- 125 PUSHENVACC1
- 126 APPLY2
- 127 POPTRAP
- 128 RETURN 3
- 130 PUSHGETGLOBAL End_of_file
- 132 PUSHACC1
- 133 GETFIELD0
- 134 EQ
- 135 BRANCHIFNOT 140
- 137 ACC1
- 138 RETURN 4
- 140 ACC0
- 141 RAISE
- 142 ACC0
- 143 C_CALL1 caml_flush
- 145 RETURN 1
- 147 RESTART
- 148 GRAB 1
- 150 ACC1
- 151 PUSHACC1
- 152 C_CALL2 caml_output_char
- 154 RETURN 2
- 156 RESTART
- 157 GRAB 1
- 159 ACC1
- 160 PUSHACC1
- 161 C_CALL2 caml_output_char
- 163 RETURN 2
- 165 RESTART
- 166 GRAB 1
- 168 ACC1
- 169 PUSHACC1
- 170 C_CALL2 caml_output_int
- 172 RETURN 2
- 174 RESTART
- 175 GRAB 1
- 177 ACC1
- 178 PUSHACC1
- 179 C_CALL2 caml_seek_out
- 181 RETURN 2
- 183 ACC0
- 184 C_CALL1 caml_pos_out
- 186 RETURN 1
- 188 ACC0
- 189 C_CALL1 caml_channel_size
- 191 RETURN 1
- 193 RESTART
- 194 GRAB 1
- 196 ACC1
- 197 PUSHACC1
- 198 C_CALL2 caml_set_binary_mode
- 200 RETURN 2
- 202 ACC0
- 203 C_CALL1 caml_input_char
- 205 RETURN 1
- 207 ACC0
- 208 C_CALL1 caml_input_char
- 210 RETURN 1
- 212 ACC0
- 213 C_CALL1 caml_input_int
- 215 RETURN 1
- 217 ACC0
- 218 C_CALL1 input_value
- 220 RETURN 1
- 222 RESTART
- 223 GRAB 1
- 225 ACC1
- 226 PUSHACC1
- 227 C_CALL2 caml_seek_in
- 229 RETURN 2
- 231 ACC0
- 232 C_CALL1 caml_pos_in
- 234 RETURN 1
- 236 ACC0
- 237 C_CALL1 caml_channel_size
- 239 RETURN 1
- 241 ACC0
- 242 C_CALL1 caml_close_channel
- 244 RETURN 1
- 246 RESTART
- 247 GRAB 1
- 249 ACC1
- 250 PUSHACC1
- 251 C_CALL2 caml_set_binary_mode
- 253 RETURN 2
- 255 CONST0
- 256 PUSHENVACC1
- 257 APPLY1
- 258 ACC0
- 259 C_CALL1 sys_exit
- 261 RETURN 1
- 263 CONST0
- 264 PUSHENVACC1
- 265 GETFIELD0
- 266 APPTERM1 2
- 268 CONST0
- 269 PUSHENVACC1
- 270 APPLY1
- 271 CONST0
- 272 PUSHENVACC2
- 273 APPTERM1 2
- 275 ENVACC1
- 276 GETFIELD0
- 277 PUSHACC0
- 278 PUSHACC2
- 279 CLOSURE 2, 268
- 282 PUSHENVACC1
- 283 SETFIELD0
- 284 RETURN 2
- 286 ENVACC1
- 287 C_CALL1 caml_flush
- 289 ENVACC2
- 290 C_CALL1 caml_flush
- 292 RETURN 1
- 294 CONST0
- 295 PUSHENVACC1
- 296 APPLY1
- 297 C_CALL1 float_of_string
- 299 RETURN 1
- 301 CONST0
- 302 PUSHENVACC1
- 303 APPLY1
- 304 C_CALL1 int_of_string
- 306 RETURN 1
- 308 ENVACC2
- 309 C_CALL1 caml_flush
- 311 ENVACC1
- 312 PUSHENVACC3
- 313 APPTERM1 2
- 315 CONSTINT 13
- 317 PUSHENVACC1
- 318 C_CALL2 caml_output_char
- 320 ENVACC1
- 321 C_CALL1 caml_flush
- 323 RETURN 1
- 325 ACC0
- 326 PUSHENVACC1
- 327 PUSHENVACC2
- 328 APPLY2
- 329 CONSTINT 13
- 331 PUSHENVACC1
- 332 C_CALL2 caml_output_char
- 334 ENVACC1
- 335 C_CALL1 caml_flush
- 337 RETURN 1
- 339 ACC0
- 340 PUSHENVACC1
- 341 APPLY1
- 342 PUSHENVACC2
- 343 PUSHENVACC3
- 344 APPTERM2 3
- 346 ACC0
- 347 PUSHENVACC1
- 348 APPLY1
- 349 PUSHENVACC2
- 350 PUSHENVACC3
- 351 APPTERM2 3
- 353 ACC0
- 354 PUSHENVACC1
- 355 PUSHENVACC2
- 356 APPTERM2 3
- 358 ACC0
- 359 PUSHENVACC1
- 360 C_CALL2 caml_output_char
- 362 RETURN 1
- 364 CONSTINT 13
- 366 PUSHENVACC1
- 367 C_CALL2 caml_output_char
- 369 ENVACC1
- 370 C_CALL1 caml_flush
- 372 RETURN 1
- 374 ACC0
- 375 PUSHENVACC1
- 376 PUSHENVACC2
- 377 APPLY2
- 378 CONSTINT 13
- 380 PUSHENVACC1
- 381 C_CALL2 caml_output_char
- 383 RETURN 1
- 385 ACC0
- 386 PUSHENVACC1
- 387 APPLY1
- 388 PUSHENVACC2
- 389 PUSHENVACC3
- 390 APPTERM2 3
- 392 ACC0
- 393 PUSHENVACC1
- 394 APPLY1
- 395 PUSHENVACC2
- 396 PUSHENVACC3
- 397 APPTERM2 3
- 399 ACC0
- 400 PUSHENVACC1
- 401 PUSHENVACC2
- 402 APPTERM2 3
- 404 ACC0
- 405 PUSHENVACC1
- 406 C_CALL2 caml_output_char
- 408 RETURN 1
- 410 RESTART
- 411 GRAB 3
- 413 CONST0
- 414 PUSHACC3
- 415 LTINT
- 416 BRANCHIF 427
- 418 ACC1
- 419 C_CALL1 ml_string_length
- 421 PUSHACC4
- 422 PUSHACC4
- 423 ADDINT
- 424 GTINT
- 425 BRANCHIFNOT 432
- 427 GETGLOBAL "really_input"
- 429 PUSHENVACC1
- 430 APPTERM1 5
- 432 ACC3
- 433 PUSHACC3
- 434 PUSHACC3
- 435 PUSHACC3
- 436 PUSHENVACC2
- 437 APPTERM 4, 8
- 440 RESTART
- 441 GRAB 3
- 443 CONST0
- 444 PUSHACC3
- 445 LTINT
- 446 BRANCHIF 457
- 448 ACC1
- 449 C_CALL1 ml_string_length
- 451 PUSHACC4
- 452 PUSHACC4
- 453 ADDINT
- 454 GTINT
- 455 BRANCHIFNOT 462
- 457 GETGLOBAL "input"
- 459 PUSHENVACC1
- 460 APPTERM1 5
- 462 ACC3
- 463 PUSHACC3
- 464 PUSHACC3
- 465 PUSHACC3
- 466 C_CALL4 caml_input
- 468 RETURN 4
- 470 ACC0
- 471 PUSHCONST0
- 472 PUSHGETGLOBAL <0>(0, <0>(6, 0))
- 474 PUSHENVACC1
- 475 APPTERM3 4
- 477 ACC0
- 478 PUSHCONST0
- 479 PUSHGETGLOBAL <0>(0, <0>(7, 0))
- 481 PUSHENVACC1
- 482 APPTERM3 4
- 484 RESTART
- 485 GRAB 2
- 487 ACC1
- 488 PUSHACC1
- 489 PUSHACC4
- 490 C_CALL3 sys_open
- 492 C_CALL1 caml_open_descriptor
- 494 RETURN 3
- 496 ACC0
- 497 C_CALL1 caml_flush
- 499 ACC0
- 500 C_CALL1 caml_close_channel
- 502 RETURN 1
- 504 RESTART
- 505 GRAB 1
- 507 CONST0
- 508 PUSHACC2
- 509 PUSHACC2
- 510 C_CALL3 output_value
- 512 RETURN 2
- 514 RESTART
- 515 GRAB 3
- 517 CONST0
- 518 PUSHACC3
- 519 LTINT
- 520 BRANCHIF 531
- 522 ACC1
- 523 C_CALL1 ml_string_length
- 525 PUSHACC4
- 526 PUSHACC4
- 527 ADDINT
- 528 GTINT
- 529 BRANCHIFNOT 536
- 531 GETGLOBAL "output"
- 533 PUSHENVACC1
- 534 APPTERM1 5
- 536 ACC3
- 537 PUSHACC3
- 538 PUSHACC3
- 539 PUSHACC3
- 540 C_CALL4 caml_output
- 542 RETURN 4
- 544 RESTART
- 545 GRAB 1
- 547 ACC1
- 548 C_CALL1 ml_string_length
- 550 PUSHCONST0
- 551 PUSHACC3
- 552 PUSHACC3
- 553 C_CALL4 caml_output
- 555 RETURN 2
- 557 ACC0
- 558 PUSHCONSTINT 438
- 560 PUSHGETGLOBAL <0>(1, <0>(3, <0>(4, <0>(6, 0))))
- 562 PUSHENVACC1
- 563 APPTERM3 4
- 565 ACC0
- 566 PUSHCONSTINT 438
- 568 PUSHGETGLOBAL <0>(1, <0>(3, <0>(4, <0>(7, 0))))
- 570 PUSHENVACC1
- 571 APPTERM3 4
- 573 RESTART
- 574 GRAB 2
- 576 ACC1
- 577 PUSHACC1
- 578 PUSHACC4
- 579 C_CALL3 sys_open
- 581 C_CALL1 caml_open_descriptor
- 583 RETURN 3
- 585 ACC0
- 586 PUSHGETGLOBAL "%.12g"
- 588 C_CALL2 format_float
- 590 RETURN 1
- 592 ACC0
- 593 PUSHGETGLOBAL "%d"
- 595 C_CALL2 format_int
- 597 RETURN 1
- 599 GETGLOBAL "false"
- 601 PUSHACC1
- 602 C_CALL2 string_equal
- 604 BRANCHIFNOT 609
- 606 CONST0
- 607 RETURN 1
- 609 GETGLOBAL "true"
- 611 PUSHACC1
- 612 C_CALL2 string_equal
- 614 BRANCHIFNOT 619
- 616 CONST1
- 617 RETURN 1
- 619 GETGLOBAL "bool_of_string"
- 621 PUSHENVACC1
- 622 APPTERM1 2
- 624 ACC0
- 625 BRANCHIFNOT 631
- 627 GETGLOBAL "true"
- 629 RETURN 1
- 631 GETGLOBAL "false"
- 633 RETURN 1
- 635 CONST0
- 636 PUSHACC1
- 637 LTINT
- 638 BRANCHIF 646
- 640 CONSTINT 255
- 642 PUSHACC1
- 643 GTINT
- 644 BRANCHIFNOT 651
- 646 GETGLOBAL "char_of_int"
- 648 PUSHENVACC1
- 649 APPTERM1 2
- 651 ACC0
- 652 RETURN 1
- 654 RESTART
- 655 GRAB 1
- 657 ACC0
- 658 C_CALL1 ml_string_length
- 660 PUSHACC2
- 661 C_CALL1 ml_string_length
- 663 PUSHACC0
- 664 PUSHACC2
- 665 ADDINT
- 666 C_CALL1 create_string
- 668 PUSHACC2
- 669 PUSHCONST0
- 670 PUSHACC2
- 671 PUSHCONST0
- 672 PUSHACC7
- 673 C_CALL5 blit_string
- 675 ACC1
- 676 PUSHACC3
- 677 PUSHACC2
- 678 PUSHCONST0
- 679 PUSHACC 8
- 681 C_CALL5 blit_string
- 683 ACC0
- 684 RETURN 5
- 686 CONSTINT -1
- 688 PUSHACC1
- 689 XORINT
- 690 RETURN 1
- 692 CONST0
- 693 PUSHACC1
- 694 GEINT
- 695 BRANCHIFNOT 700
- 697 ACC0
- 698 RETURN 1
- 700 ACC0
- 701 NEGINT
- 702 RETURN 1
- 704 RESTART
- 705 GRAB 1
- 707 ACC1
- 708 PUSHACC1
- 709 C_CALL2 greaterequal
- 711 BRANCHIFNOT 716
- 713 ACC0
- 714 RETURN 2
- 716 ACC1
- 717 RETURN 2
- 719 RESTART
- 720 GRAB 1
- 722 ACC1
- 723 PUSHACC1
- 724 C_CALL2 lessequal
- 726 BRANCHIFNOT 731
- 728 ACC0
- 729 RETURN 2
- 731 ACC1
- 732 RETURN 2
- 734 ACC0
- 735 PUSHGETGLOBAL Invalid_argument
- 737 MAKEBLOCK2 0
- 739 RAISE
- 740 ACC0
- 741 PUSHGETGLOBAL Failure
- 743 MAKEBLOCK2 0
- 745 RAISE
- 746 CLOSURE 0, 740
- 749 PUSH
- 750 CLOSURE 0, 734
- 753 PUSHGETGLOBAL "Pervasives.Exit"
- 755 MAKEBLOCK1 0
- 757 PUSHGETGLOBAL "Pervasives.Assert_failure"
- 759 MAKEBLOCK1 0
- 761 PUSH
- 762 CLOSURE 0, 720
- 765 PUSH
- 766 CLOSURE 0, 705
- 769 PUSH
- 770 CLOSURE 0, 692
- 773 PUSH
- 774 CLOSURE 0, 686
- 777 PUSHCONST0
- 778 PUSHCONSTINT 31
- 780 PUSHCONST1
- 781 LSLINT
- 782 EQ
- 783 BRANCHIFNOT 789
- 785 CONSTINT 30
- 787 BRANCH 791
- 789 CONSTINT 62
- 791 PUSHCONST1
- 792 LSLINT
- 793 PUSHACC0
- 794 OFFSETINT -1
- 796 PUSH
- 797 CLOSURE 0, 655
- 800 PUSHACC 9
- 802 CLOSURE 1, 635
- 805 PUSH
- 806 CLOSURE 0, 624
- 809 PUSHACC 11
- 811 CLOSURE 1, 599
- 814 PUSH
- 815 CLOSURE 0, 592
- 818 PUSH
- 819 CLOSURE 0, 585
- 822 PUSH
- 823 CLOSUREREC 0, 12
- 827 CONST0
- 828 C_CALL1 caml_open_descriptor
- 830 PUSHCONST1
- 831 C_CALL1 caml_open_descriptor
- 833 PUSHCONST2
- 834 C_CALL1 caml_open_descriptor
- 836 PUSH
- 837 CLOSURE 0, 574
- 840 PUSHACC0
- 841 CLOSURE 1, 565
- 844 PUSHACC1
- 845 CLOSURE 1, 557
- 848 PUSH
- 849 CLOSURE 0, 545
- 852 PUSHACC 22
- 854 CLOSURE 1, 515
- 857 PUSH
- 858 CLOSURE 0, 505
- 861 PUSH
- 862 CLOSURE 0, 496
- 865 PUSH
- 866 CLOSURE 0, 485
- 869 PUSHACC0
- 870 CLOSURE 1, 477
- 873 PUSHACC1
- 874 CLOSURE 1, 470
- 877 PUSHACC 28
- 879 CLOSURE 1, 441
- 882 PUSH
- 883 CLOSUREREC 0, 32
- 887 ACC0
- 888 PUSHACC 31
- 890 CLOSURE 2, 411
- 893 PUSHACC 22
- 895 CLOSUREREC 1, 70
- 899 ACC 15
- 901 CLOSURE 1, 404
- 904 PUSHACC 11
- 906 PUSHACC 17
- 908 CLOSURE 2, 399
- 911 PUSHACC 12
- 913 PUSHACC 18
- 915 PUSHACC 23
- 917 CLOSURE 3, 392
- 920 PUSHACC 13
- 922 PUSHACC 19
- 924 PUSHACC 23
- 926 CLOSURE 3, 385
- 929 PUSHACC 14
- 931 PUSHACC 20
- 933 CLOSURE 2, 374
- 936 PUSHACC 20
- 938 CLOSURE 1, 364
- 941 PUSHACC 20
- 943 CLOSURE 1, 358
- 946 PUSHACC 17
- 948 PUSHACC 22
- 950 CLOSURE 2, 353
- 953 PUSHACC 18
- 955 PUSHACC 23
- 957 PUSHACC 29
- 959 CLOSURE 3, 346
- 962 PUSHACC 19
- 964 PUSHACC 24
- 966 PUSHACC 29
- 968 CLOSURE 3, 339
- 971 PUSHACC 20
- 973 PUSHACC 25
- 975 CLOSURE 2, 325
- 978 PUSHACC 25
- 980 CLOSURE 1, 315
- 983 PUSHACC 12
- 985 PUSHACC 28
- 987 PUSHACC 30
- 989 CLOSURE 3, 308
- 992 PUSHACC0
- 993 CLOSURE 1, 301
- 996 PUSHACC1
- 997 CLOSURE 1, 294
- 1000 PUSHACC 29
- 1002 PUSHACC 31
- 1004 CLOSURE 2, 286
- 1007 MAKEBLOCK1 0
- 1009 PUSHACC0
- 1010 CLOSURE 1, 275
- 1013 PUSHACC1
- 1014 CLOSURE 1, 263
- 1017 PUSHACC0
- 1018 CLOSURE 1, 255
- 1021 PUSHACC1
- 1022 PUSHACC 22
- 1024 PUSHACC4
- 1025 PUSHACC3
- 1026 PUSH
- 1027 CLOSURE 0, 247
- 1030 PUSH
- 1031 CLOSURE 0, 241
- 1034 PUSH
- 1035 CLOSURE 0, 236
- 1038 PUSH
- 1039 CLOSURE 0, 231
- 1042 PUSH
- 1043 CLOSURE 0, 223
- 1046 PUSH
- 1047 CLOSURE 0, 217
- 1050 PUSH
- 1051 CLOSURE 0, 212
- 1054 PUSH
- 1055 CLOSURE 0, 207
- 1058 PUSHACC 32
- 1060 PUSHACC 35
- 1062 PUSHACC 33
- 1064 PUSH
- 1065 CLOSURE 0, 202
- 1068 PUSHACC 41
- 1070 PUSHACC 40
- 1072 PUSHACC 42
- 1074 PUSH
- 1075 CLOSURE 0, 194
- 1078 PUSHACC 46
- 1080 PUSH
- 1081 CLOSURE 0, 188
- 1084 PUSH
- 1085 CLOSURE 0, 183
- 1088 PUSH
- 1089 CLOSURE 0, 175
- 1092 PUSHACC 51
- 1094 PUSH
- 1095 CLOSURE 0, 166
- 1098 PUSH
- 1099 CLOSURE 0, 157
- 1102 PUSHACC 55
- 1104 PUSHACC 57
- 1106 PUSH
- 1107 CLOSURE 0, 148
- 1110 PUSH
- 1111 CLOSURE 0, 142
- 1114 PUSHACC 63
- 1116 PUSHACC 62
- 1118 PUSHACC 64
- 1120 PUSHACC 38
- 1122 PUSHACC 40
- 1124 PUSHACC 42
- 1126 PUSHACC 44
- 1128 PUSHACC 46
- 1130 PUSHACC 48
- 1132 PUSHACC 50
- 1134 PUSHACC 52
- 1136 PUSHACC 54
- 1138 PUSHACC 56
- 1140 PUSHACC 58
- 1142 PUSHACC 60
- 1144 PUSHACC 62
- 1146 PUSHACC 64
- 1148 PUSHACC 66
- 1150 PUSHACC 82
- 1152 PUSHACC 84
- 1154 PUSHACC 86
- 1156 PUSHACC 88
- 1158 PUSHACC 90
- 1160 PUSHACC 92
- 1162 PUSHACC 94
- 1164 PUSHACC 96
- 1166 PUSHACC 98
- 1168 PUSHACC 100
- 1170 PUSHACC 104
- 1172 PUSHACC 104
- 1174 PUSHACC 104
- 1176 PUSHACC 108
- 1178 PUSHACC 110
- 1180 PUSHACC 112
- 1182 PUSHACC 117
- 1184 PUSHACC 117
- 1186 PUSHACC 117
- 1188 PUSHACC 117
- 1190 MAKEBLOCK 69, 0
- 1193 POP 53
- 1195 SETGLOBAL Pervasives
- 1197 BRANCH 2177
- 1199 RESTART
- 1200 GRAB 1
- 1202 ACC1
- 1203 BRANCHIFNOT 1213
- 1205 ACC1
- 1206 GETFIELD1
- 1207 PUSHACC1
- 1208 OFFSETINT 1
- 1210 PUSHOFFSETCLOSURE0
- 1211 APPTERM2 4
- 1213 ACC0
- 1214 RETURN 2
- 1216 RESTART
- 1217 GRAB 1
- 1219 ACC0
- 1220 BRANCHIFNOT 1251
- 1222 CONST0
- 1223 PUSHACC2
- 1224 EQ
- 1225 BRANCHIFNOT 1231
- 1227 ACC0
- 1228 GETFIELD0
- 1229 RETURN 2
- 1231 CONST0
- 1232 PUSHACC2
- 1233 GTINT
- 1234 BRANCHIFNOT 1244
- 1236 ACC1
- 1237 OFFSETINT -1
- 1239 PUSHACC1
- 1240 GETFIELD1
- 1241 PUSHOFFSETCLOSURE0
- 1242 APPTERM2 4
- 1244 GETGLOBAL "List.nth"
- 1246 PUSHGETGLOBALFIELD Pervasives, 2
- 1249 APPTERM1 3
- 1251 GETGLOBAL "nth"
- 1253 PUSHGETGLOBALFIELD Pervasives, 3
- 1256 APPTERM1 3
- 1258 RESTART
- 1259 GRAB 1
- 1261 ACC0
- 1262 BRANCHIFNOT 1274
- 1264 ACC1
- 1265 PUSHACC1
- 1266 GETFIELD0
- 1267 MAKEBLOCK2 0
- 1269 PUSHACC1
- 1270 GETFIELD1
- 1271 PUSHOFFSETCLOSURE0
- 1272 APPTERM2 4
- 1274 ACC1
- 1275 RETURN 2
- 1277 ACC0
- 1278 BRANCHIFNOT 1291
- 1280 ACC0
- 1281 GETFIELD1
- 1282 PUSHOFFSETCLOSURE0
- 1283 APPLY1
- 1284 PUSHACC1
- 1285 GETFIELD0
- 1286 PUSHGETGLOBALFIELD Pervasives, 16
- 1289 APPTERM2 3
- 1291 RETURN 1
- 1293 RESTART
- 1294 GRAB 1
- 1296 ACC1
- 1297 BRANCHIFNOT 1313
- 1299 ACC1
- 1300 GETFIELD0
- 1301 PUSHACC1
- 1302 APPLY1
- 1303 PUSHACC2
- 1304 GETFIELD1
- 1305 PUSHACC2
- 1306 PUSHOFFSETCLOSURE0
- 1307 APPLY2
- 1308 PUSHACC1
- 1309 MAKEBLOCK2 0
- 1311 POP 1
- 1313 RETURN 2
- 1315 RESTART
- 1316 GRAB 1
- 1318 ACC1
- 1319 BRANCHIFNOT 1331
- 1321 ACC1
- 1322 GETFIELD0
- 1323 PUSHACC1
- 1324 APPLY1
- 1325 ACC1
- 1326 GETFIELD1
- 1327 PUSHACC1
- 1328 PUSHOFFSETCLOSURE0
- 1329 APPTERM2 4
- 1331 RETURN 2
- 1333 RESTART
- 1334 GRAB 2
- 1336 ACC2
- 1337 BRANCHIFNOT 1350
- 1339 ACC2
- 1340 GETFIELD1
- 1341 PUSHACC3
- 1342 GETFIELD0
- 1343 PUSHACC3
- 1344 PUSHACC3
- 1345 APPLY2
- 1346 PUSHACC2
- 1347 PUSHOFFSETCLOSURE0
- 1348 APPTERM3 6
- 1350 ACC1
- 1351 RETURN 3
- 1353 RESTART
- 1354 GRAB 2
- 1356 ACC1
- 1357 BRANCHIFNOT 1370
- 1359 ACC2
- 1360 PUSHACC2
- 1361 GETFIELD1
- 1362 PUSHACC2
- 1363 PUSHOFFSETCLOSURE0
- 1364 APPLY3
- 1365 PUSHACC2
- 1366 GETFIELD0
- 1367 PUSHACC2
- 1368 APPTERM2 5
- 1370 ACC2
- 1371 RETURN 3
- 1373 RESTART
- 1374 GRAB 2
- 1376 ACC1
- 1377 BRANCHIFNOT 1400
- 1379 ACC2
- 1380 BRANCHIFNOT 1407
- 1382 ACC2
- 1383 GETFIELD0
- 1384 PUSHACC2
- 1385 GETFIELD0
- 1386 PUSHACC2
- 1387 APPLY2
- 1388 PUSHACC3
- 1389 GETFIELD1
- 1390 PUSHACC3
- 1391 GETFIELD1
- 1392 PUSHACC3
- 1393 PUSHOFFSETCLOSURE0
- 1394 APPLY3
- 1395 PUSHACC1
- 1396 MAKEBLOCK2 0
- 1398 RETURN 4
- 1400 ACC2
- 1401 BRANCHIFNOT 1405
- 1403 BRANCH 1407
- 1405 RETURN 3
- 1407 GETGLOBAL "List.map2"
- 1409 PUSHGETGLOBALFIELD Pervasives, 2
- 1412 APPTERM1 4
- 1414 RESTART
- 1415 GRAB 2
- 1417 ACC1
- 1418 BRANCHIFNOT 1437
- 1420 ACC2
- 1421 BRANCHIFNOT 1444
- 1423 ACC2
- 1424 GETFIELD0
- 1425 PUSHACC2
- 1426 GETFIELD0
- 1427 PUSHACC2
- 1428 APPLY2
- 1429 ACC2
- 1430 GETFIELD1
- 1431 PUSHACC2
- 1432 GETFIELD1
- 1433 PUSHACC2
- 1434 PUSHOFFSETCLOSURE0
- 1435 APPTERM3 6
- 1437 ACC2
- 1438 BRANCHIFNOT 1442
- 1440 BRANCH 1444
- 1442 RETURN 3
- 1444 GETGLOBAL "List.iter2"
- 1446 PUSHGETGLOBALFIELD Pervasives, 2
- 1449 APPTERM1 4
- 1451 RESTART
- 1452 GRAB 3
- 1454 ACC2
- 1455 BRANCHIFNOT 1476
- 1457 ACC3
- 1458 BRANCHIFNOT 1482
- 1460 ACC3
- 1461 GETFIELD1
- 1462 PUSHACC3
- 1463 GETFIELD1
- 1464 PUSHACC5
- 1465 GETFIELD0
- 1466 PUSHACC5
- 1467 GETFIELD0
- 1468 PUSHACC5
- 1469 PUSHACC5
- 1470 APPLY3
- 1471 PUSHACC3
- 1472 PUSHOFFSETCLOSURE0
- 1473 APPTERM 4, 8
- 1476 ACC3
- 1477 BRANCHIF 1482
- 1479 ACC1
- 1480 RETURN 4
- 1482 GETGLOBAL "List.fold_left2"
- 1484 PUSHGETGLOBALFIELD Pervasives, 2
- 1487 APPTERM1 5
- 1489 RESTART
- 1490 GRAB 3
- 1492 ACC1
- 1493 BRANCHIFNOT 1516
- 1495 ACC2
- 1496 BRANCHIFNOT 1522
- 1498 PUSH_RETADDR 1509
- 1500 ACC6
- 1501 PUSHACC6
- 1502 GETFIELD1
- 1503 PUSHACC6
- 1504 GETFIELD1
- 1505 PUSHACC6
- 1506 PUSHOFFSETCLOSURE0
- 1507 APPLY 4
- 1509 PUSHACC3
- 1510 GETFIELD0
- 1511 PUSHACC3
- 1512 GETFIELD0
- 1513 PUSHACC3
- 1514 APPTERM3 7
- 1516 ACC2
- 1517 BRANCHIF 1522
- 1519 ACC3
- 1520 RETURN 4
- 1522 GETGLOBAL "List.fold_right2"
- 1524 PUSHGETGLOBALFIELD Pervasives, 2
- 1527 APPTERM1 5
- 1529 RESTART
- 1530 GRAB 1
- 1532 ACC1
- 1533 BRANCHIFNOT 1549
- 1535 ACC1
- 1536 GETFIELD0
- 1537 PUSHACC1
- 1538 APPLY1
- 1539 BRANCHIFNOT 1547
- 1541 ACC1
- 1542 GETFIELD1
- 1543 PUSHACC1
- 1544 PUSHOFFSETCLOSURE0
- 1545 APPTERM2 4
- 1547 RETURN 2
- 1549 CONST1
- 1550 RETURN 2
- 1552 RESTART
- 1553 GRAB 1
- 1555 ACC1
- 1556 BRANCHIFNOT 1570
- 1558 ACC1
- 1559 GETFIELD0
- 1560 PUSHACC1
- 1561 APPLY1
- 1562 BRANCHIF 1570
- 1564 ACC1
- 1565 GETFIELD1
- 1566 PUSHACC1
- 1567 PUSHOFFSETCLOSURE0
- 1568 APPTERM2 4
- 1570 RETURN 2
- 1572 RESTART
- 1573 GRAB 2
- 1575 ACC1
- 1576 BRANCHIFNOT 1599
- 1578 ACC2
- 1579 BRANCHIFNOT 1605
- 1581 ACC2
- 1582 GETFIELD0
- 1583 PUSHACC2
- 1584 GETFIELD0
- 1585 PUSHACC2
- 1586 APPLY2
- 1587 BRANCHIFNOT 1597
- 1589 ACC2
- 1590 GETFIELD1
- 1591 PUSHACC2
- 1592 GETFIELD1
- 1593 PUSHACC2
- 1594 PUSHOFFSETCLOSURE0
- 1595 APPTERM3 6
- 1597 RETURN 3
- 1599 ACC2
- 1600 BRANCHIF 1605
- 1602 CONST1
- 1603 RETURN 3
- 1605 GETGLOBAL "List.for_all2"
- 1607 PUSHGETGLOBALFIELD Pervasives, 2
- 1610 APPTERM1 4
- 1612 RESTART
- 1613 GRAB 2
- 1615 ACC1
- 1616 BRANCHIFNOT 1639
- 1618 ACC2
- 1619 BRANCHIFNOT 1646
- 1621 ACC2
- 1622 GETFIELD0
- 1623 PUSHACC2
- 1624 GETFIELD0
- 1625 PUSHACC2
- 1626 APPLY2
- 1627 BRANCHIF 1637
- 1629 ACC2
- 1630 GETFIELD1
- 1631 PUSHACC2
- 1632 GETFIELD1
- 1633 PUSHACC2
- 1634 PUSHOFFSETCLOSURE0
- 1635 APPTERM3 6
- 1637 RETURN 3
- 1639 ACC2
- 1640 BRANCHIFNOT 1644
- 1642 BRANCH 1646
- 1644 RETURN 3
- 1646 GETGLOBAL "List.exists2"
- 1648 PUSHGETGLOBALFIELD Pervasives, 2
- 1651 APPTERM1 4
- 1653 RESTART
- 1654 GRAB 1
- 1656 ACC1
- 1657 BRANCHIFNOT 1672
- 1659 ACC0
- 1660 PUSHACC2
- 1661 GETFIELD0
- 1662 C_CALL2 equal
- 1664 BRANCHIF 1672
- 1666 ACC1
- 1667 GETFIELD1
- 1668 PUSHACC1
- 1669 PUSHOFFSETCLOSURE0
- 1670 APPTERM2 4
- 1672 RETURN 2
- 1674 RESTART
- 1675 GRAB 1
- 1677 ACC1
- 1678 BRANCHIFNOT 1692
- 1680 ACC0
- 1681 PUSHACC2
- 1682 GETFIELD0
- 1683 EQ
- 1684 BRANCHIF 1692
- 1686 ACC1
- 1687 GETFIELD1
- 1688 PUSHACC1
- 1689 PUSHOFFSETCLOSURE0
- 1690 APPTERM2 4
- 1692 RETURN 2
- 1694 RESTART
- 1695 GRAB 1
- 1697 ACC1
- 1698 BRANCHIFNOT 1719
- 1700 ACC1
- 1701 GETFIELD0
- 1702 PUSHACC1
- 1703 PUSHACC1
- 1704 GETFIELD0
- 1705 C_CALL2 equal
- 1707 BRANCHIFNOT 1713
- 1709 ACC0
- 1710 GETFIELD1
- 1711 RETURN 3
- 1713 ACC2
- 1714 GETFIELD1
- 1715 PUSHACC2
- 1716 PUSHOFFSETCLOSURE0
- 1717 APPTERM2 5
- 1719 GETGLOBAL Not_found
- 1721 MAKEBLOCK1 0
- 1723 RAISE
- 1724 RESTART
- 1725 GRAB 1
- 1727 ACC1
- 1728 BRANCHIFNOT 1748
- 1730 ACC1
- 1731 GETFIELD0
- 1732 PUSHACC1
- 1733 PUSHACC1
- 1734 GETFIELD0
- 1735 EQ
- 1736 BRANCHIFNOT 1742
- 1738 ACC0
- 1739 GETFIELD1
- 1740 RETURN 3
- 1742 ACC2
- 1743 GETFIELD1
- 1744 PUSHACC2
- 1745 PUSHOFFSETCLOSURE0
- 1746 APPTERM2 5
- 1748 GETGLOBAL Not_found
- 1750 MAKEBLOCK1 0
- 1752 RAISE
- 1753 RESTART
- 1754 GRAB 1
- 1756 ACC1
- 1757 BRANCHIFNOT 1773
- 1759 ACC0
- 1760 PUSHACC2
- 1761 GETFIELD0
- 1762 GETFIELD0
- 1763 C_CALL2 equal
- 1765 BRANCHIF 1773
- 1767 ACC1
- 1768 GETFIELD1
- 1769 PUSHACC1
- 1770 PUSHOFFSETCLOSURE0
- 1771 APPTERM2 4
- 1773 RETURN 2
- 1775 RESTART
- 1776 GRAB 1
- 1778 ACC1
- 1779 BRANCHIFNOT 1794
- 1781 ACC0
- 1782 PUSHACC2
- 1783 GETFIELD0
- 1784 GETFIELD0
- 1785 EQ
- 1786 BRANCHIF 1794
- 1788 ACC1
- 1789 GETFIELD1
- 1790 PUSHACC1
- 1791 PUSHOFFSETCLOSURE0
- 1792 APPTERM2 4
- 1794 RETURN 2
- 1796 RESTART
- 1797 GRAB 1
- 1799 ACC1
- 1800 BRANCHIFNOT 1825
- 1802 ACC1
- 1803 GETFIELD0
- 1804 PUSHACC2
- 1805 GETFIELD1
- 1806 PUSHACC2
- 1807 PUSHACC2
- 1808 GETFIELD0
- 1809 C_CALL2 equal
- 1811 BRANCHIFNOT 1816
- 1813 ACC0
- 1814 RETURN 4
- 1816 ACC0
- 1817 PUSHACC3
- 1818 PUSHOFFSETCLOSURE0
- 1819 APPLY2
- 1820 PUSHACC2
- 1821 MAKEBLOCK2 0
- 1823 POP 2
- 1825 RETURN 2
- 1827 RESTART
- 1828 GRAB 1
- 1830 ACC1
- 1831 BRANCHIFNOT 1855
- 1833 ACC1
- 1834 GETFIELD0
- 1835 PUSHACC2
- 1836 GETFIELD1
- 1837 PUSHACC2
- 1838 PUSHACC2
- 1839 GETFIELD0
- 1840 EQ
- 1841 BRANCHIFNOT 1846
- 1843 ACC0
- 1844 RETURN 4
- 1846 ACC0
- 1847 PUSHACC3
- 1848 PUSHOFFSETCLOSURE0
- 1849 APPLY2
- 1850 PUSHACC2
- 1851 MAKEBLOCK2 0
- 1853 POP 2
- 1855 RETURN 2
- 1857 RESTART
- 1858 GRAB 1
- 1860 ACC1
- 1861 BRANCHIFNOT 1879
- 1863 ACC1
- 1864 GETFIELD0
- 1865 PUSHACC0
- 1866 PUSHACC2
- 1867 APPLY1
- 1868 BRANCHIFNOT 1873
- 1870 ACC0
- 1871 RETURN 3
- 1873 ACC2
- 1874 GETFIELD1
- 1875 PUSHACC2
- 1876 PUSHOFFSETCLOSURE0
- 1877 APPTERM2 5
- 1879 GETGLOBAL Not_found
- 1881 MAKEBLOCK1 0
- 1883 RAISE
- 1884 RESTART
- 1885 GRAB 2
- 1887 ACC2
- 1888 BRANCHIFNOT 1917
- 1890 ACC2
- 1891 GETFIELD0
- 1892 PUSHACC3
- 1893 GETFIELD1
- 1894 PUSHACC1
- 1895 PUSHENVACC2
- 1896 APPLY1
- 1897 BRANCHIFNOT 1908
- 1899 ACC0
- 1900 PUSHACC4
- 1901 PUSHACC4
- 1902 PUSHACC4
- 1903 MAKEBLOCK2 0
- 1905 PUSHOFFSETCLOSURE0
- 1906 APPTERM3 8
- 1908 ACC0
- 1909 PUSHACC4
- 1910 PUSHACC3
- 1911 MAKEBLOCK2 0
- 1913 PUSHACC4
- 1914 PUSHOFFSETCLOSURE0
- 1915 APPTERM3 8
- 1917 ACC1
- 1918 PUSHENVACC1
- 1919 APPLY1
- 1920 PUSHACC1
- 1921 PUSHENVACC1
- 1922 APPLY1
- 1923 MAKEBLOCK2 0
- 1925 RETURN 3
- 1927 RESTART
- 1928 GRAB 1
- 1930 ACC0
- 1931 PUSHENVACC1
- 1932 CLOSUREREC 2, 1885
- 1936 ACC2
- 1937 PUSHCONST0
- 1938 PUSHCONST0
- 1939 PUSHACC3
- 1940 APPTERM3 6
- 1942 ACC0
- 1943 BRANCHIFNOT 1967
- 1945 ACC0
- 1946 GETFIELD0
- 1947 PUSHACC1
- 1948 GETFIELD1
- 1949 PUSHOFFSETCLOSURE0
- 1950 APPLY1
- 1951 PUSHACC0
- 1952 GETFIELD1
- 1953 PUSHACC2
- 1954 GETFIELD1
- 1955 MAKEBLOCK2 0
- 1957 PUSHACC1
- 1958 GETFIELD0
- 1959 PUSHACC3
- 1960 GETFIELD0
- 1961 MAKEBLOCK2 0
- 1963 MAKEBLOCK2 0
- 1965 RETURN 3
- 1967 GETGLOBAL <0>(0, 0)
- 1969 RETURN 1
- 1971 RESTART
- 1972 GRAB 1
- 1974 ACC0
- 1975 BRANCHIFNOT 1996
- 1977 ACC1
- 1978 BRANCHIFNOT 2003
- 1980 ACC1
- 1981 GETFIELD1
- 1982 PUSHACC1
- 1983 GETFIELD1
- 1984 PUSHOFFSETCLOSURE0
- 1985 APPLY2
- 1986 PUSHACC2
- 1987 GETFIELD0
- 1988 PUSHACC2
- 1989 GETFIELD0
- 1990 MAKEBLOCK2 0
- 1992 MAKEBLOCK2 0
- 1994 RETURN 2
- 1996 ACC1
- 1997 BRANCHIFNOT 2001
- 1999 BRANCH 2003
- 2001 RETURN 2
- 2003 GETGLOBAL "List.combine"
- 2005 PUSHGETGLOBALFIELD Pervasives, 2
- 2008 APPTERM1 3
- 2010 RESTART
- 2011 GRAB 1
- 2013 ACC1
- 2014 BRANCHIFNOT 2038
- 2016 ACC1
- 2017 GETFIELD0
- 2018 PUSHACC2
- 2019 GETFIELD1
- 2020 PUSHACC1
- 2021 PUSHENVACC2
- 2022 APPLY1
- 2023 BRANCHIFNOT 2033
- 2025 ACC0
- 2026 PUSHACC3
- 2027 PUSHACC3
- 2028 MAKEBLOCK2 0
- 2030 PUSHOFFSETCLOSURE0
- 2031 APPTERM2 6
- 2033 ACC0
- 2034 PUSHACC3
- 2035 PUSHOFFSETCLOSURE0
- 2036 APPTERM2 6
- 2038 ACC0
- 2039 PUSHENVACC1
- 2040 APPTERM1 3
- 2042 ACC0
- 2043 PUSHENVACC1
- 2044 CLOSUREREC 2, 2011
- 2048 CONST0
- 2049 PUSHACC1
- 2050 APPTERM1 3
- 2052 RESTART
- 2053 GRAB 2
- 2055 ACC1
- 2056 BRANCHIFNOT 2077
- 2058 ACC2
- 2059 BRANCHIFNOT 2084
- 2061 ACC2
- 2062 GETFIELD1
- 2063 PUSHACC2
- 2064 GETFIELD1
- 2065 PUSHACC2
- 2066 PUSHACC5
- 2067 GETFIELD0
- 2068 PUSHACC5
- 2069 GETFIELD0
- 2070 PUSHENVACC1
- 2071 APPLY2
- 2072 MAKEBLOCK2 0
- 2074 PUSHOFFSETCLOSURE0
- 2075 APPTERM3 6
- 2077 ACC2
- 2078 BRANCHIFNOT 2082
- 2080 BRANCH 2084
- 2082 RETURN 3
- 2084 GETGLOBAL "List.rev_map2"
- 2086 PUSHGETGLOBALFIELD Pervasives, 2
- 2089 APPTERM1 4
- 2091 RESTART
- 2092 GRAB 2
- 2094 ACC0
- 2095 CLOSUREREC 1, 2053
- 2099 ACC3
- 2100 PUSHACC3
- 2101 PUSHCONST0
- 2102 PUSHACC3
- 2103 APPTERM3 7
- 2105 RESTART
- 2106 GRAB 1
- 2108 ACC1
- 2109 BRANCHIFNOT 2123
- 2111 ACC1
- 2112 GETFIELD1
- 2113 PUSHACC1
- 2114 PUSHACC3
- 2115 GETFIELD0
- 2116 PUSHENVACC1
- 2117 APPLY1
- 2118 MAKEBLOCK2 0
- 2120 PUSHOFFSETCLOSURE0
- 2121 APPTERM2 4
- 2123 ACC0
- 2124 RETURN 2
- 2126 RESTART
- 2127 GRAB 1
- 2129 ACC0
- 2130 CLOSUREREC 1, 2106
- 2134 ACC2
- 2135 PUSHCONST0
- 2136 PUSHACC2
- 2137 APPTERM2 5
- 2139 CONST0
- 2140 PUSHACC1
- 2141 PUSHENVACC1
- 2142 APPTERM2 3
- 2144 ACC0
- 2145 BRANCHIFNOT 2151
- 2147 ACC0
- 2148 GETFIELD1
- 2149 RETURN 1
- 2151 GETGLOBAL "tl"
- 2153 PUSHGETGLOBALFIELD Pervasives, 3
- 2156 APPTERM1 2
- 2158 ACC0
- 2159 BRANCHIFNOT 2165
- 2161 ACC0
- 2162 GETFIELD0
- 2163 RETURN 1
- 2165 GETGLOBAL "hd"
- 2167 PUSHGETGLOBALFIELD Pervasives, 3
- 2170 APPTERM1 2
- 2172 ACC0
- 2173 PUSHCONST0
- 2174 PUSHENVACC1
- 2175 APPTERM2 3
- 2177 CLOSUREREC 0, 1200
- 2181 ACC0
- 2182 CLOSURE 1, 2172
- 2185 PUSH
- 2186 CLOSURE 0, 2158
- 2189 PUSH
- 2190 CLOSURE 0, 2144
- 2193 PUSH
- 2194 CLOSUREREC 0, 1217
- 2198 GETGLOBALFIELD Pervasives, 16
- 2201 PUSH
- 2202 CLOSUREREC 0, 1259
- 2206 ACC0
- 2207 CLOSURE 1, 2139
- 2210 PUSH
- 2211 CLOSUREREC 0, 1277
- 2215 CLOSUREREC 0, 1294
- 2219 CLOSURE 0, 2127
- 2222 PUSH
- 2223 CLOSUREREC 0, 1316
- 2227 CLOSUREREC 0, 1334
- 2231 CLOSUREREC 0, 1354
- 2235 CLOSUREREC 0, 1374
- 2239 CLOSURE 0, 2092
- 2242 PUSH
- 2243 CLOSUREREC 0, 1415
- 2247 CLOSUREREC 0, 1452
- 2251 CLOSUREREC 0, 1490
- 2255 CLOSUREREC 0, 1530
- 2259 CLOSUREREC 0, 1553
- 2263 CLOSUREREC 0, 1573
- 2267 CLOSUREREC 0, 1613
- 2271 CLOSUREREC 0, 1654
- 2275 CLOSUREREC 0, 1675
- 2279 CLOSUREREC 0, 1695
- 2283 CLOSUREREC 0, 1725
- 2287 CLOSUREREC 0, 1754
- 2291 CLOSUREREC 0, 1776
- 2295 CLOSUREREC 0, 1797
- 2299 CLOSUREREC 0, 1828
- 2303 CLOSUREREC 0, 1858
- 2307 ACC 24
- 2309 CLOSURE 1, 2042
- 2312 PUSHACC 25
- 2314 CLOSUREREC 1, 1928
- 2318 CLOSUREREC 0, 1942
- 2322 CLOSUREREC 0, 1972
- 2326 ACC0
- 2327 PUSHACC2
- 2328 PUSHACC7
- 2329 PUSHACC 9
- 2331 PUSHACC 11
- 2333 PUSHACC 13
- 2335 PUSHACC 15
- 2337 PUSHACC 17
- 2339 PUSHACC 10
- 2341 PUSHACC 12
- 2343 PUSHACC 13
- 2345 PUSHACC 15
- 2347 PUSHACC 23
- 2349 PUSHACC 25
- 2351 PUSHACC 27
- 2353 PUSHACC 29
- 2355 PUSHACC 31
- 2357 PUSHACC 33
- 2359 PUSHACC 35
- 2361 PUSHACC 37
- 2363 PUSHACC 40
- 2365 PUSHACC 42
- 2367 PUSHACC 41
- 2369 PUSHACC 45
- 2371 PUSHACC 47
- 2373 PUSHACC 50
- 2375 PUSHACC 52
- 2377 PUSHACC 51
- 2379 PUSHACC 55
- 2381 PUSHACC 56
- 2383 PUSHACC 59
- 2385 PUSHACC 61
- 2387 PUSHACC 60
- 2389 PUSHACC 64
- 2391 PUSHACC 66
- 2393 PUSHACC 68
- 2395 PUSHACC 70
- 2397 MAKEBLOCK 37, 0
- 2400 POP 36
- 2402 SETGLOBAL List
- 2404 BRANCH 2622
- 2406 CONSTINT 97
- 2408 PUSHACC1
- 2409 GEINT
- 2410 BRANCHIFNOT 2418
- 2412 CONSTINT 122
- 2414 PUSHACC1
- 2415 LEINT
- 2416 BRANCHIF 2442
- 2418 CONSTINT 224
- 2420 PUSHACC1
- 2421 GEINT
- 2422 BRANCHIFNOT 2430
- 2424 CONSTINT 246
- 2426 PUSHACC1
- 2427 LEINT
- 2428 BRANCHIF 2442
- 2430 CONSTINT 248
- 2432 PUSHACC1
- 2433 GEINT
- 2434 BRANCHIFNOT 2447
- 2436 CONSTINT 254
- 2438 PUSHACC1
- 2439 LEINT
- 2440 BRANCHIFNOT 2447
- 2442 ACC0
- 2443 OFFSETINT -32
- 2445 RETURN 1
- 2447 ACC0
- 2448 RETURN 1
- 2450 CONSTINT 65
- 2452 PUSHACC1
- 2453 GEINT
- 2454 BRANCHIFNOT 2462
- 2456 CONSTINT 90
- 2458 PUSHACC1
- 2459 LEINT
- 2460 BRANCHIF 2486
- 2462 CONSTINT 192
- 2464 PUSHACC1
- 2465 GEINT
- 2466 BRANCHIFNOT 2474
- 2468 CONSTINT 214
- 2470 PUSHACC1
- 2471 LEINT
- 2472 BRANCHIF 2486
- 2474 CONSTINT 216
- 2476 PUSHACC1
- 2477 GEINT
- 2478 BRANCHIFNOT 2491
- 2480 CONSTINT 222
- 2482 PUSHACC1
- 2483 LEINT
- 2484 BRANCHIFNOT 2491
- 2486 ACC0
- 2487 OFFSETINT 32
- 2489 RETURN 1
- 2491 ACC0
- 2492 RETURN 1
- 2494 CONSTINT 39
- 2496 PUSHACC1
- 2497 LTINT
- 2498 BRANCHIFNOT 2520
- 2500 CONSTINT 9
- 2502 PUSHACC1
- 2503 EQ
- 2504 BRANCHIFNOT 2510
- 2506 GETGLOBAL "\\t"
- 2508 RETURN 1
- 2510 CONSTINT 13
- 2512 PUSHACC1
- 2513 EQ
- 2514 BRANCHIFNOT 2540
- 2516 GETGLOBAL "\\n"
- 2518 RETURN 1
- 2520 CONSTINT 39
- 2522 PUSHACC1
- 2523 EQ
- 2524 BRANCHIFNOT 2530
- 2526 GETGLOBAL "\\'"
- 2528 RETURN 1
- 2530 CONSTINT 92
- 2532 PUSHACC1
- 2533 EQ
- 2534 BRANCHIFNOT 2540
- 2536 GETGLOBAL "\\\\"
- 2538 RETURN 1
- 2540 ACC0
- 2541 C_CALL1 is_printable
- 2543 BRANCHIFNOT 2555
- 2545 CONST1
- 2546 C_CALL1 create_string
- 2548 PUSHACC1
- 2549 PUSHCONST0
- 2550 PUSHACC2
- 2551 SETSTRINGCHAR
- 2552 ACC0
- 2553 RETURN 2
- 2555 ACC0
- 2556 PUSHCONSTINT 4
- 2558 C_CALL1 create_string
- 2560 PUSHCONSTINT 92
- 2562 PUSHCONST0
- 2563 PUSHACC2
- 2564 SETSTRINGCHAR
- 2565 CONSTINT 100
- 2567 PUSHACC2
- 2568 DIVINT
- 2569 PUSHCONSTINT 48
- 2571 ADDINT
- 2572 PUSHCONST1
- 2573 PUSHACC2
- 2574 SETSTRINGCHAR
- 2575 CONSTINT 10
- 2577 PUSHCONSTINT 10
- 2579 PUSHACC3
- 2580 DIVINT
- 2581 MODINT
- 2582 PUSHCONSTINT 48
- 2584 ADDINT
- 2585 PUSHCONST2
- 2586 PUSHACC2
- 2587 SETSTRINGCHAR
- 2588 CONSTINT 10
- 2590 PUSHACC2
- 2591 MODINT
- 2592 PUSHCONSTINT 48
- 2594 ADDINT
- 2595 PUSHCONST3
- 2596 PUSHACC2
- 2597 SETSTRINGCHAR
- 2598 ACC0
- 2599 RETURN 3
- 2601 CONST0
- 2602 PUSHACC1
- 2603 LTINT
- 2604 BRANCHIF 2612
- 2606 CONSTINT 255
- 2608 PUSHACC1
- 2609 GTINT
- 2610 BRANCHIFNOT 2619
- 2612 GETGLOBAL "Char.chr"
- 2614 PUSHGETGLOBALFIELD Pervasives, 2
- 2617 APPTERM1 2
- 2619 ACC0
- 2620 RETURN 1
- 2622 CLOSURE 0, 2601
- 2625 PUSH
- 2626 CLOSURE 0, 2494
- 2629 PUSH
- 2630 CLOSURE 0, 2450
- 2633 PUSH
- 2634 CLOSURE 0, 2406
- 2637 PUSHACC0
- 2638 PUSHACC2
- 2639 PUSHACC4
- 2640 PUSHACC6
- 2641 MAKEBLOCK 4, 0
- 2644 POP 4
- 2646 SETGLOBAL Char
- 2648 BRANCH 3540
- 2650 RESTART
- 2651 GRAB 3
- 2653 ACC1
- 2654 PUSHACC3
- 2655 GEINT
- 2656 BRANCHIFNOT 2663
- 2658 GETGLOBAL Not_found
- 2660 MAKEBLOCK1 0
- 2662 RAISE
- 2663 ACC3
- 2664 PUSHACC3
- 2665 PUSHACC2
- 2666 GETSTRINGCHAR
- 2667 EQ
- 2668 BRANCHIFNOT 2673
- 2670 ACC2
- 2671 RETURN 4
- 2673 ACC3
- 2674 PUSHACC3
- 2675 OFFSETINT 1
- 2677 PUSHACC3
- 2678 PUSHACC3
- 2679 PUSHOFFSETCLOSURE0
- 2680 APPTERM 4, 8
- 2683 RESTART
- 2684 GRAB 2
- 2686 CONST0
- 2687 PUSHACC2
- 2688 LTINT
- 2689 BRANCHIFNOT 2696
- 2691 GETGLOBAL Not_found
- 2693 MAKEBLOCK1 0
- 2695 RAISE
- 2696 ACC2
- 2697 PUSHACC2
- 2698 PUSHACC2
- 2699 GETSTRINGCHAR
- 2700 EQ
- 2701 BRANCHIFNOT 2706
- 2703 ACC1
- 2704 RETURN 3
- 2706 ACC2
- 2707 PUSHACC2
- 2708 OFFSETINT -1
- 2710 PUSHACC2
- 2711 PUSHOFFSETCLOSURE0
- 2712 APPTERM3 6
- 2714 RESTART
- 2715 GRAB 1
- 2717 ACC1
- 2718 PUSHCONST0
- 2719 PUSHACC2
- 2720 PUSHENVACC1
- 2721 APPTERM3 5
- 2723 RESTART
- 2724 GRAB 2
- 2726 CONST0
- 2727 PUSHACC2
- 2728 LTINT
- 2729 BRANCHIF 2738
- 2731 ACC0
- 2732 C_CALL1 ml_string_length
- 2734 PUSHACC2
- 2735 GEINT
- 2736 BRANCHIFNOT 2745
- 2738 GETGLOBAL "String.rcontains_from"
- 2740 PUSHGETGLOBALFIELD Pervasives, 2
- 2743 APPTERM1 4
- 2745 PUSHTRAP 2756
- 2747 ACC6
- 2748 PUSHACC6
- 2749 PUSHACC6
- 2750 PUSHENVACC1
- 2751 APPLY3
- 2752 CONST1
- 2753 POPTRAP
- 2754 RETURN 3
- 2756 PUSHGETGLOBAL Not_found
- 2758 PUSHACC1
- 2759 GETFIELD0
- 2760 EQ
- 2761 BRANCHIFNOT 2766
- 2763 CONST0
- 2764 RETURN 4
- 2766 ACC0
- 2767 RAISE
- 2768 RESTART
- 2769 GRAB 2
- 2771 CONST0
- 2772 PUSHACC2
- 2773 LTINT
- 2774 BRANCHIF 2783
- 2776 ACC0
- 2777 C_CALL1 ml_string_length
- 2779 PUSHACC2
- 2780 GTINT
- 2781 BRANCHIFNOT 2790
- 2783 GETGLOBAL "String.contains_from"
- 2785 PUSHGETGLOBALFIELD Pervasives, 2
- 2788 APPTERM1 4
- 2790 PUSHTRAP 2811
- 2792 PUSH_RETADDR 2807
- 2794 ACC 9
- 2796 PUSHACC 9
- 2798 PUSHACC 9
- 2800 C_CALL1 ml_string_length
- 2802 PUSHACC 10
- 2804 PUSHENVACC1
- 2805 APPLY 4
- 2807 CONST1
- 2808 POPTRAP
- 2809 RETURN 3
- 2811 PUSHGETGLOBAL Not_found
- 2813 PUSHACC1
- 2814 GETFIELD0
- 2815 EQ
- 2816 BRANCHIFNOT 2821
- 2818 CONST0
- 2819 RETURN 4
- 2821 ACC0
- 2822 RAISE
- 2823 RESTART
- 2824 GRAB 2
- 2826 CONST0
- 2827 PUSHACC2
- 2828 LTINT
- 2829 BRANCHIF 2838
- 2831 ACC0
- 2832 C_CALL1 ml_string_length
- 2834 PUSHACC2
- 2835 GEINT
- 2836 BRANCHIFNOT 2845
- 2838 GETGLOBAL "String.rindex_from"
- 2840 PUSHGETGLOBALFIELD Pervasives, 2
- 2843 APPTERM1 4
- 2845 ACC2
- 2846 PUSHACC2
- 2847 PUSHACC2
- 2848 PUSHENVACC1
- 2849 APPTERM3 6
- 2851 RESTART
- 2852 GRAB 1
- 2854 ACC1
- 2855 PUSHACC1
- 2856 C_CALL1 ml_string_length
- 2858 OFFSETINT -1
- 2860 PUSHACC2
- 2861 PUSHENVACC1
- 2862 APPTERM3 5
- 2864 RESTART
- 2865 GRAB 2
- 2867 CONST0
- 2868 PUSHACC2
- 2869 LTINT
- 2870 BRANCHIF 2879
- 2872 ACC0
- 2873 C_CALL1 ml_string_length
- 2875 PUSHACC2
- 2876 GTINT
- 2877 BRANCHIFNOT 2886
- 2879 GETGLOBAL "String.index_from"
- 2881 PUSHGETGLOBALFIELD Pervasives, 2
- 2884 APPTERM1 4
- 2886 ACC2
- 2887 PUSHACC2
- 2888 PUSHACC2
- 2889 C_CALL1 ml_string_length
- 2891 PUSHACC3
- 2892 PUSHENVACC1
- 2893 APPTERM 4, 7
- 2896 RESTART
- 2897 GRAB 1
- 2899 ACC1
- 2900 PUSHCONST0
- 2901 PUSHACC2
- 2902 C_CALL1 ml_string_length
- 2904 PUSHACC3
- 2905 PUSHENVACC1
- 2906 APPTERM 4, 6
- 2909 ACC0
- 2910 PUSHGETGLOBALFIELD Char, 2
- 2913 PUSHENVACC1
- 2914 APPTERM2 3
- 2916 ACC0
- 2917 PUSHGETGLOBALFIELD Char, 3
- 2920 PUSHENVACC1
- 2921 APPTERM2 3
- 2923 RESTART
- 2924 GRAB 1
- 2926 CONST0
- 2927 PUSHACC2
- 2928 C_CALL1 ml_string_length
- 2930 EQ
- 2931 BRANCHIFNOT 2936
- 2933 ACC1
- 2934 RETURN 2
- 2936 ACC1
- 2937 PUSHENVACC1
- 2938 APPLY1
- 2939 PUSHCONST0
- 2940 PUSHACC3
- 2941 GETSTRINGCHAR
- 2942 PUSHACC2
- 2943 APPLY1
- 2944 PUSHCONST0
- 2945 PUSHACC2
- 2946 SETSTRINGCHAR
- 2947 ACC0
- 2948 RETURN 3
- 2950 ACC0
- 2951 PUSHGETGLOBALFIELD Char, 2
- 2954 PUSHENVACC1
- 2955 APPTERM2 3
- 2957 ACC0
- 2958 PUSHGETGLOBALFIELD Char, 3
- 2961 PUSHENVACC1
- 2962 APPTERM2 3
- 2964 RESTART
- 2965 GRAB 1
- 2967 ACC1
- 2968 C_CALL1 ml_string_length
- 2970 PUSHCONST0
- 2971 PUSHACC1
- 2972 EQ
- 2973 BRANCHIFNOT 2978
- 2975 ACC2
- 2976 RETURN 3
- 2978 ACC0
- 2979 C_CALL1 create_string
- 2981 PUSHCONST0
- 2982 PUSHACC2
- 2983 OFFSETINT -1
- 2985 PUSH
- 2986 BRANCH 3002
- 2988 CHECK_SIGNALS
- 2989 ACC1
- 2990 PUSHACC6
- 2991 GETSTRINGCHAR
- 2992 PUSHACC5
- 2993 APPLY1
- 2994 PUSHACC2
- 2995 PUSHACC4
- 2996 SETSTRINGCHAR
- 2997 ACC1
- 2998 OFFSETINT 1
- 3000 ASSIGN 1
- 3002 ACC0
- 3003 PUSHACC2
- 3004 LEINT
- 3005 BRANCHIF 2988
- 3007 CONST0
- 3008 POP 2
- 3010 ACC0
- 3011 RETURN 4
- 3013 CONST0
- 3014 PUSHCONST0
- 3015 PUSHACC2
- 3016 C_CALL1 ml_string_length
- 3018 OFFSETINT -1
- 3020 PUSH
- 3021 BRANCH 3059
- 3023 CHECK_SIGNALS
- 3024 ACC1
- 3025 PUSHACC4
- 3026 GETSTRINGCHAR
- 3027 PUSHACC0
- 3028 PUSHGETGLOBAL "\000\"\000\000\004\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
- 3030 C_CALL2 bitvect_test
- 3032 BRANCHIFNOT 3038
- 3034 CONST0
- 3035 CONST2
- 3036 BRANCH 3048
- 3038 ACC0
- 3039 C_CALL1 is_printable
- 3041 BRANCHIFNOT 3046
- 3043 CONST1
- 3044 BRANCH 3048
- 3046 CONSTINT 4
- 3048 POP 1
- 3050 PUSHACC3
- 3051 ADDINT
- 3052 ASSIGN 2
- 3054 ACC1
- 3055 OFFSETINT 1
- 3057 ASSIGN 1
- 3059 ACC0
- 3060 PUSHACC2
- 3061 LEINT
- 3062 BRANCHIF 3023
- 3064 CONST0
- 3065 POP 2
- 3067 ACC1
- 3068 C_CALL1 ml_string_length
- 3070 PUSHACC1
- 3071 EQ
- 3072 BRANCHIFNOT 3077
- 3074 ACC1
- 3075 RETURN 2
- 3077 ACC0
- 3078 C_CALL1 create_string
- 3080 PUSHCONST0
- 3081 ASSIGN 1
- 3083 CONST0
- 3084 PUSHACC3
- 3085 C_CALL1 ml_string_length
- 3087 OFFSETINT -1
- 3089 PUSH
- 3090 BRANCH 3245
- 3092 CHECK_SIGNALS
- 3093 ACC1
- 3094 PUSHACC5
- 3095 GETSTRINGCHAR
- 3096 PUSHACC0
- 3097 PUSHGETGLOBAL "\000\000\000\000\004\000\000\000\000\000\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
- 3099 C_CALL2 bitvect_test
- 3101 BRANCHIFNOT 3120
- 3103 CONST0
- 3104 CONSTINT 92
- 3106 PUSHACC5
- 3107 PUSHACC5
- 3108 SETSTRINGCHAR
- 3109 ACC4
- 3110 OFFSETINT 1
- 3112 ASSIGN 4
- 3114 ACC0
- 3115 PUSHACC5
- 3116 PUSHACC5
- 3117 SETSTRINGCHAR
- 3118 BRANCH 3233
- 3120 CONSTINT 9
- 3122 PUSHACC1
- 3123 EQ
- 3124 BRANCHIFNOT 3143
- 3126 CONSTINT 92
- 3128 PUSHACC5
- 3129 PUSHACC5
- 3130 SETSTRINGCHAR
- 3131 ACC4
- 3132 OFFSETINT 1
- 3134 ASSIGN 4
- 3136 CONSTINT 116
- 3138 PUSHACC5
- 3139 PUSHACC5
- 3140 SETSTRINGCHAR
- 3141 BRANCH 3233
- 3143 CONSTINT 13
- 3145 PUSHACC1
- 3146 EQ
- 3147 BRANCHIFNOT 3166
- 3149 CONSTINT 92
- 3151 PUSHACC5
- 3152 PUSHACC5
- 3153 SETSTRINGCHAR
- 3154 ACC4
- 3155 OFFSETINT 1
- 3157 ASSIGN 4
- 3159 CONSTINT 110
- 3161 PUSHACC5
- 3162 PUSHACC5
- 3163 SETSTRINGCHAR
- 3164 BRANCH 3233
- 3166 ACC0
- 3167 C_CALL1 is_printable
- 3169 BRANCHIFNOT 3177
- 3171 ACC0
- 3172 PUSHACC5
- 3173 PUSHACC5
- 3174 SETSTRINGCHAR
- 3175 BRANCH 3233
- 3177 ACC0
- 3178 PUSHCONSTINT 92
- 3180 PUSHACC6
- 3181 PUSHACC6
- 3182 SETSTRINGCHAR
- 3183 ACC5
- 3184 OFFSETINT 1
- 3186 ASSIGN 5
- 3188 CONSTINT 100
- 3190 PUSHACC1
- 3191 DIVINT
- 3192 PUSHCONSTINT 48
- 3194 ADDINT
- 3195 PUSHACC6
- 3196 PUSHACC6
- 3197 SETSTRINGCHAR
- 3198 ACC5
- 3199 OFFSETINT 1
- 3201 ASSIGN 5
- 3203 CONSTINT 10
- 3205 PUSHCONSTINT 10
- 3207 PUSHACC2
- 3208 DIVINT
- 3209 MODINT
- 3210 PUSHCONSTINT 48
- 3212 ADDINT
- 3213 PUSHACC6
- 3214 PUSHACC6
- 3215 SETSTRINGCHAR
- 3216 ACC5
- 3217 OFFSETINT 1
- 3219 ASSIGN 5
- 3221 CONSTINT 10
- 3223 PUSHACC1
- 3224 MODINT
- 3225 PUSHCONSTINT 48
- 3227 ADDINT
- 3228 PUSHACC6
- 3229 PUSHACC6
- 3230 SETSTRINGCHAR
- 3231 POP 1
- 3233 POP 1
- 3235 ACC3
- 3236 OFFSETINT 1
- 3238 ASSIGN 3
- 3240 ACC1
- 3241 OFFSETINT 1
- 3243 ASSIGN 1
- 3245 ACC0
- 3246 PUSHACC2
- 3247 LEINT
- 3248 BRANCHIF 3092
- 3250 CONST0
- 3251 POP 2
- 3253 ACC0
- 3254 RETURN 3
- 3256 ENVACC1
- 3257 C_CALL1 ml_string_length
- 3259 PUSHENVACC3
- 3260 GETFIELD0
- 3261 PUSHENVACC2
- 3262 PUSHCONST0
- 3263 PUSHENVACC1
- 3264 C_CALL5 blit_string
- 3266 ENVACC1
- 3267 C_CALL1 ml_string_length
- 3269 PUSHENVACC3
- 3270 GETFIELD0
- 3271 ADDINT
- 3272 PUSHENVACC3
- 3273 SETFIELD0
- 3274 ACC0
- 3275 C_CALL1 ml_string_length
- 3277 PUSHENVACC3
- 3278 GETFIELD0
- 3279 PUSHENVACC2
- 3280 PUSHCONST0
- 3281 PUSHACC4
- 3282 C_CALL5 blit_string
- 3284 ACC0
- 3285 C_CALL1 ml_string_length
- 3287 PUSHENVACC3
- 3288 GETFIELD0
- 3289 ADDINT
- 3290 PUSHENVACC3
- 3291 SETFIELD0
- 3292 RETURN 1
- 3294 ENVACC1
- 3295 OFFSETREF 1
- 3297 ACC0
- 3298 C_CALL1 ml_string_length
- 3300 PUSHENVACC2
- 3301 GETFIELD0
- 3302 ADDINT
- 3303 PUSHENVACC2
- 3304 SETFIELD0
- 3305 RETURN 1
- 3307 RESTART
- 3308 GRAB 1
- 3310 ACC1
- 3311 BRANCHIFNOT 3374
- 3313 ACC1
- 3314 GETFIELD0
- 3315 PUSHCONST0
- 3316 MAKEBLOCK1 0
- 3318 PUSHCONST0
- 3319 MAKEBLOCK1 0
- 3321 PUSHACC4
- 3322 PUSHACC1
- 3323 PUSHACC3
- 3324 CLOSURE 2, 3294
- 3327 PUSHGETGLOBALFIELD List, 9
- 3330 APPLY2
- 3331 ACC1
- 3332 GETFIELD0
- 3333 OFFSETINT -1
- 3335 PUSHACC4
- 3336 C_CALL1 ml_string_length
- 3338 MULINT
- 3339 PUSHACC1
- 3340 GETFIELD0
- 3341 ADDINT
- 3342 C_CALL1 create_string
- 3344 PUSHACC3
- 3345 C_CALL1 ml_string_length
- 3347 PUSHCONST0
- 3348 PUSHACC2
- 3349 PUSHCONST0
- 3350 PUSHACC7
- 3351 C_CALL5 blit_string
- 3353 ACC3
- 3354 C_CALL1 ml_string_length
- 3356 MAKEBLOCK1 0
- 3358 PUSHACC6
- 3359 GETFIELD1
- 3360 PUSHACC1
- 3361 PUSHACC3
- 3362 PUSHACC 8
- 3364 CLOSURE 3, 3256
- 3367 PUSHGETGLOBALFIELD List, 9
- 3370 APPLY2
- 3371 ACC1
- 3372 RETURN 7
- 3374 GETGLOBAL ""
- 3376 RETURN 2
- 3378 RESTART
- 3379 GRAB 4
- 3381 CONST0
- 3382 PUSHACC5
- 3383 LTINT
- 3384 BRANCHIF 3414
- 3386 CONST0
- 3387 PUSHACC2
- 3388 LTINT
- 3389 BRANCHIF 3414
- 3391 ACC0
- 3392 C_CALL1 ml_string_length
- 3394 PUSHACC5
- 3395 PUSHACC3
- 3396 ADDINT
- 3397 GTINT
- 3398 BRANCHIF 3414
- 3400 CONST0
- 3401 PUSHACC4
- 3402 LTINT
- 3403 BRANCHIF 3414
- 3405 ACC2
- 3406 C_CALL1 ml_string_length
- 3408 PUSHACC5
- 3409 PUSHACC5
- 3410 ADDINT
- 3411 GTINT
- 3412 BRANCHIFNOT 3421
- 3414 GETGLOBAL "String.blit"
- 3416 PUSHGETGLOBALFIELD Pervasives, 2
- 3419 APPTERM1 6
- 3421 ACC4
- 3422 PUSHACC4
- 3423 PUSHACC4
- 3424 PUSHACC4
- 3425 PUSHACC4
- 3426 C_CALL5 blit_string
- 3428 RETURN 5
- 3430 RESTART
- 3431 GRAB 3
- 3433 CONST0
- 3434 PUSHACC2
- 3435 LTINT
- 3436 BRANCHIF 3452
- 3438 CONST0
- 3439 PUSHACC3
- 3440 LTINT
- 3441 BRANCHIF 3452
- 3443 ACC0
- 3444 C_CALL1 ml_string_length
- 3446 PUSHACC3
- 3447 PUSHACC3
- 3448 ADDINT
- 3449 GTINT
- 3450 BRANCHIFNOT 3459
- 3452 GETGLOBAL "String.fill"
- 3454 PUSHGETGLOBALFIELD Pervasives, 2
- 3457 APPTERM1 5
- 3459 ACC3
- 3460 PUSHACC3
- 3461 PUSHACC3
- 3462 PUSHACC3
- 3463 C_CALL4 fill_string
- 3465 RETURN 4
- 3467 RESTART
- 3468 GRAB 2
- 3470 CONST0
- 3471 PUSHACC2
- 3472 LTINT
- 3473 BRANCHIF 3489
- 3475 CONST0
- 3476 PUSHACC3
- 3477 LTINT
- 3478 BRANCHIF 3489
- 3480 ACC0
- 3481 C_CALL1 ml_string_length
- 3483 PUSHACC3
- 3484 PUSHACC3
- 3485 ADDINT
- 3486 GTINT
- 3487 BRANCHIFNOT 3496
- 3489 GETGLOBAL "String.sub"
- 3491 PUSHGETGLOBALFIELD Pervasives, 2
- 3494 APPTERM1 4
- 3496 ACC2
- 3497 C_CALL1 create_string
- 3499 PUSHACC3
- 3500 PUSHCONST0
- 3501 PUSHACC2
- 3502 PUSHACC5
- 3503 PUSHACC5
- 3504 C_CALL5 blit_string
- 3506 ACC0
- 3507 RETURN 4
- 3509 ACC0
- 3510 C_CALL1 ml_string_length
- 3512 PUSHACC0
- 3513 C_CALL1 create_string
- 3515 PUSHACC1
- 3516 PUSHCONST0
- 3517 PUSHACC2
- 3518 PUSHCONST0
- 3519 PUSHACC6
- 3520 C_CALL5 blit_string
- 3522 ACC0
- 3523 RETURN 3
- 3525 RESTART
- 3526 GRAB 1
- 3528 ACC0
- 3529 C_CALL1 create_string
- 3531 PUSHACC2
- 3532 PUSHACC2
- 3533 PUSHCONST0
- 3534 PUSHACC3
- 3535 C_CALL4 fill_string
- 3537 ACC0
- 3538 RETURN 3
- 3540 CLOSURE 0, 3526
- 3543 PUSH
- 3544 CLOSURE 0, 3509
- 3547 PUSH
- 3548 CLOSURE 0, 3468
- 3551 PUSH
- 3552 CLOSURE 0, 3431
- 3555 PUSH
- 3556 CLOSURE 0, 3379
- 3559 PUSH
- 3560 CLOSURE 0, 3308
- 3563 PUSH
- 3564 CLOSURE 0, 3013
- 3567 PUSH
- 3568 CLOSURE 0, 2965
- 3571 PUSHACC0
- 3572 CLOSURE 1, 2957
- 3575 PUSHACC1
- 3576 CLOSURE 1, 2950
- 3579 PUSHACC 8
- 3581 CLOSURE 1, 2924
- 3584 PUSHACC0
- 3585 CLOSURE 1, 2916
- 3588 PUSHACC1
- 3589 CLOSURE 1, 2909
- 3592 PUSH
- 3593 CLOSUREREC 0, 2651
- 3597 ACC0
- 3598 CLOSURE 1, 2897
- 3601 PUSHACC1
- 3602 CLOSURE 1, 2865
- 3605 PUSH
- 3606 CLOSUREREC 0, 2684
- 3610 ACC0
- 3611 CLOSURE 1, 2852
- 3614 PUSHACC1
- 3615 CLOSURE 1, 2824
- 3618 PUSHACC5
- 3619 CLOSURE 1, 2769
- 3622 PUSHACC3
- 3623 CLOSURE 1, 2724
- 3626 PUSHACC1
- 3627 CLOSURE 1, 2715
- 3630 PUSHACC 9
- 3632 PUSHACC 11
- 3634 PUSHACC 14
- 3636 PUSHACC 16
- 3638 PUSHACC5
- 3639 PUSHACC7
- 3640 PUSHACC6
- 3641 PUSHACC 10
- 3643 PUSHACC 14
- 3645 PUSHACC 13
- 3647 PUSHACC 17
- 3649 PUSHACC 26
- 3651 PUSHACC 28
- 3653 PUSHACC 30
- 3655 PUSHACC 32
- 3657 PUSHACC 34
- 3659 PUSHACC 36
- 3661 PUSHACC 38
- 3663 MAKEBLOCK 18, 0
- 3666 POP 22
- 3668 SETGLOBAL String
- 3670 CONST0
- 3671 C_CALL1 gc_stat
- 3673 GETGLOBAL ""
- 3675 PUSHCONSTINT 20
- 3677 C_CALL2 make_vect
- 3679 PUSHCONSTINT 20
- 3681 C_CALL1 weak_create
- 3683 PUSHCONST0
- 3684 PUSHCONSTINT 19
- 3686 PUSH
- 3687 BRANCH 3715
- 3689 CHECK_SIGNALS
- 3690 CONSTINT 115
- 3692 PUSHCONSTINT 20
- 3694 PUSHGETGLOBALFIELD String, 0
- 3697 APPLY2
- 3698 PUSHACC2
- 3699 PUSHACC5
- 3700 SETVECTITEM
- 3701 ACC1
- 3702 PUSHACC4
- 3703 GETVECTITEM
- 3704 MAKEBLOCK1 0
- 3706 PUSHACC2
- 3707 PUSHACC4
- 3708 C_CALL3 weak_set
- 3710 ACC1
- 3711 OFFSETINT 1
- 3713 ASSIGN 1
- 3715 ACC0
- 3716 PUSHACC2
- 3717 LEINT
- 3718 BRANCHIF 3689
- 3720 CONST0
- 3721 POP 2
- 3723 CONST0
- 3724 C_CALL1 gc_full_major
- 3726 CONST0
- 3727 PUSHCONSTINT 19
- 3729 PUSH
- 3730 BRANCH 3753
- 3732 CHECK_SIGNALS
- 3733 ACC1
- 3734 PUSHACC3
- 3735 C_CALL2 weak_get
- 3737 PUSHACC0
- 3738 BRANCHIF 3745
- 3740 GETGLOBAL Not_found
- 3742 MAKEBLOCK1 0
- 3744 RAISE
- 3745 CONST0
- 3746 POP 1
- 3748 ACC1
- 3749 OFFSETINT 1
- 3751 ASSIGN 1
- 3753 ACC0
- 3754 PUSHACC2
- 3755 LEINT
- 3756 BRANCHIF 3732
- 3758 CONST0
- 3759 POP 2
- 3761 CONST0
- 3762 PUSHCONSTINT 19
- 3764 PUSH
- 3765 BRANCH 3785
- 3767 CHECK_SIGNALS
- 3768 CONST0
- 3769 PUSHCONST2
- 3770 PUSHACC3
- 3771 MODINT
- 3772 EQ
- 3773 BRANCHIFNOT 3780
- 3775 GETGLOBAL ""
- 3777 PUSHACC2
- 3778 PUSHACC5
- 3779 SETVECTITEM
- 3780 ACC1
- 3781 OFFSETINT 1
- 3783 ASSIGN 1
- 3785 ACC0
- 3786 PUSHACC2
- 3787 LEINT
- 3788 BRANCHIF 3767
- 3790 CONST0
- 3791 POP 2
- 3793 CONST0
- 3794 C_CALL1 gc_full_major
- 3796 CONST0
- 3797 PUSHCONSTINT 19
- 3799 PUSH
- 3800 BRANCH 3854
- 3802 CHECK_SIGNALS
- 3803 ACC1
- 3804 PUSHACC3
- 3805 C_CALL2 weak_get
- 3807 PUSHACC0
- 3808 BRANCHIFNOT 3832
- 3810 CONST1
- 3811 PUSHCONST2
- 3812 PUSHACC4
- 3813 MODINT
- 3814 EQ
- 3815 BRANCHIFNOT 3842
- 3817 CONSTINT 115
- 3819 PUSHCONSTINT 5
- 3821 PUSHACC2
- 3822 GETFIELD0
- 3823 GETSTRINGCHAR
- 3824 NEQ
- 3825 BRANCHIFNOT 3847
- 3827 GETGLOBAL Not_found
- 3829 MAKEBLOCK1 0
- 3831 RAISE
- 3832 CONST0
- 3833 PUSHCONST2
- 3834 PUSHACC4
- 3835 MODINT
- 3836 EQ
- 3837 BRANCHIFNOT 3842
- 3839 CONST0
- 3840 BRANCH 3847
- 3842 GETGLOBAL Not_found
- 3844 MAKEBLOCK1 0
- 3846 RAISE
- 3847 POP 1
- 3849 ACC1
- 3850 OFFSETINT 1
- 3852 ASSIGN 1
- 3854 ACC0
- 3855 PUSHACC2
- 3856 LEINT
- 3857 BRANCHIF 3802
- 3859 CONST0
- 3860 POP 4
- 3862 ATOM0
- 3863 SETGLOBAL T350-heapcheck
- 3865 STOP
-**)
diff --git a/testsuite/tests/tool-ocamldoc/t03.ml b/testsuite/tests/tool-ocamldoc/t03.ml
index 3d06cc5969..9d9e1593b4 100644
--- a/testsuite/tests/tool-ocamldoc/t03.ml
+++ b/testsuite/tests/tool-ocamldoc/t03.ml
@@ -4,4 +4,9 @@ module Bar = struct type t = int let x = 2 end;;
module type MT2 = sig type t val x : t end;;
module type Gee = MT2 with type t = float ;;
-module T = (val (if true then (module Foo:MT2 with type t = int) else (module Bar: MT2 with type t = int)) : MT2 with type t = int);;
+module T = (val
+ (if true
+ then (module Foo:MT2 with type t = int)
+ else (module Bar: MT2 with type t = int))
+ : MT2 with type t = int)
+;;
diff --git a/testsuite/tests/typing-extensions/Makefile b/testsuite/tests/typing-extensions/Makefile
index 5f42b70577..9625a3fbc3 100644
--- a/testsuite/tests/typing-extensions/Makefile
+++ b/testsuite/tests/typing-extensions/Makefile
@@ -1,4 +1,3 @@
BASEDIR=../..
include $(BASEDIR)/makefiles/Makefile.toplevel
include $(BASEDIR)/makefiles/Makefile.common
-
diff --git a/testsuite/tests/typing-extensions/cast.ml b/testsuite/tests/typing-extensions/cast.ml
index afcc2080dc..855f4df76c 100644
--- a/testsuite/tests/typing-extensions/cast.ml
+++ b/testsuite/tests/typing-extensions/cast.ml
@@ -1,7 +1,8 @@
(* By using two types we can have a recursive constraint *)
type 'a class_name = .. constraint 'a = < cast: 'a. 'a name -> 'a; ..>
-and 'a name = Class : 'a class_name -> (< cast: 'a. 'a name -> 'a; ..> as 'a) name
+and 'a name =
+ Class : 'a class_name -> (< cast: 'a. 'a name -> 'a; ..> as 'a) name
;;
exception Bad_cast
@@ -29,7 +30,7 @@ class foo: foo_t =
object(self)
method cast: type a. a name -> a =
function
- Class Foo -> (self :> foo_t)
+ Class Foo -> (self :> foo_t)
| _ -> ((raise Bad_cast) : a)
method foo = "foo"
end
diff --git a/testsuite/tests/typing-extensions/cast.ml.reference b/testsuite/tests/typing-extensions/cast.ml.reference
index c229741638..468a7c9454 100644
--- a/testsuite/tests/typing-extensions/cast.ml.reference
+++ b/testsuite/tests/typing-extensions/cast.ml.reference
@@ -1,5 +1,5 @@
-# type 'b class_name = .. constraint 'b = < cast : 'a. 'a name -> 'a; .. >
+# type 'b class_name = .. constraint 'b = < cast : 'a. 'a name -> 'a; .. >
and 'a name =
Class : 'a class_name -> (< cast : 'a0. 'a0 name -> 'a0; .. > as 'a) name
# exception Bad_cast
diff --git a/testsuite/tests/typing-extensions/extensions.ml b/testsuite/tests/typing-extensions/extensions.ml
index 59a23db9d0..3539be332f 100644
--- a/testsuite/tests/typing-extensions/extensions.ml
+++ b/testsuite/tests/typing-extensions/extensions.ml
@@ -200,10 +200,12 @@ type +'a foo = ..
type 'a foo += A of (int -> 'a)
;;
-type 'a foo += B of ('a -> int) (* ERROR: Parameter variances are not satisfied *)
+type 'a foo += B of ('a -> int)
+ (* ERROR: Parameter variances are not satisfied *)
;;
-type _ foo += C : ('a -> int) -> 'a foo (* ERROR: Parameter variances are not satisfied *)
+type _ foo += C : ('a -> int) -> 'a foo
+ (* ERROR: Parameter variances are not satisfied *)
;;
type 'a bar = ..
diff --git a/testsuite/tests/typing-extensions/extensions.ml.reference b/testsuite/tests/typing-extensions/extensions.ml.reference
index 25af292de1..2f827076ec 100644
--- a/testsuite/tests/typing-extensions/extensions.ml.reference
+++ b/testsuite/tests/typing-extensions/extensions.ml.reference
@@ -83,14 +83,14 @@ type 'a foo = ..
# type 'a foo2 += D of int | E of 'a | F : int foo2
# type +'a foo = ..
# type 'a foo += A of (int -> 'a)
-# Characters 1-32:
- type 'a foo += B of ('a -> int) (* ERROR: Parameter variances are not satisfied *)
+# Characters 1-32:
+ type 'a foo += B of ('a -> int)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: In this definition, expected parameter variances are not satisfied.
The 1st type parameter was expected to be covariant,
but it is injective contravariant.
-# Characters 1-40:
- type _ foo += C : ('a -> int) -> 'a foo (* ERROR: Parameter variances are not satisfied *)
+# Characters 1-40:
+ type _ foo += C : ('a -> int) -> 'a foo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: In this definition, expected parameter variances are not satisfied.
The 1st type parameter was expected to be covariant,
diff --git a/testsuite/tests/typing-fstclassmod/fstclassmod.ml b/testsuite/tests/typing-fstclassmod/fstclassmod.ml
index bc8d66e51c..a291a4c7a8 100644
--- a/testsuite/tests/typing-fstclassmod/fstclassmod.ml
+++ b/testsuite/tests/typing-fstclassmod/fstclassmod.ml
@@ -17,7 +17,8 @@ let both l =
[ make_set compare; make_set (fun x y -> compare y x) ]
let () =
- print_endline (String.concat " " (List.map (String.concat "/") (both ["abc";"xyz";"def"])))
+ print_endline (String.concat " " (List.map (String.concat "/")
+ (both ["abc";"xyz";"def"])))
(* Hiding the internal representation *)
@@ -133,7 +134,8 @@ end = struct
| Pair p ->
let module P = (val p : PAIR with type t = s) in
let (x1, x2) = TypEq.apply P.eq x in
- Printf.sprintf "(%s,%s)" (Print.to_string P.t1 x1) (Print.to_string P.t2 x2)
+ Printf.sprintf "(%s,%s)" (Print.to_string P.t1 x1)
+ (Print.to_string P.t2 x2)
end
let () =
diff --git a/testsuite/tests/typing-gadts/didier.ml b/testsuite/tests/typing-gadts/didier.ml
index 8091375c0a..f34ecb678d 100644
--- a/testsuite/tests/typing-gadts/didier.ml
+++ b/testsuite/tests/typing-gadts/didier.ml
@@ -1,31 +1,31 @@
-type 'a ty =
+type 'a ty =
| Int : int ty
| Bool : bool ty
-let fbool (type t) (x : t) (tag : t ty) =
- match tag with
+let fbool (type t) (x : t) (tag : t ty) =
+ match tag with
| Bool -> x
;;
(* val fbool : 'a -> 'a ty -> 'a = <fun> *)
(** OK: the return value is x of type t **)
-let fint (type t) (x : t) (tag : t ty) =
- match tag with
+let fint (type t) (x : t) (tag : t ty) =
+ match tag with
| Int -> x > 0
;;
(* val fint : 'a -> 'a ty -> bool = <fun> *)
(** OK: the return value is x > 0 of type bool;
This has used the equation t = bool, not visible in the return type **)
-let f (type t) (x : t) (tag : t ty) =
- match tag with
+let f (type t) (x : t) (tag : t ty) =
+ match tag with
| Int -> x > 0
| Bool -> x
(* val f : 'a -> 'a ty -> bool = <fun> *)
-let g (type t) (x : t) (tag : t ty) =
- match tag with
+let g (type t) (x : t) (tag : t ty) =
+ match tag with
| Bool -> x
| Int -> x > 0
(* Error: This expression has type bool but an expression was expected of type
@@ -45,4 +45,3 @@ let g (type t) (x : t) (tag : t ty) =
match tag with
| Bool -> idb2 x
| Int -> x > 0
-
diff --git a/testsuite/tests/typing-gadts/pr5906.ml b/testsuite/tests/typing-gadts/pr5906.ml
index 7b53c5c91c..f0b2f0b07d 100644
--- a/testsuite/tests/typing-gadts/pr5906.ml
+++ b/testsuite/tests/typing-gadts/pr5906.ml
@@ -7,7 +7,8 @@ type (_, _, _) binop =
| Leq: ('a, 'a, bool) binop
| Add: (int, int, int) binop
-let eval (type a) (type b) (type c) (bop:(a,b,c) binop) (x:a constant) (y:b constant) : c constant =
+let eval (type a) (type b) (type c) (bop:(a,b,c) binop) (x:a constant)
+ (y:b constant) : c constant =
match bop, x, y with
| Eq, Bool x, Bool y -> Bool (if x then y else not y)
| Leq, Int x, Int y -> Bool (x <= y)
diff --git a/testsuite/tests/typing-gadts/pr5906.ml.reference b/testsuite/tests/typing-gadts/pr5906.ml.reference
index 85c1329799..28a103c72c 100644
--- a/testsuite/tests/typing-gadts/pr5906.ml.reference
+++ b/testsuite/tests/typing-gadts/pr5906.ml.reference
@@ -1,5 +1,5 @@
-#
-Characters 524-524:
+#
+Characters 533-533:
Error: Syntax error
#
diff --git a/testsuite/tests/typing-gadts/pr6690.ml b/testsuite/tests/typing-gadts/pr6690.ml
index 46ece4b239..151e995509 100644
--- a/testsuite/tests/typing-gadts/pr6690.ml
+++ b/testsuite/tests/typing-gadts/pr6690.ml
@@ -9,19 +9,22 @@ type ('a, 'result, 'visit_action) context =
| Global : ('a, 'a, 'a visit_action) context
;;
-let vexpr (type visit_action) : (_, _, visit_action) context -> _ -> visit_action =
+let vexpr (type visit_action)
+ : (_, _, visit_action) context -> _ -> visit_action =
function
| Local -> fun _ -> raise Exit
| Global -> fun _ -> raise Exit
;;
-let vexpr (type visit_action) : ('a, 'result, visit_action) context -> 'a -> visit_action =
+let vexpr (type visit_action)
+ : ('a, 'result, visit_action) context -> 'a -> visit_action =
function
| Local -> fun _ -> raise Exit
| Global -> fun _ -> raise Exit
;;
-let vexpr (type result) (type visit_action) : (unit, result, visit_action) context -> unit -> visit_action =
+let vexpr (type result) (type visit_action)
+ : (unit, result, visit_action) context -> unit -> visit_action =
function
| Local -> fun _ -> raise Exit
| Global -> fun _ -> raise Exit
diff --git a/testsuite/tests/typing-gadts/pr6690.ml.principal.reference b/testsuite/tests/typing-gadts/pr6690.ml.principal.reference
index 4ec122f5ae..5c9215bfeb 100644
--- a/testsuite/tests/typing-gadts/pr6690.ml.principal.reference
+++ b/testsuite/tests/typing-gadts/pr6690.ml.principal.reference
@@ -5,19 +5,19 @@ type 'a local_visit_action
type ('a, 'result, 'visit_action) context =
Local : ('a, 'a * insert, 'a local_visit_action) context
| Global : ('a, 'a, 'a visit_action) context
-# Characters 133-139:
+# Characters 137-143:
| Global -> fun _ -> raise Exit
^^^^^^
Error: This pattern matches values of type ($1, $1, visit_action) context
but a pattern was expected which matches values of type
($0, $0 * insert, visit_action) context
Type $1 is not compatible with type $0
-# Characters 141-147:
+# Characters 145-151:
| Global -> fun _ -> raise Exit
^^^^^^
Error: This pattern matches values of type ($1, $1, visit_action) context
but a pattern was expected which matches values of type
($0, $0 * insert, visit_action) context
Type $1 is not compatible with type $0
-# val vexpr : (unit, 'a, 'b) context -> unit -> 'b = <fun>
+# val vexpr : (unit, 'a, 'b) context -> unit -> 'b = <fun>
#
diff --git a/testsuite/tests/typing-gadts/pr6690.ml.reference b/testsuite/tests/typing-gadts/pr6690.ml.reference
index 18bea0d91b..3f435f67bf 100644
--- a/testsuite/tests/typing-gadts/pr6690.ml.reference
+++ b/testsuite/tests/typing-gadts/pr6690.ml.reference
@@ -5,21 +5,23 @@ type 'a local_visit_action
type ('a, 'result, 'visit_action) context =
Local : ('a, 'a * insert, 'a local_visit_action) context
| Global : ('a, 'a, 'a visit_action) context
-# Characters 11-162:
- ..........(type visit_action) : (_, _, visit_action) context -> _ -> visit_action =
+# Characters 11-166:
+ ..........(type visit_action)
+ : (_, _, visit_action) context -> _ -> visit_action =
function
| Local -> fun _ -> raise Exit
| Global -> fun _ -> raise Exit
Error: This expression has type ($0, $0 * insert, 'a) context -> 'b -> 'a
but an expression was expected of type 'c
The type constructor $0 would escape its scope
-# Characters 11-170:
- ..........(type visit_action) : ('a, 'result, visit_action) context -> 'a -> visit_action =
+# Characters 11-174:
+ ..........(type visit_action)
+ : ('a, 'result, visit_action) context -> 'a -> visit_action =
function
| Local -> fun _ -> raise Exit
| Global -> fun _ -> raise Exit
Error: This expression has type ($'a, $'a * insert, 'a) context -> $'a -> 'a
but an expression was expected of type 'b
The type constructor $'a would escape its scope
-# val vexpr : (unit, 'a, 'b) context -> unit -> 'b = <fun>
+# val vexpr : (unit, 'a, 'b) context -> unit -> 'b = <fun>
#
diff --git a/testsuite/tests/typing-modules-bugs/pr51_ok.ml b/testsuite/tests/typing-modules-bugs/pr51_ok.ml
index d833ef5483..0826fa31a9 100644
--- a/testsuite/tests/typing-modules-bugs/pr51_ok.ml
+++ b/testsuite/tests/typing-modules-bugs/pr51_ok.ml
@@ -7,7 +7,12 @@ let x = (3 : X.F(DUMMY).t);;
module X2=struct
module type SIG=sig type t=int val x:t end
- module F(Y:SIG)(Z:SIG) = struct type t=Y.t let x=Y.x type t'=Z.t let x'=Z.x end
+ module F(Y:SIG)(Z:SIG) = struct
+ type t=Y.t
+ let x=Y.x
+ type t'=Z.t
+ let x'=Z.x
+ end
end;;
let x = (3 : X2.F(DUMMY)(DUMMY).t);;
let x = (3 : X2.F(DUMMY)(DUMMY).t');;
diff --git a/testsuite/tests/typing-modules-bugs/pr6513_ok.ml b/testsuite/tests/typing-modules-bugs/pr6513_ok.ml
index f23fc599af..7474ba93a2 100644
--- a/testsuite/tests/typing-modules-bugs/pr6513_ok.ml
+++ b/testsuite/tests/typing-modules-bugs/pr6513_ok.ml
@@ -18,8 +18,11 @@ sig
type u
end
-module Make: functor (Html5: Html5_sigs.T with type 'a Xml.wrap = 'a and type 'a wrap = 'a and type 'a list_wrap = 'a list) -> S with
- type t = Html5_types.div Html5.elt and
- type u = < foo: Html5.uri >
+module Make: functor (Html5: Html5_sigs.T
+ with type 'a Xml.wrap = 'a and
+ type 'a wrap = 'a and
+ type 'a list_wrap = 'a list)
+ -> S with type t = Html5_types.div Html5.elt and
+ type u = < foo: Html5.uri >
end
*)
diff --git a/testsuite/tests/typing-poly-bugs/pr5673_bad.ml b/testsuite/tests/typing-poly-bugs/pr5673_bad.ml
index 454ab1b471..990880008d 100644
--- a/testsuite/tests/typing-poly-bugs/pr5673_bad.ml
+++ b/testsuite/tests/typing-poly-bugs/pr5673_bad.ml
@@ -1,7 +1,7 @@
module Classdef = struct
class virtual ['a, 'b, 'c] cl0 =
- object
- constraint 'c = < m : 'a -> 'b -> int; .. >
+ object
+ constraint 'c = < m : 'a -> 'b -> int; .. >
end
class virtual ['a, 'b] cl1 =
diff --git a/testsuite/tests/typing-poly-bugs/pr5673_ok.ml b/testsuite/tests/typing-poly-bugs/pr5673_ok.ml
index df9fd21579..26ad1606d9 100644
--- a/testsuite/tests/typing-poly-bugs/pr5673_ok.ml
+++ b/testsuite/tests/typing-poly-bugs/pr5673_ok.ml
@@ -1,7 +1,7 @@
module Classdef = struct
class virtual ['a, 'b, 'c] cl0 =
- object
- constraint 'c = < m : 'a -> 'b -> int; .. >
+ object
+ constraint 'c = < m : 'a -> 'b -> int; .. >
end
class virtual ['a, 'b] cl1 =
diff --git a/testsuite/tests/typing-poly/poly.ml b/testsuite/tests/typing-poly/poly.ml
index e1ada4924c..cb7804bf42 100644
--- a/testsuite/tests/typing-poly/poly.ml
+++ b/testsuite/tests/typing-poly/poly.ml
@@ -674,16 +674,16 @@ let n = object
method m : 'x 'o. ([< `Foo of 'x] as 'o) -> 'x = fun x -> assert false
end;;
(* ok, but not with -principal *)
-let n =
+let n =
object method m : 'x. [< `Foo of 'x] -> 'x = fun x -> assert false end;;
(* fail *)
-let (n : < m : 'a. [< `Foo of int] -> 'a >) =
+let (n : < m : 'a. [< `Foo of int] -> 'a >) =
object method m : 'x. [< `Foo of 'x] -> 'x = fun x -> assert false end;;
(* fail *)
let (n : 'b -> < m : 'a . ([< `Foo of int] as 'b) -> 'a >) = fun x ->
object method m : 'x. [< `Foo of 'x] -> 'x = fun x -> assert false end;;
(* PR#6171 *)
-let f b (x: 'x) =
+let f b (x: 'x) =
let module M = struct type t = A end in
if b then x else M.A;;
diff --git a/testsuite/tests/typing-poly/poly.ml.principal.reference b/testsuite/tests/typing-poly/poly.ml.principal.reference
index 26cdd596cc..d480e82f80 100644
--- a/testsuite/tests/typing-poly/poly.ml.principal.reference
+++ b/testsuite/tests/typing-poly/poly.ml.principal.reference
@@ -652,12 +652,12 @@ Error: In the definition of t, type 'y t should be 'x t
# - : ('a -> 'a) * ('b -> 'b) = (<fun>, <fun>)
# - : ('a -> 'a) * ('b -> 'b) = (<fun>, <fun>)
# val n : < m : 'x 'a. ([< `Foo of 'x ] as 'a) -> 'x > = <obj>
-# Characters 90-111:
+# Characters 89-110:
object method m : 'x. [< `Foo of 'x] -> 'x = fun x -> assert false end;;
^^^^^^^^^^^^^^^^^^^^^
Error: This method has type ([< `Foo of 'b ] as 'a) -> 'b
which is less general than 'x. 'a -> 'x
-# Characters 105-126:
+# Characters 104-125:
object method m : 'x. [< `Foo of 'x] -> 'x = fun x -> assert false end;;
^^^^^^^^^^^^^^^^^^^^^
Error: This method has type ([< `Foo of 'b ] as 'a) -> 'b
@@ -667,7 +667,7 @@ Error: This method has type ([< `Foo of 'b ] as 'a) -> 'b
^^^^^^^^^^^^^^^^^^^^^
Error: This method has type ([< `Foo of 'b ] as 'a) -> 'b
which is less general than 'x. 'a -> 'x
-# Characters 95-98:
+# Characters 94-97:
if b then x else M.A;;
^^^
Error: This expression has type M.t but an expression was expected of type 'x
diff --git a/testsuite/tests/typing-poly/poly.ml.reference b/testsuite/tests/typing-poly/poly.ml.reference
index 25e938e8ee..637fefa70b 100644
--- a/testsuite/tests/typing-poly/poly.ml.reference
+++ b/testsuite/tests/typing-poly/poly.ml.reference
@@ -607,7 +607,7 @@ Error: In the definition of t, type 'y t should be 'x t
# - : ('a -> 'a) * ('b -> 'b) = (<fun>, <fun>)
# val n : < m : 'x 'a. ([< `Foo of 'x ] as 'a) -> 'x > = <obj>
# val n : < m : 'x. [< `Foo of 'x ] -> 'x > = <obj>
-# Characters 60-130:
+# Characters 59-129:
object method m : 'x. [< `Foo of 'x] -> 'x = fun x -> assert false end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This expression has type < m : 'x. [< `Foo of 'x ] -> 'x >
@@ -621,7 +621,7 @@ Error: This expression has type < m : 'x. [< `Foo of 'x ] -> 'x >
but an expression was expected of type
< m : 'a. [< `Foo of int ] -> 'a >
The universal variable 'x would escape its scope
-# Characters 95-98:
+# Characters 94-97:
if b then x else M.A;;
^^^
Error: This expression has type M.t but an expression was expected of type 'x
diff --git a/testsuite/tests/typing-warnings/pr6872.ml b/testsuite/tests/typing-warnings/pr6872.ml
index 6eba3e7011..283af4ccd4 100644
--- a/testsuite/tests/typing-warnings/pr6872.ml
+++ b/testsuite/tests/typing-warnings/pr6872.ml
@@ -6,4 +6,3 @@ raise A;;
fun (A : a) -> ();;
function Not_found -> 1 | A -> 2 | _ -> 3;;
try raise A with A -> 2;;
-
diff --git a/testsuite/tests/typing-warnings/pr6872.ml.principal.reference b/testsuite/tests/typing-warnings/pr6872.ml.principal.reference
index 0227cfd9c1..097e34f978 100644
--- a/testsuite/tests/typing-warnings/pr6872.ml.principal.reference
+++ b/testsuite/tests/typing-warnings/pr6872.ml.principal.reference
@@ -32,4 +32,4 @@ Characters 17-18:
^
Warning 42: this use of A required disambiguation.
- : int = 2
-#
+#
diff --git a/testsuite/tests/typing-warnings/pr6872.ml.reference b/testsuite/tests/typing-warnings/pr6872.ml.reference
index 7aeebbebf1..072ccb4daa 100644
--- a/testsuite/tests/typing-warnings/pr6872.ml.reference
+++ b/testsuite/tests/typing-warnings/pr6872.ml.reference
@@ -27,4 +27,4 @@ Characters 17-18:
^
Warning 42: this use of A required disambiguation.
- : int = 2
-#
+#
diff --git a/testsuite/tests/typing-warnings/records.ml b/testsuite/tests/typing-warnings/records.ml
index 59a45549d0..768bb965c5 100644
--- a/testsuite/tests/typing-warnings/records.ml
+++ b/testsuite/tests/typing-warnings/records.ml
@@ -45,7 +45,7 @@ module OK = struct
open M
open N
let f (r:M.t) = r.x
-end;;
+end;;
module M = struct
type t = {x:int}
diff --git a/testsuite/tests/unboxed-primitive-args/common.ml b/testsuite/tests/unboxed-primitive-args/common.ml
index e777c4a6bd..52b5ef992b 100644
--- a/testsuite/tests/unboxed-primitive-args/common.ml
+++ b/testsuite/tests/unboxed-primitive-args/common.ml
@@ -61,7 +61,8 @@ let string_of : type a. a typ -> a -> string = function
| Int32 -> Printf.sprintf "%ldl"
| Int64 -> Printf.sprintf "%LdL"
| Nativeint -> Printf.sprintf "%ndn"
- | Float -> fun f -> Printf.sprintf "float_of_bits 0x%LxL" (Int64.bits_of_float f)
+ | Float ->
+ fun f -> Printf.sprintf "float_of_bits 0x%LxL" (Int64.bits_of_float f)
let rec arity : type a. a proto -> int = function
| Ret _ -> 0
@@ -129,8 +130,8 @@ module Buffer = struct
| Nativeint -> set_nativeint
| Float -> set_float
- (* This is almost a memcpy except that we use get/set which should ensure that the
- values in [dst] don't overflow. *)
+ (* This is almost a memcpy except that we use get/set which should
+ ensure that the values in [dst] don't overflow. *)
let copy_args ~src ~dst proto =
let rec loop : type a. a proto -> int -> unit = fun proto arg ->
match proto with
diff --git a/testsuite/tests/unboxed-primitive-args/gen_test.ml b/testsuite/tests/unboxed-primitive-args/gen_test.ml
index bb275c48b7..0aab332c00 100644
--- a/testsuite/tests/unboxed-primitive-args/gen_test.ml
+++ b/testsuite/tests/unboxed-primitive-args/gen_test.ml
@@ -25,13 +25,15 @@ type native_repr =
(* Generate primitives with up to this number of arguments *)
let test_all_combination_up_to_n_args = 6
-(* Generate primitives using all combination of these argument representations. No need to
- test all combination of other representations: regarding the calling convention
- [Same_as_ocaml_repr], [Untagged_int] and [Unboxed_integer Pnativeint] are all the same,
- and are the same as [Unboxed_integer Pint<word-size>].
-
- We have specific tests for the other representations and for the result representation
- in [manual_tests].
+(* Generate primitives using all combination of these argument
+ representations. No need to test all combination of other
+ representations: regarding the calling convention
+ [Same_as_ocaml_repr], [Untagged_int] and
+ [Unboxed_integer Pnativeint] are all the same, and are the
+ same as [Unboxed_integer Pint<word-size>].
+
+ We have specific tests for the other representations and for the
+ result representation in [manual_tests].
*)
let test_all_args_combination_of =
[ Unboxed_float
diff --git a/testsuite/tests/utils/edit_distance.ml b/testsuite/tests/utils/edit_distance.ml
index 76eec0ba49..294b02ce4e 100644
--- a/testsuite/tests/utils/edit_distance.ml
+++ b/testsuite/tests/utils/edit_distance.ml
@@ -44,6 +44,5 @@ let () =
test "" "" 3 (Some 0);
test "" "abc" 3 (Some 3);
test "abcd" "" 3 None;
-
- ()
+ ()
diff --git a/tools/check-typo b/tools/check-typo
index bd48dc7a3e..a28e4dc153 100755
--- a/tools/check-typo
+++ b/tools/check-typo
@@ -194,7 +194,7 @@ IGNORE_DIRS="
}
3 <= NR && NR <= 5 \
- && (/ OCaml / || / ocamlbuild / || / OCamldoc /) {
+ && (/ OCaml / || / ocamlbuild / || / OCamldoc /) {
header_ocaml = NR;
}
diff --git a/tools/gdb-macros b/tools/gdb-macros
index 5dfa2b2ed0..157bfe2e4f 100644
--- a/tools/gdb-macros
+++ b/tools/gdb-macros
@@ -163,7 +163,7 @@ define camlblock
set $mysize = $size
set $camlnext = $arg0 + $camlwordsize * ($size + 1)
printf "\n"
-
+
if $tag == 252
x/s $arg0
end
@@ -209,7 +209,7 @@ define camlblock
if ($field & 1) == 1
camlint $field
end
- printf "\n"
+ printf "\n"
set $count = $count + 1
end
if $count < $mysize
diff --git a/tools/ocamldep.ml b/tools/ocamldep.ml
index c57521d22f..94fda41c0a 100644
--- a/tools/ocamldep.ml
+++ b/tools/ocamldep.ml
@@ -276,11 +276,11 @@ let read_parse_and_extract parse_function extract_function magic source_file =
begin try
let ast =
Pparse.file ~tool_name Format.err_formatter
- input_file parse_function magic
+ input_file parse_function magic
in
let bound_vars = Depend.StringSet.empty in
List.iter (fun modname ->
- Depend.open_module bound_vars (Longident.Lident modname)
+ Depend.open_module bound_vars (Longident.Lident modname)
) !Clflags.open_modules;
extract_function bound_vars ast;
Pparse.remove_preprocessed input_file;
diff --git a/tools/ocamlmklib.ml b/tools/ocamlmklib.ml
index a4cb697845..69cb0452fa 100644
--- a/tools/ocamlmklib.ml
+++ b/tools/ocamlmklib.ml
@@ -20,15 +20,15 @@ let compiler_path name =
let bytecode_objs = ref [] (* .cmo,.cma,.ml,.mli files to pass to ocamlc *)
and native_objs = ref [] (* .cmx,.cmxa,.ml,.mli files to pass to ocamlopt *)
-and c_objs = ref [] (* .o, .a, .obj, .lib, .dll, .dylib, .so files to pass
- to mksharedlib and ar *)
+and c_objs = ref [] (* .o, .a, .obj, .lib, .dll, .dylib, .so files to
+ pass to mksharedlib and ar *)
and caml_libs = ref [] (* -cclib to pass to ocamlc, ocamlopt *)
and caml_opts = ref [] (* -ccopt to pass to ocamlc, ocamlopt *)
and dynlink = ref supports_shared_libraries
and failsafe = ref false (* whether to fall back on static build only *)
and c_libs = ref [] (* libs to pass to mksharedlib and ocamlc -cclib *)
-and c_Lopts = ref [] (* options to pass to mksharedlib and ocamlc -cclib *)
-and c_opts = ref [] (* options to pass to mksharedlib and ocamlc -ccopt *)
+and c_Lopts = ref [] (* options to pass to mksharedlib and ocamlc -cclib *)
+and c_opts = ref [] (* options to pass to mksharedlib and ocamlc -ccopt *)
and ld_opts = ref [] (* options to pass only to the linker *)
and ocamlc = ref (compiler_path "ocamlc")
and ocamlc_opts = ref [] (* options to pass only to ocamlc *)
@@ -76,7 +76,7 @@ let parse_arguments argv =
(bytecode_objs := s :: !bytecode_objs;
native_objs := s :: !native_objs)
else if List.exists (ends_with s)
- [".o"; ".a"; ".obj"; ".lib"; ".dll"; ".dylib"; ".so"]
+ [".o"; ".a"; ".obj"; ".lib"; ".dll"; ".dylib"; ".so"]
then
c_objs := s :: !c_objs
else if s = "-cclib" then
@@ -263,7 +263,8 @@ let build_libs () =
end;
if !bytecode_objs <> [] then
scommand
- (sprintf "%s -a %s %s %s -o %s.cma %s %s -dllib -l%s -cclib -l%s %s %s %s %s"
+ (sprintf "%s -a %s %s %s -o %s.cma %s %s -dllib -l%s -cclib -l%s \
+ %s %s %s %s"
(transl_path !ocamlc)
(if !debug then "-g" else "")
(if !dynlink then "" else "-custom")
diff --git a/toplevel/opttoploop.ml b/toplevel/opttoploop.ml
index 7090129780..ab73a51e34 100644
--- a/toplevel/opttoploop.ml
+++ b/toplevel/opttoploop.ml
@@ -452,7 +452,7 @@ let run_script ppf name args =
Obj.truncate (Obj.repr Sys.argv) len;
Arg.current := 0;
Compmisc.init_path ~dir:(Filename.dirname name) true;
- (* Note: would use [Filename.abspath] here, if we had it. *)
+ (* Note: would use [Filename.abspath] here, if we had it. *)
toplevel_env := Compmisc.initial_env();
Sys.interactive := false;
let explicit_name =
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml
index 0faf8d490a..7a3b1eb617 100644
--- a/toplevel/topdirs.ml
+++ b/toplevel/topdirs.ml
@@ -244,7 +244,8 @@ let match_generic_printer_type ppf desc path args printer_type =
List.map (fun ty_var -> Ctype.newconstr printer_type [ty_var]) args in
let ty_expected =
List.fold_right
- (fun ty_arg ty -> Ctype.newty (Tarrow (Asttypes.Nolabel, ty_arg, ty, Cunknown)))
+ (fun ty_arg ty -> Ctype.newty (Tarrow (Asttypes.Nolabel, ty_arg, ty,
+ Cunknown)))
ty_args (Ctype.newconstr printer_type [ty_target]) in
Ctype.unify !toplevel_env
ty_expected
@@ -412,7 +413,8 @@ let trim_signature = function
(function
Sig_module (id, md, rs) ->
Sig_module (id, {md with md_attributes =
- (Location.mknoloc "...", Parsetree.PStr []) :: md.md_attributes},
+ (Location.mknoloc "...", Parsetree.PStr [])
+ :: md.md_attributes},
rs)
(*| Sig_modtype (id, Modtype_manifest mty) ->
Sig_modtype (id, Modtype_manifest (trim_modtype mty))*)
diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml
index 296e1cc430..21712aebb1 100644
--- a/toplevel/toploop.ml
+++ b/toplevel/toploop.ml
@@ -157,7 +157,9 @@ let load_lambda ppf lam =
fprintf ppf "%a%a@."
Printinstr.instrlist init_code
Printinstr.instrlist fun_code;
- let (code, code_size, reloc, events) = Emitcode.to_memory init_code fun_code in
+ let (code, code_size, reloc, events) =
+ Emitcode.to_memory init_code fun_code
+ in
Meta.add_debug_info code code_size [| events |];
let can_free = (fun_code = []) in
let initial_symtable = Symtable.current_state() in
@@ -500,7 +502,7 @@ let run_script ppf name args =
Obj.truncate (Obj.repr Sys.argv) len;
Arg.current := 0;
Compmisc.init_path ~dir:(Filename.dirname name) true;
- (* Note: would use [Filename.abspath] here, if we had it. *)
+ (* Note: would use [Filename.abspath] here, if we had it. *)
toplevel_env := Compmisc.initial_env();
Sys.interactive := false;
let explicit_name =
diff --git a/toplevel/toploop.mli b/toplevel/toploop.mli
index 704edb1077..f0d5c40960 100644
--- a/toplevel/toploop.mli
+++ b/toplevel/toploop.mli
@@ -53,7 +53,8 @@ val execute_phrase : bool -> formatter -> Parsetree.toplevel_phrase -> bool
phrase executed with no errors and [false] otherwise.
First bool says whether the values and types of the results
should be printed. Uncaught exceptions are always printed. *)
-val preprocess_phrase : formatter -> Parsetree.toplevel_phrase -> Parsetree.toplevel_phrase
+val preprocess_phrase :
+ formatter -> Parsetree.toplevel_phrase -> Parsetree.toplevel_phrase
(* Preprocess the given toplevel phrase using regular and ppx
preprocessors. Return the updated phrase. *)
val use_file : formatter -> string -> bool
diff --git a/typing/env.ml b/typing/env.ml
index e0b3462298..2c7a6705a7 100644
--- a/typing/env.ml
+++ b/typing/env.ml
@@ -734,7 +734,7 @@ and lookup_module ~load lid env : Path.t =
if !Clflags.transparent_modules && not load then
try ignore (find_pers_struct ~check:false s)
with Not_found ->
- Location.prerr_warning Location.none (Warnings.No_cmi_file s)
+ Location.prerr_warning Location.none (Warnings.No_cmi_file s)
else ignore (find_pers_struct s);
Pident(Ident.create_persistent s)
end
@@ -1134,7 +1134,7 @@ let rec scrape_alias env ?path mty =
scrape_alias env (find_module path env).md_type ~path
with Not_found ->
(*Location.prerr_warning Location.none
- (Warnings.No_cmi_file (Path.name path));*)
+ (Warnings.No_cmi_file (Path.name path));*)
mty
end
| mty, Some path ->
@@ -1320,8 +1320,8 @@ and components_of_module_maker (env, sub, path, mty) =
| Mty_functor(param, ty_arg, ty_res) ->
Functor_comps {
fcomp_param = param;
- (* fcomp_arg and fcomp_res must be prefixed eagerly, because they are interpreted
- in the outer environment *)
+ (* fcomp_arg and fcomp_res must be prefixed eagerly, because
+ they are interpreted in the outer environment *)
fcomp_arg = may_map (Subst.modtype sub) ty_arg;
fcomp_res = Subst.modtype sub ty_res;
fcomp_cache = Hashtbl.create 17;
diff --git a/typing/env.mli b/typing/env.mli
index 06a1e2beb3..367299aa69 100644
--- a/typing/env.mli
+++ b/typing/env.mli
@@ -157,7 +157,8 @@ val read_signature: string -> string -> signature
val save_signature: signature -> string -> string -> signature
(* Arguments: signature, module name, file name. *)
val save_signature_with_imports:
- signature -> string -> string -> (string * Digest.t option) list -> signature
+ signature -> string -> string -> (string * Digest.t option) list
+ -> signature
(* Arguments: signature, module name, file name,
imported units with their CRCs. *)
diff --git a/typing/parmatch.ml b/typing/parmatch.ml
index 60448bec9e..6e0ffced1c 100644
--- a/typing/parmatch.ml
+++ b/typing/parmatch.ml
@@ -1834,7 +1834,8 @@ let do_check_partial ?pred exhaust loc casel pss = match pss with
end;
if contains_extension v then
Buffer.add_string buf
- "\nMatching over values of extensible variant types (the *extension* above)\n\
+ "\nMatching over values of extensible variant types \
+ (the *extension* above)\n\
must include a wild card pattern in order to be exhaustive."
;
Buffer.contents buf
diff --git a/typing/primitive.ml b/typing/primitive.ml
index 2c2fdc4046..dd610815fa 100644
--- a/typing/primitive.ml
+++ b/typing/primitive.ml
@@ -131,7 +131,8 @@ let report_error ppf err =
let open Format in
match err with
| Float_with_native_repr_attribute ->
- fprintf ppf "Cannot use \"float\" in conjunction with [@unboxed ]/[@untagged ]"
+ fprintf ppf "Cannot use \"float\" in conjunction with \
+ [@unboxed ]/[@untagged ]"
let () =
Location.register_error_of_exn
diff --git a/typing/printtyp.ml b/typing/printtyp.ml
index b41ca0eaef..7232676559 100644
--- a/typing/printtyp.ml
+++ b/typing/printtyp.ml
@@ -540,7 +540,8 @@ let reset_and_mark_loops_list tyl =
(* Disabled in classic mode when printing an unification error *)
let print_labels = ref true
let print_label ppf l =
- if !print_labels && l <> Nolabel || is_optional l then fprintf ppf "%s:" (string_of_label l)
+ if !print_labels && l <> Nolabel || is_optional l
+ then fprintf ppf "%s:" (string_of_label l)
let rec tree_of_typexp sch ty =
let ty = repr ty in
@@ -1073,7 +1074,9 @@ let rec tree_of_class_type sch params =
in
Octy_signature (self_ty, List.rev csil)
| Cty_arrow (l, ty, cty) ->
- let lab = if !print_labels || is_optional l then string_of_label l else "" in
+ let lab =
+ if !print_labels || is_optional l then string_of_label l else ""
+ in
let ty =
if is_optional l then
match (repr ty).desc with
@@ -1200,14 +1203,17 @@ let rec tree_of_modtype ?(ellipsis=false) = function
| Mty_ident p ->
Omty_ident (tree_of_path p)
| Mty_signature sg ->
- Omty_signature (if ellipsis then [Osig_ellipsis] else tree_of_signature sg)
+ Omty_signature (if ellipsis then [Osig_ellipsis]
+ else tree_of_signature sg)
| Mty_functor(param, ty_arg, ty_res) ->
let res =
match ty_arg with None -> tree_of_modtype ~ellipsis ty_res
| Some mty ->
- wrap_env (Env.add_module ~arg:true param mty) (tree_of_modtype ~ellipsis) ty_res
+ wrap_env (Env.add_module ~arg:true param mty)
+ (tree_of_modtype ~ellipsis) ty_res
in
- Omty_functor (Ident.name param, may_map (tree_of_modtype ~ellipsis:false) ty_arg, res)
+ Omty_functor (Ident.name param,
+ may_map (tree_of_modtype ~ellipsis:false) ty_arg, res)
| Mty_alias p ->
Omty_alias (tree_of_path p)
@@ -1220,7 +1226,8 @@ and tree_of_signature_rec env' in_type_group = function
let in_type_group =
match in_type_group, item with
true, Sig_type (_, _, Trec_next) -> true
- | _, Sig_type (_, _, (Trec_not | Trec_first)) -> set_printing_env env'; true
+ | _, Sig_type (_, _, (Trec_not | Trec_first)) ->
+ set_printing_env env'; true
| _ -> set_printing_env env'; false
in
let (sg, rem) = filter_rem_sig item rem in
@@ -1240,7 +1247,8 @@ and trees_of_sigitem = function
[tree_of_extension_constructor id ext es]
| Sig_module(id, md, rs) ->
let ellipsis =
- List.exists (function ({txt="..."}, Parsetree.PStr []) -> true | _ -> false)
+ List.exists (function ({txt="..."}, Parsetree.PStr []) -> true
+ | _ -> false)
md.md_attributes in
[tree_of_module id md.md_type rs ~ellipsis]
| Sig_modtype(id, decl) ->
diff --git a/typing/printtyp.mli b/typing/printtyp.mli
index 9bbc7011a7..fd1d53aa7d 100644
--- a/typing/printtyp.mli
+++ b/typing/printtyp.mli
@@ -51,7 +51,8 @@ val tree_of_extension_constructor:
Ident.t -> extension_constructor -> ext_status -> out_sig_item
val extension_constructor:
Ident.t -> formatter -> extension_constructor -> unit
-val tree_of_module: Ident.t -> ?ellipsis:bool -> module_type -> rec_status -> out_sig_item
+val tree_of_module:
+ Ident.t -> ?ellipsis:bool -> module_type -> rec_status -> out_sig_item
val modtype: formatter -> module_type -> unit
val signature: formatter -> signature -> unit
val tree_of_modtype_declaration:
diff --git a/typing/printtyped.ml b/typing/printtyped.ml
index 8270b6d8a8..58756c6a49 100644
--- a/typing/printtyped.ml
+++ b/typing/printtyped.ml
@@ -275,7 +275,8 @@ and expression i ppf x =
line i ppf "expression %a\n" fmt_location x.exp_loc;
attributes i ppf x.exp_attributes;
let i =
- List.fold_left (fun i (extra,_,attrs) -> expression_extra i ppf extra attrs; i+1)
+ List.fold_left (fun i (extra,_,attrs) ->
+ expression_extra i ppf extra attrs; i+1)
(i+1) x.exp_extra
in
match x.exp_desc with
@@ -379,7 +380,8 @@ and expression i ppf x =
module_expr i ppf me
and value_description i ppf x =
- line i ppf "value_description %a %a\n" fmt_ident x.val_id fmt_location x.val_loc;
+ line i ppf "value_description %a %a\n" fmt_ident x.val_id fmt_location
+ x.val_loc;
attributes i ppf x.val_attributes;
core_type (i+1) ppf x.val_desc;
list (i+1) string ppf x.val_prim;
@@ -387,7 +389,8 @@ and value_description i ppf x =
and type_parameter i ppf (x, _variance) = core_type i ppf x
and type_declaration i ppf x =
- line i ppf "type_declaration %a %a\n" fmt_ident x.typ_id fmt_location x.typ_loc;
+ line i ppf "type_declaration %a %a\n" fmt_ident x.typ_id fmt_location
+ x.typ_loc;
attributes i ppf x.typ_attributes;
let i = i+1 in
line i ppf "ptype_params =\n";
@@ -477,7 +480,8 @@ and class_type_field i ppf x =
fmt_virtual_flag vf;
core_type (i+1) ppf ct;
| Tctf_method (s, pf, vf, ct) ->
- line i ppf "Tctf_method \"%s\" %a %a\n" s fmt_private_flag pf fmt_virtual_flag vf;
+ line i ppf "Tctf_method \"%s\" %a %a\n" s fmt_private_flag pf
+ fmt_virtual_flag vf;
core_type (i+1) ppf ct;
| Tctf_constraint (ct1, ct2) ->
line i ppf "Tctf_constraint\n";
@@ -781,7 +785,8 @@ and core_type_x_core_type_x_location i ppf (ct1, ct2, l) =
core_type (i+1) ppf ct1;
core_type (i+1) ppf ct2;
-and constructor_decl i ppf {cd_id; cd_name = _; cd_args; cd_res; cd_loc; cd_attributes} =
+and constructor_decl i ppf {cd_id; cd_name = _; cd_args; cd_res; cd_loc;
+ cd_attributes} =
line i ppf "%a\n" fmt_location cd_loc;
line (i+1) ppf "%a\n" fmt_ident cd_id;
attributes i ppf cd_attributes;
@@ -792,7 +797,8 @@ and constructor_arguments i ppf = function
| Cstr_tuple l -> list i core_type ppf l
| Cstr_record l -> list i label_decl ppf l
-and label_decl i ppf {ld_id; ld_name = _; ld_mutable; ld_type; ld_loc; ld_attributes} =
+and label_decl i ppf {ld_id; ld_name = _; ld_mutable; ld_type; ld_loc;
+ ld_attributes} =
line i ppf "%a\n" fmt_location ld_loc;
attributes i ppf ld_attributes;
line (i+1) ppf "%a\n" fmt_mutable_flag ld_mutable;
diff --git a/typing/tast_mapper.ml b/typing/tast_mapper.ml
index 7c7c774bb5..03aa97fc28 100644
--- a/typing/tast_mapper.ml
+++ b/typing/tast_mapper.ml
@@ -413,7 +413,9 @@ let module_coercion sub = function
Tcoerce_alias (p, sub.module_coercion sub c1)
| Tcoerce_structure (l1, l2) ->
let l1' = List.map (fun (i,c) -> i, sub.module_coercion sub c) l1 in
- let l2' = List.map (fun (id,i,c) -> id, i, sub.module_coercion sub c) l2 in
+ let l2' =
+ List.map (fun (id,i,c) -> id, i, sub.module_coercion sub c) l2
+ in
Tcoerce_structure (l1', l2')
| Tcoerce_primitive pc ->
Tcoerce_primitive {pc with pc_env = sub.env sub pc.pc_env}
@@ -488,7 +490,9 @@ let class_expr sub x =
List.map (tuple3 id (opt (sub.expr sub)) id) args
)
| Tcl_let (rec_flag, value_bindings, ivars, cl) ->
- let (rec_flag, value_bindings) = sub.value_bindings sub (rec_flag, value_bindings) in
+ let (rec_flag, value_bindings) =
+ sub.value_bindings sub (rec_flag, value_bindings)
+ in
Tcl_let (
rec_flag,
value_bindings,
diff --git a/typing/typeclass.ml b/typing/typeclass.ml
index aeec7bf33c..46eb5be923 100644
--- a/typing/typeclass.ml
+++ b/typing/typeclass.ml
@@ -53,7 +53,8 @@ exception Error_forward of Location.error
open Typedtree
let ctyp desc typ env loc =
- { ctyp_desc = desc; ctyp_type = typ; ctyp_loc = loc; ctyp_env = env; ctyp_attributes = [] }
+ { ctyp_desc = desc; ctyp_type = typ; ctyp_loc = loc; ctyp_env = env;
+ ctyp_attributes = [] }
(**********************)
(* Useful constants *)
@@ -373,7 +374,9 @@ let add_val env loc lab (mut, virt, ty) val_sig =
let rec class_type_field env self_type meths
(fields, val_sig, concr_meths, inher) ctf =
let loc = ctf.pctf_loc in
- let mkctf desc = { ctf_desc = desc; ctf_loc = loc; ctf_attributes = ctf.pctf_attributes } in
+ let mkctf desc =
+ { ctf_desc = desc; ctf_loc = loc; ctf_attributes = ctf.pctf_attributes }
+ in
match ctf.pctf_desc with
Pctf_inherit sparent ->
let parent = class_type env sparent in
@@ -525,7 +528,9 @@ let rec class_field self_loc cl_num self_type meths vars
local_meths, local_vals)
cf =
let loc = cf.pcf_loc in
- let mkcf desc = { cf_desc = desc; cf_loc = loc; cf_attributes = cf.pcf_attributes } in
+ let mkcf desc =
+ { cf_desc = desc; cf_loc = loc; cf_attributes = cf.pcf_attributes }
+ in
match cf.pcf_desc with
Pcf_inherit (ovf, sparent, super) ->
let parent = class_expr cl_num val_env par_env sparent in
@@ -1005,10 +1010,10 @@ and class_expr cl_num val_env met_env scl =
List.exists (fun l -> l <> Nolabel) labels &&
begin
Location.prerr_warning
- cl.cl_loc
- (Warnings.Labels_omitted
- (List.map Printtyp.string_of_label
- (List.filter ((<>) Nolabel) labels)));
+ cl.cl_loc
+ (Warnings.Labels_omitted
+ (List.map Printtyp.string_of_label
+ (List.filter ((<>) Nolabel) labels)));
true
end
in
@@ -1056,8 +1061,9 @@ and class_expr cl_num val_env met_env scl =
Some (option_some arg)
with Not_found ->
sargs, more_sargs,
- if Btype.is_optional l &&
- (List.mem_assoc Nolabel sargs || List.mem_assoc Nolabel more_sargs)
+ if Btype.is_optional l
+ && (List.mem_assoc Nolabel sargs
+ || List.mem_assoc Nolabel more_sargs)
then
Some (option_none ty0 Location.none)
else None
@@ -1417,7 +1423,8 @@ let class_infos define_class kind
(fun name (mut, vr, ty) l -> if vr = Virtual then name :: l else l)
sign.csig_vars [] in
if mets <> [] || vals <> [] then
- raise(Error(cl.pci_loc, env, Virtual_class(define_class, false, mets, vals)));
+ raise(Error(cl.pci_loc, env, Virtual_class(define_class, false, mets,
+ vals)));
end;
(* Misc. *)
@@ -1662,7 +1669,9 @@ let rec unify_parents env ty cl =
| Tcl_constraint (cl, _, _, _, _) -> unify_parents env ty cl
and unify_parents_struct env ty st =
List.iter
- (function {cf_desc = Tcf_inherit (_, cl, _, _, _)} -> unify_parents env ty cl
+ (function
+ | {cf_desc = Tcf_inherit (_, cl, _, _, _)} ->
+ unify_parents env ty cl
| _ -> ())
st.cstr_fields
diff --git a/typing/typecore.ml b/typing/typecore.ml
index 5134dc942e..516c10f70c 100644
--- a/typing/typecore.ml
+++ b/typing/typecore.ml
@@ -466,8 +466,10 @@ let enter_orpat_variables loc env p1_vs p2_vs =
(x2,x1)::unify_vars rem1 rem2
end
| [],[] -> []
- | (x,_,_,_,_)::_, [] -> raise (Error (loc, env, Orpat_vars (x, vars p2_vs)))
- | [],(y,_,_,_,_)::_ -> raise (Error (loc, env, Orpat_vars (y, vars p1_vs)))
+ | (x,_,_,_,_)::_, [] ->
+ raise (Error (loc, env, Orpat_vars (x, vars p2_vs)))
+ | [],(y,_,_,_,_)::_ ->
+ raise (Error (loc, env, Orpat_vars (y, vars p1_vs)))
| (x,_,_,_,_)::_, (y,_,_,_,_)::_ ->
let err =
if Ident.name x < Ident.name y
@@ -1644,7 +1646,8 @@ let create_package_type loc env (p, l) =
Exp.letmodule ~loc:sexp.pexp_loc ~attrs:[mknoloc "#modulepat",PStr []]
name
(Mod.unpack ~loc
- (Exp.ident ~loc:name.loc (mkloc (Longident.Lident name.txt) name.loc)))
+ (Exp.ident ~loc:name.loc (mkloc (Longident.Lident name.txt)
+ name.loc)))
sexp
)
sexp unpacks
@@ -2513,7 +2516,8 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected =
| Val_ivar (Mutable, _) -> name::li
| _ -> li in
let valid_vars = Env.fold_values collect_vars None env [] in
- raise(Error(loc, env, Unbound_instance_variable (lab.txt, valid_vars)))
+ raise(Error(loc, env,
+ Unbound_instance_variable (lab.txt, valid_vars)))
end
| Pexp_override lst ->
let _ =
@@ -2541,7 +2545,8 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected =
with
Not_found ->
let vars = Vars.fold (fun var _ li -> var::li) !vars [] in
- raise(Error(loc, env, Unbound_instance_variable (lab.txt, vars)))
+ raise(Error(loc, env,
+ Unbound_instance_variable (lab.txt, vars)))
end
in
let modifs = List.map type_override lst in
@@ -2912,7 +2917,8 @@ and type_format loc str env =
let lid_loc = mk_lid_loc (Longident.Lident "Some") in
mk_exp_loc (Pexp_construct (lid_loc, Some (mk_int n)))
and mk_fmtty : type a b c d e f g h i j k l .
- (a, b, c, d, e, f, g, h, i, j, k, l) fmtty_rel -> Parsetree.expression =
+ (a, b, c, d, e, f, g, h, i, j, k, l) fmtty_rel -> Parsetree.expression
+ =
fun fmtty -> match fmtty with
| Char_ty rest -> mk_constr "Char_ty" [ mk_fmtty rest ]
| String_ty rest -> mk_constr "String_ty" [ mk_fmtty rest ]
@@ -3123,7 +3129,8 @@ and type_argument ?recarg env sarg ty_expected' ty_expected =
| _ -> false
in
match expand_head env ty_expected' with
- {desc = Tarrow(Nolabel,ty_arg,ty_res,_); level = lv} when is_inferred sarg ->
+ {desc = Tarrow(Nolabel,ty_arg,ty_res,_); level = lv}
+ when is_inferred sarg ->
(* apply optional arguments when expected type is "" *)
(* we must be very careful about not breaking the semantics *)
if !Clflags.principal then begin_def ();
@@ -3274,10 +3281,10 @@ and type_application env funct sargs =
List.for_all (fun (l,_) -> l = Nolabel) sargs &&
List.exists (fun l -> l <> Nolabel) labels &&
(Location.prerr_warning
- funct.exp_loc
- (Warnings.Labels_omitted
- (List.map Printtyp.string_of_label
- (List.filter ((<>) Nolabel) labels)));
+ funct.exp_loc
+ (Warnings.Labels_omitted
+ (List.map Printtyp.string_of_label
+ (List.filter ((<>) Nolabel) labels)));
true)
end
in
@@ -3344,7 +3351,8 @@ and type_application env funct sargs =
with Not_found ->
sargs, more_sargs,
if optional = Optional &&
- (List.mem_assoc Nolabel sargs || List.mem_assoc Nolabel more_sargs)
+ (List.mem_assoc Nolabel sargs
+ || List.mem_assoc Nolabel more_sargs)
then begin
may_warn funct.exp_loc
(Warnings.Without_principality "eliminated optional argument");
@@ -3374,7 +3382,9 @@ and type_application env funct sargs =
(* Special case for ignore: avoid discarding warning *)
Texp_ident (_, _, {val_kind=Val_prim{Primitive.prim_name="%ignore"}}),
[Nolabel, sarg] ->
- let ty_arg, ty_res = filter_arrow env (instance env funct.exp_type) Nolabel in
+ let ty_arg, ty_res =
+ filter_arrow env (instance env funct.exp_type) Nolabel
+ in
let exp = type_expect env sarg ty_arg in
begin match (expand_head env exp.exp_type).desc with
| Tarrow _ ->
@@ -3884,7 +3894,8 @@ let report_error env ppf = function
| Or_pattern_type_clash (id, trace) ->
report_unification_error ppf env trace
(function ppf ->
- fprintf ppf "The variable %s on the left-hand side of this or-pattern has type" (Ident.name id))
+ fprintf ppf "The variable %s on the left-hand side of this \
+ or-pattern has type" (Ident.name id))
(function ppf ->
fprintf ppf "but on the right-hand side it has type")
| Multiply_bound_variable name ->
@@ -4017,7 +4028,8 @@ let report_error env ppf = function
| Abstract_wrong_label (l, ty) ->
let label_mark = function
| Nolabel -> "but its first argument is not labelled"
- | l -> sprintf "but its first argument is labelled %s" (prefixed_label_name l) in
+ | l -> sprintf "but its first argument is labelled %s"
+ (prefixed_label_name l) in
reset_and_mark_loops ty;
fprintf ppf "@[<v>@[<2>This function should have type@ %a@]@,%s@]"
type_expr ty (label_mark l)
diff --git a/typing/typecore.mli b/typing/typecore.mli
index b6f9af2ac5..6251fe4b73 100644
--- a/typing/typecore.mli
+++ b/typing/typecore.mli
@@ -43,7 +43,7 @@ val type_self_pattern:
Env.t * Env.t * Env.t
val check_partial:
?lev:int -> Env.t -> type_expr ->
- Location.t -> Typedtree.case list -> Typedtree.partial
+ Location.t -> Typedtree.case list -> Typedtree.partial
val type_expect:
?in_function:(Location.t * type_expr) ->
Env.t -> Parsetree.expression -> type_expr -> Typedtree.expression
diff --git a/typing/typedecl.ml b/typing/typedecl.ml
index 7d4482f07a..5d2a993d67 100644
--- a/typing/typedecl.ml
+++ b/typing/typedecl.ml
@@ -166,11 +166,12 @@ let transl_labels loc env closed lbls =
raise(Error(loc, Duplicate_label name));
all_labels := StringSet.add name !all_labels)
lbls;
- let mk {pld_name=name;pld_mutable=mut;pld_type=arg;pld_loc=loc;pld_attributes=attrs} =
+ let mk {pld_name=name;pld_mutable=mut;pld_type=arg;pld_loc=loc;
+ pld_attributes=attrs} =
let arg = Ast_helper.Typ.force_poly arg in
let cty = transl_simple_type env closed arg in
- {ld_id = Ident.create name.txt; ld_name = name; ld_mutable = mut; ld_type = cty;
- ld_loc = loc; ld_attributes = attrs}
+ {ld_id = Ident.create name.txt; ld_name = name; ld_mutable = mut;
+ ld_type = cty; ld_loc = loc; ld_attributes = attrs}
in
let lbls = List.map mk lbls in
let lbls' =
diff --git a/typing/typedtree.ml b/typing/typedtree.ml
index 2de31ddc24..c3c9446f0b 100644
--- a/typing/typedtree.ml
+++ b/typing/typedtree.ml
@@ -132,8 +132,8 @@ and class_expr_desc =
Tcl_ident of Path.t * Longident.t loc * core_type list
| Tcl_structure of class_structure
| Tcl_fun of
- arg_label * pattern * (Ident.t * string loc * expression) list * class_expr *
- partial
+ arg_label * pattern * (Ident.t * string loc * expression) list
+ * class_expr * partial
| Tcl_apply of class_expr * (arg_label * expression option * optional) list
| Tcl_let of rec_flag * value_binding list *
(Ident.t * string loc * expression) list * class_expr
diff --git a/typing/typedtree.mli b/typing/typedtree.mli
index 736d9295c1..1526282d2b 100644
--- a/typing/typedtree.mli
+++ b/typing/typedtree.mli
@@ -131,8 +131,8 @@ and class_expr_desc =
Tcl_ident of Path.t * Longident.t loc * core_type list
| Tcl_structure of class_structure
| Tcl_fun of
- arg_label * pattern * (Ident.t * string loc * expression) list * class_expr *
- partial
+ arg_label * pattern * (Ident.t * string loc * expression) list
+ * class_expr * partial
| Tcl_apply of class_expr * (arg_label * expression option * optional) list
| Tcl_let of rec_flag * value_binding list *
(Ident.t * string loc * expression) list * class_expr
@@ -181,8 +181,8 @@ and module_expr =
}
and module_type_constraint =
- Tmodtype_implicit
-| Tmodtype_explicit of module_type
+ Tmodtype_implicit
+ | Tmodtype_explicit of module_type
and module_expr_desc =
Tmod_ident of Path.t * Longident.t loc
diff --git a/typing/typedtreeIter.mli b/typing/typedtreeIter.mli
index 921afb7dbf..cfb096286e 100644
--- a/typing/typedtreeIter.mli
+++ b/typing/typedtreeIter.mli
@@ -76,20 +76,19 @@ module type IteratorArgument = sig
val leave_type_declaration : type_declaration -> unit
val leave_type_declarations : rec_flag -> unit
- end
+end
module MakeIterator :
- functor
- (Iter : IteratorArgument) ->
- sig
- val iter_structure : structure -> unit
- val iter_signature : signature -> unit
- val iter_structure_item : structure_item -> unit
- val iter_signature_item : signature_item -> unit
- val iter_expression : expression -> unit
- val iter_module_type : module_type -> unit
- val iter_pattern : pattern -> unit
- val iter_class_expr : class_expr -> unit
- end
+ functor (Iter : IteratorArgument) ->
+ sig
+ val iter_structure : structure -> unit
+ val iter_signature : signature -> unit
+ val iter_structure_item : structure_item -> unit
+ val iter_signature_item : signature_item -> unit
+ val iter_expression : expression -> unit
+ val iter_module_type : module_type -> unit
+ val iter_pattern : pattern -> unit
+ val iter_class_expr : class_expr -> unit
+ end
module DefaultIteratorArgument : IteratorArgument
diff --git a/typing/typedtreeMap.ml b/typing/typedtreeMap.ml
index e6c05de591..704a427b88 100644
--- a/typing/typedtreeMap.ml
+++ b/typing/typedtreeMap.ml
@@ -24,7 +24,8 @@ module type MapArgument = sig
val enter_package_type : package_type -> package_type
val enter_signature : signature -> signature
val enter_signature_item : signature_item -> signature_item
- val enter_module_type_declaration : module_type_declaration -> module_type_declaration
+ val enter_module_type_declaration :
+ module_type_declaration -> module_type_declaration
val enter_module_type : module_type -> module_type
val enter_module_expr : module_expr -> module_expr
val enter_with_constraint : with_constraint -> with_constraint
@@ -52,7 +53,8 @@ module type MapArgument = sig
val leave_package_type : package_type -> package_type
val leave_signature : signature -> signature
val leave_signature_item : signature_item -> signature_item
- val leave_module_type_declaration : module_type_declaration -> module_type_declaration
+ val leave_module_type_declaration :
+ module_type_declaration -> module_type_declaration
val leave_module_type : module_type -> module_type
val leave_module_expr : module_expr -> module_expr
val leave_with_constraint : with_constraint -> with_constraint
@@ -258,7 +260,8 @@ module MakeMap(Map : MapArgument) = struct
and map_pat_extra pat_extra =
match pat_extra with
- | Tpat_constraint ct, loc, attrs -> (Tpat_constraint (map_core_type ct), loc, attrs)
+ | Tpat_constraint ct, loc, attrs ->
+ (Tpat_constraint (map_core_type ct), loc, attrs)
| (Tpat_type _ | Tpat_unpack), _, _ -> pat_extra
and map_expression exp =
@@ -417,27 +420,28 @@ module MakeMap(Map : MapArgument) = struct
match item.sig_desc with
Tsig_value vd ->
Tsig_value (map_value_description vd)
- | Tsig_type (rf, list) -> Tsig_type (rf, List.map map_type_declaration list)
+ | Tsig_type (rf, list) ->
+ Tsig_type (rf, List.map map_type_declaration list)
| Tsig_typext tyext ->
- Tsig_typext (map_type_extension tyext)
+ Tsig_typext (map_type_extension tyext)
| Tsig_exception ext ->
- Tsig_exception (map_extension_constructor ext)
+ Tsig_exception (map_extension_constructor ext)
| Tsig_module md ->
- Tsig_module {md with md_type = map_module_type md.md_type}
+ Tsig_module {md with md_type = map_module_type md.md_type}
| Tsig_recmodule list ->
- Tsig_recmodule
- (List.map
- (fun md -> {md with md_type = map_module_type md.md_type})
- list
- )
+ Tsig_recmodule
+ (List.map
+ (fun md -> {md with md_type = map_module_type md.md_type})
+ list
+ )
| Tsig_modtype mtd ->
- Tsig_modtype (map_module_type_declaration mtd)
+ Tsig_modtype (map_module_type_declaration mtd)
| Tsig_open _ -> item.sig_desc
| Tsig_include incl ->
- Tsig_include {incl with incl_mod = map_module_type incl.incl_mod}
+ Tsig_include {incl with incl_mod = map_module_type incl.incl_mod}
| Tsig_class list -> Tsig_class (List.map map_class_description list)
| Tsig_class_type list ->
- Tsig_class_type (List.map map_class_type_declaration list)
+ Tsig_class_type (List.map map_class_type_declaration list)
| Tsig_attribute _ as x -> x
in
Map.leave_signature_item { item with sig_desc = sig_desc }
diff --git a/typing/typedtreeMap.mli b/typing/typedtreeMap.mli
index 5178a51800..d212a93d97 100644
--- a/typing/typedtreeMap.mli
+++ b/typing/typedtreeMap.mli
@@ -24,7 +24,8 @@ module type MapArgument = sig
val enter_package_type : package_type -> package_type
val enter_signature : signature -> signature
val enter_signature_item : signature_item -> signature_item
- val enter_module_type_declaration : module_type_declaration -> module_type_declaration
+ val enter_module_type_declaration :
+ module_type_declaration -> module_type_declaration
val enter_module_type : module_type -> module_type
val enter_module_expr : module_expr -> module_expr
val enter_with_constraint : with_constraint -> with_constraint
@@ -52,7 +53,8 @@ module type MapArgument = sig
val leave_package_type : package_type -> package_type
val leave_signature : signature -> signature
val leave_signature_item : signature_item -> signature_item
- val leave_module_type_declaration : module_type_declaration -> module_type_declaration
+ val leave_module_type_declaration :
+ module_type_declaration -> module_type_declaration
val leave_module_type : module_type -> module_type
val leave_module_expr : module_expr -> module_expr
val leave_with_constraint : with_constraint -> with_constraint
diff --git a/typing/typemod.ml b/typing/typemod.ml
index d19f15fee5..0c50f86aaa 100644
--- a/typing/typemod.ml
+++ b/typing/typemod.ml
@@ -589,7 +589,9 @@ and transl_signature env sg =
List.iter
(fun decl -> check_name check_type names decl.ptype_name)
sdecls;
- let (decls, newenv) = Typedecl.transl_type_decl env rec_flag sdecls in
+ let (decls, newenv) =
+ Typedecl.transl_type_decl env rec_flag sdecls
+ in
let (trem, rem, final_env) = transl_sig newenv srem in
mksig (Tsig_type (rec_flag, decls)) env loc :: trem,
map_rec_type_with_row_types ~rec_flag
@@ -1317,7 +1319,8 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope =
(fun {md_id=id; md_type=mty} (name, _, smodl, attrs, loc) ->
let modl =
Typetexp.with_warning_attribute attrs (fun () ->
- type_module true funct_body (anchor_recmodule id anchor) newenv smodl)
+ type_module true funct_body (anchor_recmodule id anchor)
+ newenv smodl)
in
let mty' =
enrich_module_type anchor (Ident.name id) modl.mod_type newenv
diff --git a/typing/types.ml b/typing/types.ml
index 7f13df9183..3fca839376 100644
--- a/typing/types.ml
+++ b/typing/types.ml
@@ -264,9 +264,9 @@ and modtype_declaration =
}
and rec_status =
- Trec_not (* first in a nonrecursive group *)
- | Trec_first (* first in a recursive group *)
- | Trec_next (* not first in a recursive/nonrecursive group *)
+ Trec_not (* first in a nonrecursive group *)
+ | Trec_first (* first in a recursive group *)
+ | Trec_next (* not first in a recursive/nonrecursive group *)
and ext_status =
Text_first (* first constructor of an extension *)
diff --git a/typing/types.mli b/typing/types.mli
index e0c1076d7a..84131ccda1 100644
--- a/typing/types.mli
+++ b/typing/types.mli
@@ -254,9 +254,9 @@ and modtype_declaration =
}
and rec_status =
- Trec_not (* first in a nonrecursive group *)
- | Trec_first (* first in a recursive group *)
- | Trec_next (* not first in a recursive/nonrecursive group *)
+ Trec_not (* first in a nonrecursive group *)
+ | Trec_first (* first in a recursive group *)
+ | Trec_next (* not first in a recursive/nonrecursive group *)
and ext_status =
Text_first (* first constructor in an extension *)
diff --git a/utils/misc.ml b/utils/misc.ml
index cbbd472fa4..b6dba3db7d 100644
--- a/utils/misc.ml
+++ b/utils/misc.ml
@@ -178,7 +178,8 @@ let no_overflow_sub a b = (a lxor (lnot b)) lor (b lxor (a-b)) < 0
let no_overflow_mul a b = b <> 0 && (a * b) / b = a
-let no_overflow_lsl a k = 0 <= k && k < Sys.word_size && min_int asr k <= a && a <= max_int asr k
+let no_overflow_lsl a k =
+ 0 <= k && k < Sys.word_size && min_int asr k <= a && a <= max_int asr k
(* String operations *)
@@ -346,10 +347,10 @@ let spellcheck env name =
match edit_distance target head cutoff with
| None -> acc
| Some dist ->
- let (best_choice, best_dist) = acc in
- if dist < best_dist then ([head], dist)
- else if dist = best_dist then (head :: best_choice, dist)
- else acc
+ let (best_choice, best_dist) = acc in
+ if dist < best_dist then ([head], dist)
+ else if dist = best_dist then (head :: best_choice, dist)
+ else acc
in
fst (List.fold_left (compare name) ([], max_int) env)
@@ -497,7 +498,9 @@ module Color = struct
let setup =
let first = ref true in (* initialize only once *)
- let formatter_l = [Format.std_formatter; Format.err_formatter; Format.str_formatter] in
+ let formatter_l =
+ [Format.std_formatter; Format.err_formatter; Format.str_formatter]
+ in
fun o ->
if !first then (
first := false;
diff --git a/utils/misc.mli b/utils/misc.mli
index 75fc500147..cffa5062cd 100644
--- a/utils/misc.mli
+++ b/utils/misc.mli
@@ -105,8 +105,9 @@ val search_substring: string -> string -> int -> int
does not occur. *)
val replace_substring: before:string -> after:string -> string -> string
- (* [search_substring ~before ~after str] replaces all occurences
- of [before] with [after] in [str] and returns the resulting string. *)
+ (* [search_substring ~before ~after str] replaces all
+ occurences of [before] with [after] in [str] and returns
+ the resulting string. *)
val rev_split_words: string -> string list
(* [rev_split_words s] splits [s] in blank-separated words, and return