summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Instruction scheduling: do not reorder atomic loads (#12248)HEADtrunkXavier Leroy2023-05-163-3/+15
| | | | | | Just treat atomic loads like stores. Fixes: #12216
* make caml_time_counter concurrent-safe on macOS (#12234)Anil Madhavapeddy2023-05-157-32/+23
| | | | | | | | Also time counter a uint64_t instead of casting between signed/unsigned longs on all the platforms. The type of most of the monotonic counter interfaces is an uint64, except for Windows. Fixes #12096
* Fix check-typoNicolás Ojeda Bär2023-05-151-3/+6
|
* Dune build: gen_primitives.sh must be called from the root (#12244)Antonin Décimo2023-05-152-10/+7
| | | Also sync the list of dependencies with gen_primitives.
* Merge pull request #12131 from NickBarnes/nick-get-copyGabriel Scherer2023-05-152-61/+23
|\ | | | | Simplify weak hash sets
| * Merge branch 'trunk' into nick-get-copyGabriel Scherer2023-05-1526-31/+78
| |\ | |/ |/|
* | Merge pull request #12240 from dhil/patch-1Gabriel Scherer2023-05-121-1/+1
|\ \ | | | | | | Fix typo in privatetypes.etex
| * | Fix typo in privatetypes.etexDaniel Hillerström2023-05-121-1/+1
|/ / | | | | This commit fixes a trivial typo in the manual pages about private types.
* | Constify C constructors and flags tables (#12223)Antonin Décimo2023-05-0822-27/+32
| |
* | Sys.rename win fixes (#12184)Jan Midtgaard2023-05-054-0/+42
| |
| * Move Changes entry for catch-up merge.Nick Barnes2023-05-021-4/+4
| |
| * Merge branch 'trunk' into nick-get-copyNick Barnes2023-05-021387-13544/+17901
| |\ | |/ |/|
* | Merge pull request #12213 from shym/dynlink-exn-wrapsGabriel Scherer2023-04-299-59/+71
|\ \ | | | | | | Improve legibility of dynamic linking error messages
| * | Improve legibility of dynamic linking error messagesSamuel Hym2023-04-289-59/+71
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid wrapping a Dynlink `Cannot_open_dynamic_library` error into another `Cannot_open_dynamic_library` error: - rewrite the platform-specific (bytecode and native) `load` implementations to ensure they raise only `DT.Error` exceptions, by always catching other exceptions and wrapping them into `Cannot_open_dynamic_library` errors, - remove the systematic wrapping of exceptions in `Dynlink_common`. Adopt `%s` rather than `%S` to display the inner exceptions in the exception printer for `DT.Error (Cannot_open_dynamic_library _)` to avoid double escaping In particular, trying to link a non-existent file in the native implementation gives the hard-to-parse message: Fatal error: exception Dynlink.Error (Dynlink.Cannot_open_dll "Dynlink.Error (Dynlink.Cannot_open_dll \"Failure(\\\"...: cannot open shared object file: No such file or directory\\\")\")") This patch turns this message into: Fatal error: exception Dynlink.Error (Dynlink.Cannot_open_dll Failure("...: cannot open shared object file: No such file or directory"))
* | Introduce and use `caml_ext_table_add_noexc` (#12202)Xavier Leroy2023-04-275-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Same functionality as `caml_ext_table_add`, but returns -1 when running out of memory instead of raising an exception. Use the new function in `caml_read_directory`, which must not raise exceptions since it is called from blocking sections. Instead, `caml_read_directory` returns an error code if `caml_ext_table_add_noexc` runs out of memory. Also: harden `caml_ext_table_add{,_noexc}` against integer overflow when computing the new table size for resizing. Fixes: #10403
* | ocamllex: Accept line directives ended with CR/LF. (#12146) (#12147)SeungCheol Jung2023-04-262-1/+4
| |
* | Merge pull request #12192 from gadmm/simpl_atomicGabriel Scherer2023-04-2625-195/+160
|\ \ | | | | | | Simplification with atomic_ helpers
| * | Make use of polymorphic atomic_ helpersGuillaume Munch-Maccagnoni2023-04-1815-87/+61
| | |
| * | Clarification acq -> acquire, rel -> releaseGuillaume Munch-Maccagnoni2023-04-1813-90/+92
| | |
| * | Make atomic_* helpers polymorphicGuillaume Munch-Maccagnoni2023-04-181-21/+10
| | |
* | | Merge pull request #12206 from Octachron/remove_unused_errorGabriel Scherer2023-04-252-6/+0
|\ \ \ | | | | | | | | remove unused error constructor: Unbound_row_variable
| * | | remove unused constructor: Unbound_row_variableFlorian Angeletti2023-04-252-6/+0
| | | |
* | | | New script language for ocamltest (#12185)Damien Doligez2023-04-251240-6705/+9929
|/ / / | | | | | | | | | New test script language, all tests translated automatically (see `tools/translate-all-tests`).
* | | HACKING.adoc: document the V=1 option of makefilesGabriel Scherer2023-04-251-1/+5
| | | | | | | | | | | | | | | I needed it this morning and failed to find it without going back to the PR.
* | | Merge pull request #11846 from dra27/win64-abiXavier Leroy2023-04-225-27/+35
|\ \ \ | | | | | | | | Simplify and fix the shadow store reservation on Win64
| * | | AMD64 emitter: replace a trivial `lea` by a `mov`Xavier Leroy2023-04-221-1/+1
| | | |
| * | | Place Win64 ABI shadow store in c_stack_linkDavid Allsopp2023-03-155-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Win64 ABI requires the caller to reserve a fixed 32 bytes of stack space prior to the call for the function to spill the four argument registers into (if it chooses). There are three ways C functions are called by OCaml programs. Under Windows, two of them were needlessly wasting space reserving this twice and the third was not reserving it at all. This implementation capitalises on the fact that OCaml 5 no longer uses the C stack for OCaml code and so adds the shadow store to the c_stack_link struct. When in OCaml code, the C stack is therefore left in exactly the required state to call a C function, which removes the need for the stack pointer computations from the backend. Simultaneously, this also fixes a bug, as the shadow store previously was not being reserved at all when calling noalloc C functions.
| * | | Fix register metadata for Win64 ABIDavid Allsopp2023-03-142-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rbx is normally preserved in the Win64 ABI (as for Unix), but OCaml 5 uses it to save the OCaml stack pointer for direct (noalloc) calls. The fact rbx is clobbered at C call was incorrectly missing in the Win64 register descriptions.
* | | | Check for syntax errors in test scripts instead of ignoring them. (#12194)Damien Doligez2023-04-223-21/+18
| | | | | | | | | | | | check that anything that starts with `(* TEST` is indeed a test script
* | | | Don't include stdbool.h systematically (#12196)Xavier Leroy2023-04-213-2/+2
| | | | | | | | | | | | | | | | It can cause problem with user code that defines its own `bool` type. Instead, use stdbool.h internally only, and only when really needed.
* | | | Merge pull request #12187 from damiendoligez/fix-ocamldoc-warningsFlorian Angeletti2023-04-194-6/+6
|\ \ \ \ | | | | | | | | | | Fix warnings emitted when compiling the documentation
| * | | | fix broken links in documentation commentsDamien Doligez2023-04-173-5/+5
| | | | |
| * | | | suppress spurious alert when compiling stdlib documentationDamien Doligez2023-04-171-1/+1
| | | | |
* | | | | Merge pull request #11876 from gadmm/echec_remove_global_roots_in_finalizerGabriel Scherer2023-04-182-15/+31
|\ \ \ \ \ | | | | | | | | | | | | Document the situation regarding `remove_global_root` inside custom finalizers
| * | | | | Document the situation regarding remove_global_root inside custom finalizersGuillaume Munch-Maccagnoni2023-04-182-15/+31
| | |_|/ / | |/| | |
* | | | | Merge pull request #12190 from shindere/fix-zstd-support-detectionGabriel Scherer2023-04-182-8/+120
|\ \ \ \ \ | |/ / / / |/| | | | Take host into account when looking for pkg-config
| * | | | Take host into account when looking for pkg-configSébastien Hinderer2023-04-182-2/+110
| | | | | | | | | | | | | | | | | | | | Try ${host}-pkg-config before falling back to pkg-config
| * | | | configure: use a variable to refer to pkg-configSébastien Hinderer2023-04-182-8/+12
|/ / / / | | | | | | | | | | | | | | | | This is to prepare the next commit: when cross-compiling the right pkg-config to use is the one giving information on the host system.
* | | | Merge pull request #12170 from gasche/pthread_getaffinity-configure-fixGabriel Scherer2023-04-183-9/+27
|\ \ \ \ | | | | | | | | | | fix the configure check for pthread_getaffinity_np
| * | | | fix the configure check for pthread_getaffinity_npDavid Allsopp2023-04-173-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AC_COMPILE_IFELSE only compiles, but the lack of the function results in a linking error, not a compilation error. fixes #12101
* | | | | Update GDB scripts to work with OCaml 5 (#12179)Nick Barnes2023-04-173-177/+275
|/ / / / | | | | | | | | | | | | Update gdb-macros and gdb_ocamlrun.py to work with OCaml 5.
* | | | Merge pull request #12171 from askvortsov1/as/extern_state_refactorGabriel Scherer2023-04-172-26/+42
|\ \ \ \ | | | | | | | | | | extern.c: raise OOM instead of passing null in `caml_output_*` entrypoints
| * | | | feat: refactor `extern_free_stack`Alexander Skvortsov2023-04-161-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split out `extern_init_stack` into a separate function, so that the code for initializing and resetting the extern_state stack is not duplicated. Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
| * | | | chore: adjust ChangesAlexander Skvortsov2023-04-161-0/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
| * | | | feat: `caml_fatal_error` on misuse of serialize functionsAlexander Skvortsov2023-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These should only be called from within a `caml_output_*` entrypoint context. Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
| * | | | extern.c: for consistent style with `intern.c`, rename `extern_state` var to `s`Alexander Skvortsov2023-04-161-12/+11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
| * | | | extern.c: raise OOM instead of passing null in `caml_output_*` entrypointsAlexander Skvortsov2023-04-161-10/+13
|/ / / / | | | | | | | | | | | | Signed-off-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
* | | | Merge pull request #12172 from gasche/major_gc_PAGE_MASKGabriel Scherer2023-04-131-21/+33
|\ \ \ \ | | | | | | | | | | major_gc.c: avoid using a PAGE_MASK macro
| * | | | major_gc.c: turn macros into static inlineGabriel Scherer2023-04-101-9/+15
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Stefan Muenzel <source@s.muenzel.net>
| * | | | major_gc.c: rename PAGE into CHUNK to avoid the PAGE_MASK macroGabriel Scherer2023-04-081-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #12101 reports a build warning on android where a macro PAGE_MASK is already defined by the system. We rename this macro into CHUNK_MASK, along with some documentation of the representation of the compressed mark stack.