Commit Graph

3242 Commits (8a46d76bf9359b5cc505b3f2f9c81eb624c631fa)

Author SHA1 Message Date
jacobly0 8a46d76bf9
Fix mergeable section flags and use .rodata.cst16 where appropriate (#9981)
On x86-64 ELF, the `.rodata.cst8` section was incorrectly used.
2020-10-18 13:57:53 +02:00
Thomas Refis 9fdc759ac0
Centralized tracking of frontend's global state (#9963)
import Local_store from merlin, with a simplified API following review comments
2020-10-15 14:47:19 +02:00
Thomas Refis efac790249
Make some locations more accurate (#8987) 2020-10-14 16:03:10 +02:00
Florian Angeletti 5e15dd8eb5
Merge pull request #9861 from trefis/9858
Catch Nondep_cannot_erase
2020-10-13 16:31:34 +02:00
Greta Yorsh 855c13cd6e
ability to restart compilation from .cmir-linear IR files 2020-10-13 15:07:13 +02:00
Xavier Leroy 426b10c6a8
Provide semaphores in the threading library (#9930)
This commit adds a new thread-related module Semaphore, implementing
counting semaphores and binary semaphores.

The two kinds of semaphores are presented as two different
abstract types in two sub-modules, Counting and Binary.
2020-10-12 19:09:52 +02:00
Xavier Leroy f809e9dec1
Make sure the process can terminate when the last thread calls Thread.exit (#9973)
To this end, the tick thread must be stopped, otherwise it prevents
the whole process from exiting.

Fixes: #9971
2020-10-12 15:24:40 +02:00
Mehdi Bouaziz 6ab6052e15
[hashtbl] Restore ongoing traversal status after filter_map_inplace (#8746) 2020-10-12 15:12:09 +02:00
Gabriel Scherer 0cec3a353b
Merge pull request #9803 from trefis/pr9799
pat_env points to the correct environment
2020-10-12 11:00:52 +02:00
Gabriel Scherer 82b29828d2
Allow `[@tailcall true]` and `[@tailcall false]` (#9754)
* remove the unused is_native_tail_call_heuristic forward reference

This forward-reference from Lambda to Asmcomp was used to generate
machine-specific tailcall information in -annot output; this only use
was removed in 57d329e07b, so we can now
remove it to simplify the codebase.

The logic was non-trivial and might be useful again in the future.

* [minor] testsuite: convert warnings/w51.ml to an expect-test

* [minor] translattribute: refactor attribute payload deconstruction

* [@tailcall false]: warn if the call *is* a tailcall

(+ constructor renaming suggested by Nicolás during review)

* Changes

* testsuite: add an example with the 'invalid payload' exception

(suggested by Nicolás during review)
2020-10-10 13:41:39 +02:00
Xavier Leroy 86c8a98f3c
Merge pull request #9948 from nojb/remove_spacetime
The Spacetime memory profiler is not going to be supported in Multicore OCaml, and  is already broken by some of the related changes in OCaml 4.12.  The core development team decided to remove Spacetime support from OCaml 4.12.
2020-10-09 14:43:23 +02:00
Damien Doligez 0069123c61
clean up and fix GC message 0x1 (#9949) 2020-10-09 12:02:00 +02:00
Nicolás Ojeda Bär 7e4392a39e Changes 2020-10-08 20:28:15 +02:00
Thomas Refis 66e5cd11f2 Changes 2020-10-07 15:54:23 +02:00
Greta Yorsh 04bceec6cc
Save Linear IR before emit (#8939)
* Save IR before emit

* Update .depend for linear_format

* Test for -save-ir-after command-line option

* Address review comments

* Add Changes entry
2020-10-07 11:32:40 +01:00
Vincent Laviron eb342da8a9
Ensure all structured constants are registered (#9940)
Allocated constants from other compilation units were not registered, resulting in missed opportunities for unboxing FP and boxed-integer constants.
2020-10-06 15:19:51 +02:00
Leo White 952281944d
Merge pull request #9429 from lpw25/more-hash-operators
Add ppx-only unary operators
2020-10-06 07:46:35 +01:00
Leo White 83f85c5521 Add Changes entry 2020-10-05 18:59:22 +01:00
Nicolás Ojeda Bär 8806ddcbba
Unix.setsid: guard against errors (#9958)
The return value of `setsid()` was not checked for errors.
2020-10-05 19:20:30 +02:00
Xavier Leroy 786ee521cf
Use "error checking" mutexes in the threads library (#9846)
- Mutex.lock raises Sys_error if the mutex is already locked by the
  calling thread.
- Mutex.unlock raises Sys_error if the mutex is unlocked or locked
  by another thread.

Add the corresponding tests.

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
2020-10-05 15:00:58 +02:00
Xavier Leroy af48d9fe8f
Add a naked pointers dynamic checker (#9956)
This is selected at configure-time, option --enable-naked-pointers-checker.

The major GC warns when it detects out-of-heap pointers that could cause the no-naked-pointers runtime system to crash.

This is supported on x86-64 only, but on all ports (Unix and Windows).

Added tests involving naked pointers in tests/runtime-naked-pointers

Co-authored-by: KC Sivaramakrishnan <kc@kcsrk.info>
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
Co-authored-by: Enguerrand Decorne <decorne.en@gmail.com>
2020-10-05 14:44:31 +02:00
Jacques Garrigue a5f63ba65f
Remove propagation from previous branches (#9811) 2020-10-03 10:48:57 +09:00
Bernhard Schommer b727f422bd
Do not install VERSION file. (#9895)
The installed VERSION file could clash with a C++20 standard header.

Fixes: #9523
2020-10-02 15:41:34 +02:00
KC Sivaramakrishnan 530330f3cf
Ensure that the mark stack push optimisation handles naked pointers. (#9951)
Fixes: #9950.
2020-10-02 15:13:16 +02:00
Xavier Leroy 72dbcb8433
Merge pull request #9864 from xavierleroy/is_immediate-refactored
Revised detection of arithmetic instructions with immediate operands
2020-09-22 09:22:26 +02:00
David Allsopp 001c2d1283 Restore Cygwin64 support 2020-09-21 13:36:03 +01:00
David Allsopp 37d6394874 Update Changes for #9925 2020-09-21 13:35:14 +01:00
David Allsopp 14300d3b1a Fix -fdebug-prefix-map when using flexlink
Prepend the -fdebug-prefix-map= option with -link if the "linker" is in
fact flexlink.
2020-09-21 10:11:39 +01:00
Gabriel Scherer 9f3472dc4a
Merge pull request #9669 from lpw25/fix-7538
Check for misplaced attributes on module aliases (Fix #7538)
2020-09-18 14:57:42 +02:00
Matthew Ryan b6b42f3ce6
Re-check Tpackage scope escapes after normalising paths (#9715)
Rewrite check_scope_escape using proper marking and unmarking

This uses the Btype.snapshot/backtrack mechanism, to ensure that we
always undo marking on types from the environment and to avoid a
`try ... with ...` construction for each recursive call.
2020-09-18 14:38:32 +02:00
Leo White 3c9ca39e14 Add Changes entry 2020-09-18 09:45:23 +01:00
Leo White bbad93d222
Merge pull request #9783 from lpw25/widen-warning-16
Widen warning 16 to more cases
2020-09-18 09:12:56 +01:00
Leo White 2cb6066e4b Add Changes entry 2020-09-17 18:54:23 +01:00
Sadiq Jaffer c10217818f
Garbage collector colours change (#9756) 2020-09-17 17:24:04 +02:00
Xavier Leroy a33cfe5859 Changes for 9864 2020-09-16 14:01:49 +02:00
Florian Angeletti d0e983e2aa
Merge pull request #9745 from johnwhitington/trunk
Unify labeled and unlabeled Standard Library module interfaces
2020-09-15 11:07:25 +02:00
Xavier Leroy ba0a9c2ce8
Export, document, and use Unix._exit (#9914)
This is a wrapper around the _exit system call.  It has been implemented
in otherlibs/unix/exit.c for a long time but never exported.

This commit exports and documents it as `Unix._exit`.

The Unix implementation of `establish_server` is changed to use `_exit`
and to have gender-neutral comments.

A test was added to check that OCaml finalization actions are not performed.
2020-09-14 19:03:42 +02:00
Florian Angeletti bc4d260de7
Merge pull request #9865 from raphael-proust/pp_print_seq
Stdlib.Format: add pp_print_seq
2020-09-14 16:52:11 +02:00
Thomas Refis f8fb2d4ba6 Changes 2020-09-14 13:33:36 +02:00
David Allsopp 3b1d4dafe0
Eliminate caml_code_area globals (#9909) 2020-09-14 09:16:09 +01:00
Raphaël Proust 63f107c62e Credit MR reviewer 2020-09-12 09:19:30 +02:00
Florian Angeletti 9a31c888b1
Merge pull request #9433 from lpw25/fix-package-constraints-for-module-aliases
Fix package constraints for module aliases
2020-09-11 18:21:24 +02:00
John Whitington c3f6cd7ff7 Merge remote-tracking branch 'upstream/trunk' into trunk 2020-09-11 14:14:38 +01:00
John Whitington 5a230ee8e7 Add reviewer 2020-09-10 19:33:19 +01:00
Chet Murthy 0d46b5206d redo: This little patch fixes the pretty-printing of "rebind" extension-constructors (and also rebind exceptions) so that it matches the parser. With tests. a rebind extension like
type t  += A = M.A [@a]
was pretty-printed as

type t += A[@a] = M.A
[obviously wrong, also not accepted by parser]

With tests for extension-constructors and exceptions.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pr-extension-constructor-rebind-pprint-4.11
# Changes to be committed:
#	modified:   Changes
#	modified:   parsing/pprintast.ml
#	modified:   testsuite/tests/parsetree/source.ml
#
# Untracked files:
#	Changes.orig
#	parsing/pprintast.ml.orig
#	testsuite/tests/parsetree/source.ml.orig
#	testsuite/tests/parsetree/source.ml.rej
#
2020-09-10 11:09:06 -07:00
Chet Murthy 5b8b6de2ac sorry, too-long line in Changes file
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pr-polyvariant-pprint
# Your branch is up to date with 'my-fork/pr-polyvariant-pprint'.
#
# Changes to be committed:
#	modified:   Changes
#
# Untracked files:
#	Changes.orig
#	parsing/pprintast.ml.orig
#	testsuite/tests/parsetree/source.ml.orig
#	testsuite/tests/parsetree/source.ml.rej
#
2020-09-09 15:15:22 -07:00
Chet Murthy e2ec81fe56 re-do of print polyvariants that start with a core_type,closed, not low with leading bar ("|").
a type "[ | w ]" must be printed with the "|", or it won't be
reparseable.

with tests, Changes entry.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch pr-polyvariant-pprint
# Changes to be committed:
#	modified:   Changes
#	modified:   parsing/parsetree.mli
#	modified:   parsing/pprintast.ml
#	modified:   testsuite/tests/parsetree/source.ml
#
# Untracked files:
#	Changes.orig
#	parsing/pprintast.ml.orig
#	testsuite/tests/parsetree/source.ml.orig
#	testsuite/tests/parsetree/source.ml.rej
#
2020-09-09 13:37:36 -07:00
Gabriel Scherer 03839754f4
List.equal, List.compare (#9668)
`List.equal f foo bar` is nicer than
`List.length foo = List.length bar && List.for_all2 f foo bar`.

Note: with List.compare there is a risk of users having opened the
List module, and then using 'compare' from the stdlib unqualified. For
example:

    List.(sort compare foo bar)

Such code will break (type error), and has to be fixed by using
Stdlib.compare. Stdlib is available since OCaml 4.07; people wishing
to support both 4.12 and older releases would have to avoid opening
List, or rebind 'compare' locally.
2020-09-09 20:01:04 +02:00
Gabriel Scherer 9c5a2ef8dc
Merge pull request #9440 from progman1/genprintvalbug
#9148 extension constructor printing discrepancy in REPL
2020-09-09 17:11:02 +02:00
Gabriel Scherer aa858a35ae
Merge pull request #9889 from Octachron/pprintyp_short_path_cache
printtyp: cache short path data in wrap_env
2020-09-09 10:50:01 +02:00