summaryrefslogtreecommitdiff
path: root/testsuite/tests/basic
Commit message (Collapse)AuthorAgeFilesLines
* New script language for ocamltest (#12185)Damien Doligez2023-04-256-18/+29
| | | | New test script language, all tests translated automatically (see `tools/translate-all-tests`).
* update testsuite (2)Gabriel Scherer2023-02-231-0/+7
|
* Add type equality witness to the standard library (#11581)Nicolás Ojeda Bär2022-12-201-84/+84
|
* Add hash, seeded_hash to Int, Char, Bool, Float, Int32, Int64, Nativeint ↵Nicolás Ojeda Bär2022-10-272-1/+29
| | | | (#11246)
* toplevel: don't read Topdirs cmi during pre-initialisationFlorian Angeletti2022-07-012-112/+112
| | | | | | | | | | | | The Toploop module perform some pre-initialisation as soon as the module is linked. This pre-initialisation only affects modules linked by ocamlmktop when building custom toplevels. Indeed user-provided module are linked by ocamlmktop before the toplevel is initialised and started. This commit removes the read of topdirs.cmi from this preinitialisation stage. This may broke ocamlmktop users that install printers, but this is required to be able to write client of the toplevel compiler library that don't read +compiler-libs/topdirs.cmi. In particular, the expect_test tool from the compiler testsuite belongs to this category.
* testsuite: stabilize type identifiersFlorian Angeletti2022-06-142-112/+112
|
* Refine the semantics of domain callbacks.KC Sivaramakrishnan2022-06-061-84/+84
| | | | | | | | | | | | | | | | This PR (#11213) addresses issues pointed out in #11176 and #11178. It makes the following changes: * `Domain.at_exit` is now domain-local. * `Domain.at_exit` also used to ignore exceptions. Now, these exceptions are surfaced as the result of domain execution (similar to how `Stdlib.at_exit` works). * `Domain.at_startup` is renamed to `Domain.at_each_spawn`. * `Domain.at_first_spawn` is renamed to `Domain.before_first_spawn`. * `Domain.before_first_spawn` and `Domain.at_each_spawn` run the callbacks in FIFO order (as requested in #11178). The PR also adds tests to the test suite.
* Remove `Stream`, `Genlex`, `Pervasives` & the legacy `bigarray` library (#10896)Nicolás Ojeda Bär2022-01-201-84/+84
|
* Remove deprecated functions (#10867)Nicolás Ojeda Bär2022-01-123-110/+102
|
* Minor improvements.KC Sivaramakrishnan2021-12-231-1/+0
| | | | | * Remove unused function in asmcomp/reg.ml * Enable a few disabled tests
* Merge commit 'b4c5d7a55d9ec25693ba741a613d81f2c3ef66bc' into 5.00_rebase_to_prTom Kelly2021-12-212-0/+15
|\
| * Add non-regression testAlain Frisch2021-11-162-0/+15
| |
* | Merge commit '17561dc1cf9127e53485721d0f16f73aa436680e' into 5.00_rebase_to_prTom Kelly2021-12-202-112/+112
|\ \ | |/
| * Shapes: Add new tests and update others relying on identsUlysse Gérard2021-11-092-112/+112
| | | | | | | | Co-authored-by: Thomas Refis <thomas.refis@gmail.com>
* | Merge commit '2bcef4bc172f476217f253d24cb3311eaca504bf' into 5.00_rebase_to_prTom Kelly2021-12-202-0/+26
|\ \ | |/
| * Ensure that functions are evaluated after their arguments (#10728)Stephen Dolan2021-10-272-0/+26
| |
* | Merge commit '98e16f0334d3cb74e50e6c9073398b049438b2f6' into 5.00_rebase_to_prTom Kelly2021-12-201-84/+84
|\ \ | |/
| * Fix freshening of identifiersLeo White2021-10-051-84/+84
| |
* | Move effect handlers to its own module in StdlibKC Sivaramakrishnan2021-10-111-84/+84
| |
* | Merge commit '0117428c3ea163f42f4549ff4e7f255f29f6b4d4' into 5.00Tom Kelly2021-10-042-0/+53
|\ \ | |/
| * Support more arguments to tail calls by passing them through the domain ↵Xavier Leroy2021-09-092-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | state (#10595) In 2004, commit af9b98fcb, the calling conventions for the i386 port of ocamlopt were changed: the first 6 integer arguments go into registers, like before, but the next 16 arguments go into a global array `caml_extra_params`, instead of being passed on stack like before. The reason for this hack is that passing arguments in global memory does not preclude tail call optimization, unlike passing arguments on stack. Parameters passed via `caml_extra_params` are immediately copied on stack or in registers on function entry, before another function call, a GC, or a context switch can take place, so everything is safe in OCaml, and in Multicore OCaml as long as there is only one execution domain. This hack was justified by the paucity of registers provided by the i386 architecture. It was believed that other architectures provide enough registers for parameter passing that most if not all reasonable tail calls can be accommodated. Now it's 2021 and users want tail calls with more arguments than available registers on all the architectures we support. So, biting the bullet and swallowing some pride, this commit extends the 2004 i386 hack to all the architectures supported by OCaml. Once the registers available for passing function arguments are exhausted, the next 64 arguments are passed in a memory area that is part of the domain state. This argument passing is compatible with tail calls, so we get guaranteed tail calls up to 70 arguments (in the worst case). The domain state is used instead of a global array so that (1) this is compatible with Multicore OCaml and concurrent execution of multiple domains, and (2) we benefit from efficient addressing from the domain state register. For i386, we don't have a domain state register, and Multicore OCaml will support only one domain on this architecture, so we keep using a global `caml_extra_params` array; only, its size was increased to support 64 arguments. The tests for tail calls were extended to - Test tail calls to other functions, not just to self - Test up to 32 arguments.
* | Merge commit 'eccaa452ca8c118abccb6180d53b91e4b4907415' into 5.00Tom Kelly2021-10-041-54/+109
|\ \ | |/
| * Add {In,Out}_channel to Stdlib (#10545)Nicolás Ojeda Bär2021-09-011-84/+84
| |
* | Merge commit '8949e28fa1995de9fa72ee377993624af0f4a616' into 5.00Tom Kelly2021-10-042-2/+161
|\ \ | |/
| * Fix detection of immediate64 types through unboxed typesLeo White2021-07-291-42/+45
| |
| * Use unset in the testsuite to harden testsDavid Allsopp2021-07-101-2/+4
| |
* | Merge commit '5e45b2e9fa613099a334f19c95814f89ca16db7f' into ↵Tom Kelly2021-10-012-0/+16
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Add {Int,Int32,Int64,NativeInt}.{min,max} (#10392)Alain Frisch2021-05-112-0/+16
| |
* | Merge commit '099b86a046e304fe15e2bb37557bffc6aafaab15' into ↵Tom Kelly2021-10-012-0/+17
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Test evaluation order for for loops (#10394)Vincent Laviron2021-05-042-0/+17
| |
* | Merge commit '6462df79a89cede5c54ed53f1e2ff83309006633' into ↵Tom Kelly2021-09-302-0/+13
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * Preserve evaluation order in simplify_exits (#10284)Vincent Laviron2021-03-102-0/+13
| |
* | Merge commit '055f04d189273068396da8c298e6226dff90f26c' into ↵Tom Kelly2021-09-281-28/+14
|\ \ | |/ | | | | parallel_minor_gc_4_13
| * testsuite: include both -dlambda and -drawlambda outputsGabriel Scherer2020-10-211-1/+55
| |
| * testsuite: clarify the allocation behaviorGabriel Scherer2020-10-211-3/+4
| | | | | | | | (A nice catch of Florian Angeletti's review)
| * Matching.Simple.explode_or_pat: on-demand generation of fresh identifiersGabriel Scherer2020-10-211-43/+43
| | | | | | | | This change was suggested by Thomas Refis during code review.
| * matching: avoid useless bindings in do_for_multiple_matchGabriel Scherer2020-10-211-97/+55
| |
| * Match.do_for_multiple_match: we can always flattenGabriel Scherer2020-10-211-99/+88
| |
| * matching: more complete testsuite for do_for_multiple_matchGabriel Scherer2020-10-211-0/+193
| | | | | | | | | | | | | | | | | | | | | | Note: we now use -dlambda rather than -drawlambda, because otherwise the output is much more verbose and difficult to read. (-drawlambda is closed to the inner workings of the pattern-matching compiler, but the simplification in -dlambda make the output much more readable. They are also fairly predictable/non-surprising, so I think that we can still easily understand what the compiler did from that output.)
| * Adapt testsNicolás Ojeda Bär2020-10-081-21/+20
| |
* | update test referenceTom Kelly2021-04-221-22/+22
| |
* | correct tests for spacetime removalTom Kelly2021-03-081-21/+21
| |
* | Merge commit 'a7d1af4a872e22aebd1e6cc27b2beafdea2ad2dd' into ↵Tom Kelly2021-03-051-21/+21
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * Add `'a Either.t = Left of 'a | Right of 'b`Gabriel Scherer2020-09-021-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ```ocaml val left : 'a -> ('a, 'b) t val right : 'b -> ('a, 'b) t val is_left : ('a, 'b) t -> bool val is_right : ('a, 'b) t -> bool val find_left : ('a, 'b) t -> 'a option val find_right : ('a, 'b) t -> 'b option val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t val map : left:('a1 -> 'a2) -> right:('b1 -> 'b2) -> ('a1, 'b1) t -> ('a2, 'b2) t val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c val equal : left:('a -> 'a -> bool) -> right:('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool val compare : left:('a -> 'a -> int) -> right:('b -> 'b -> int) -> ('a, 'b) t -> ('a, 'b) t -> int ``` Unlike [result], no [either] type is made available in Stdlib, one needs to access [Either.t] explicitly: - This type is less common in typical OCaml codebases, which prefer domain-specific variant types whose constructors carry more meaning. - Adding this to Stdlib would raise warnings in existing codebases that already use a constructor named Left or Right: + when opening a module that exports such a name, warning 45 is raised + adding a second constructor of the same name in scope kicks in the disambiguation mechanisms, and warning 41 may now be raised by existing code. If the use becomes more common in the future we can always revisit this choice.
* | Merge commit 'e41dc9c44327f40c1ab0feea12f779c931c9e31e' into ↵Tom Kelly2021-03-041-7/+7
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * Update test reference filesNicolás Ojeda Bär2020-07-211-7/+7
| |
* | fix some reference output for some testsTom Kelly2021-03-031-20/+21
| |
* | Merge commit 'e717512a54349bce4bbbb9590d4fe5a2c671c4e9' into ↵Tom Kelly2021-03-031-0/+59
|\ \ | |/ | | | | parallel_minor_gc_4_12
| * matching: add a test for do_for_multiple_match flattening failureThomas Refis2020-06-061-0/+59
| | | | | | | | | | Note: this is due to mk_alpha_env raising Cannot_flatten during splitting/precompilation.
* | Merge commit '0ca651b95cbda5d58f7760f0fa1dba965d1f0828' into ↵Tom Kelly2021-03-021-1/+1
|\ \ | |/ | | | | parallel_minor_gc_4_12