Commit Graph

20365 Commits (bfd3d7deb057372162026c5d50b4c2782e4cdd25)

Author SHA1 Message Date
David Allsopp bfd3d7deb0 Bump FlexDLL submodule to 0.38 2020-06-29 17:06:19 +01:00
Florian Angeletti 33b9b16dd7 Changes bookkeeping: 9556 is not in 4.11 2020-06-29 11:50:23 +02:00
Jacques Garrigue e0ec63ae21
Fix #8747: incorrect principality warning on functional updates of records (#9709) 2020-06-28 23:20:12 +02:00
Gabriel Scherer 38bbd7fc29
Merge pull request #9716 from sanette/patch-1
correct punctuation
2020-06-28 21:07:03 +02:00
珊瑚 b6af92155a
correct punctuation 2020-06-28 16:57:13 +02:00
octachron b212928e74 Fix Changes after backporting #9163 and #9537 2020-06-26 19:22:54 +02:00
Florian Angeletti da0e9ed1f2
Merge pull request #9537 from lpw25/fix-PR7897
Fix warning 38 for rebound extension constructors (#7897)
2020-06-26 19:04:48 +02:00
Leo White 083fa6624b Add Changes entry 2020-06-26 12:37:07 +01:00
Leo White b4361282c1 Fix PR#7897 2020-06-26 12:35:35 +01:00
Leo White 6302b1e0cc
Merge pull request #9670 from lpw25/stat-full-major-collections
Report full major collections in Gc stats
2020-06-26 12:31:47 +01:00
Leo White 368eb16ee8
Treat loops properly in un_anf (#9163) 2020-06-26 09:51:30 +02:00
Florian Angeletti 7d3a3f8c24
Merge pull request #9416 from lpw25/fix-warning-58-flambda-ocamlnat
Avoid warning 58 in flambda ocamlnat
2020-06-26 09:37:41 +02:00
Florian Angeletti 1fb6a464a8
Merge pull request #9244 from lpw25/fix-usage-warnings
Fix usage warnings
2020-06-25 18:21:04 +02:00
Xavier Leroy 8d874fa3bb CI: make "light" test lighter
Also disable shared library support.
2020-06-25 17:13:45 +02:00
Florian Angeletti 457304d075
Merge pull request #9673 from xvw/attempt-to-fix-6633
Add Hint when a module is used in place of a module type
2020-06-25 17:00:37 +02:00
Leo White 5e214047e0 Add Changes entry 2020-06-25 14:45:45 +01:00
Leo White 9e61a063c3 Avoid warning 58 in flambda ocamlnat 2020-06-25 14:45:45 +01:00
Leo White 0734368f55 Add Changes entry 2020-06-25 14:24:41 +01:00
Leo White dfd0c0cc77 Report full major collections in Gc stats 2020-06-25 14:24:41 +01:00
Thomas Refis 2d3bc0eb22
HACKING.adoc: using dune to get merlin's support (#9468)
Co-authored-by: Gabriel Scherer <gabriel.scherer@gmail.com>
2020-06-25 14:11:21 +02:00
Leo White fd2572289c Add Changes entry 2020-06-25 11:35:00 +01:00
Leo White bc8c0d2538 Make the `mark` parameters in `Includemod` non-optional 2020-06-25 11:35:00 +01:00
Leo White 1f9be49f02
Merge pull request #9385 from lpw25/fix-copy-scope-bugs
Fix copy scope bugs
2020-06-25 10:59:59 +01:00
Antonin Décimo d107fedd13
Don't define _INTEGRAL_MAX_BITS macro (#9686)
VS2019 throws the following warning [1] about the _INTEGRAL_MAX_BITS
[2] macro:

    stat.c(33): error C2220: the following warning is treated as an error
    stat.c(33): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored

The doc reads:

> _INTEGRAL_MAX_BITS Defined as the integer literal value 64, the
> maximum size (in bits) for a non-vector integral type. This macro is
> always defined.

Apparently, it became a predefined macro in Visual Studio 2005.

This commit simply removes the macro definition.

[1]: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4117
[2]: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
2020-06-24 18:32:43 +02:00
Nicolás Ojeda Bär 34dbc549b8
Merge pull request #9533 from bschommer/string-suffix-prefix
String suffix and prefix functions.
2020-06-24 17:39:32 +02:00
Gabriel Scherer 244298a3d1
Merge pull request #9708 from trefis/fix-dune-prim
dune: temporarily remove use of new primitive before building
2020-06-24 17:13:44 +02:00
Xavier Leroy 4f387e4cb0 Update reference output in no-flat-float-array mode
Follow-up to bd510cdf9
2020-06-24 17:05:42 +02:00
Xavier Leroy a9fad824ca Make some tests conditional on naked pointers support
These tests use the "Is_in_static_data" predicate, which is no longer
supported in no-naked-pointers mode.
2020-06-24 15:25:03 +02:00
Thomas Refis 821391667f dune: depend on new runtime files 2020-06-24 15:15:36 +02:00
Thomas Refis 7bf55c6c54 dune: temporarily remove use of new primitive before building 2020-06-24 15:07:16 +02:00
xvw 50848feb10 Add Hint when a module is used in place of a module type
Add hint when a module is used instead of a module type or when a
module type is used instead of a module or when a class type is
used instead of a class.
2020-06-24 14:37:03 +02:00
Gabriel Scherer 038fb85bac
Merge pull request #9702 from garrigue/fix9695
Fix #9695: no error when opening an alias to a missing module
2020-06-24 13:23:18 +02:00
David Allsopp 9be2c0111d Adjust Changes for #9011 2020-06-24 11:15:28 +01:00
David Allsopp 7b6098aa5f
Merge pull request #9011 from dra27/fix-msvc-empty-cmxa
Allow linking empty .cmxa files on MSVC
2020-06-24 11:06:52 +01:00
Bernhard Schommer ddb1b5e4b5
Use new String.is_suffix function. 2020-06-24 12:01:55 +02:00
Bernhard Schommer e00d7f3a42
Added String prefix and suffix tests.
The functions test if the second argument is a prefix or suffix of the
first argument.
2020-06-24 12:01:55 +02:00
David Allsopp 20a9c4319a
Merge pull request #9558 from dra27/cross-ld
Always permit triplet-prefixed ld in PACKLD
2020-06-23 21:04:27 +01:00
Nicolás Ojeda Bär 7f0dbd4e65
ocamltest: show failing logs (#9696) 2020-06-23 20:47:38 +02:00
Jacques Garrigue ab83af0322 add example without -no-alias-deps 2020-06-23 18:37:37 +02:00
Nicolás Ojeda Bär bd510cdf93
ocamltest: do not compare binaries produced by ocamlopt.opt and ocamlopt.byte (#9677) 2020-06-23 17:36:37 +02:00
Jacques Garrigue 95a8fbfd5b change API for Env.open_signature to clarify errors 2020-06-23 16:36:55 +02:00
Xavier Leroy 83c4909d52
Merge pull request #9698 from xavierleroy/less-page-table
This pull request eliminates some more uses of the page table in the runtime system when built in no-naked-pointers mode, in preparation for Multicore OCaml, which has no page table.
2020-06-23 16:36:11 +02:00
Gabriel Scherer 2ddae1250b Revert "regression test for #9701"
This reverts commit f0fae6692f.

This new test appears to break something on the CI, possibly when
flambda is used:

>  ... testing 'toplevel_script_backtrace.ml' with 1 (toplevel) =>
> failed (Running toplevel_script_backtrace.ml in bytecode toplevel
> (expected exit status: 2): command
> /home/barsac/ci/builds/workspace/extra-checks/runtime/ocamlrun
> /home/barsac/ci/builds/workspace/extra-checks/ocaml -noinit -no-version -noprompt -nostdlib -I
> /home/barsac/ci/builds/workspace/extra-checks/stdlib -I
> /home/barsac/ci/builds/workspace/extra-checks/toplevel
> toplevel_script_backtrace.ml failed with exit code 1)
2020-06-23 16:15:15 +02:00
David Allsopp 6fc8e07d62
Merge pull request #9692 from nojb/shellquote
Simplify Makefile
2020-06-23 14:39:39 +01:00
Gabriel Scherer f0fae6692f regression test for #9701 2020-06-23 15:32:06 +02:00
Jacques Garrigue 6ccab9b9b0 Fix #9695: no error when opening an alias to a missing module 2020-06-23 15:31:45 +02:00
Xavier Leroy 40a55c71a1 Is_in_static_data is not available in no-naked-pointers mode
This is another classification macro that requires the page table.
Its only uses in the whole OPAM universe is two of our own tests
(tests/asmcomp/is_static.ml and tests/lib-obj/reachable_words_np.ml)
which are now run only in naked-pointers mode.
2020-06-23 10:30:40 +02:00
Xavier Leroy 2aa502e1b9 Replace some uses of Is_in_heap with !Is_young
This is in preparation for the complete removal of the page table.

Without the page table, there is no way to distinguish pointers into
the major heap from pointers to structured constants statically
allocated by ocamlopt.  The only distinction we can make between pointers
is whether they point to the minor heap (Is_young) or not.

However, we cannot (yet) define Is_in_heap(v) as !Is_young(v), because
Is_in_heap with its current meaning is used
- in the compactor
- in many assertions.

Yet, there are a few places, mostly in the handling of ephemerons,
where Is_in_heap(v) can safely be replaced with !Is_young(v).
This is done in this commit.
2020-06-23 10:30:40 +02:00
Xavier Leroy 8c062185cc Is_in_heap_or_young is always true in no-naked-pointers mode
This is in preparation for the complete removal of the page table.

Without the page table, there is no way to distinguish pointers into
the heaps (minor or major) from pointers outside the heaps,
e.g. structured constants statically allocated by ocamlopt.

Hence, the difference between Is_in_heap_or_young and Is_in_value_area
(behavior on static data) disappears, and both should always return true.

All uses of Is_in_heap_or_young but one are in assertions, which
therefore become useless, but not wrong.

The one use inside the code is when registering a finalisation with
`Gc.finalise`.  Today, `Invalid_argument` is raised if the value to be
finalised is statically allocated.  With this commit and in
no-naked-pointers mode, `GC.finalise` succeeds, but the finalisation
function will never be called.
2020-06-23 10:30:40 +02:00
Xavier Leroy 55fcf9fa89 weak.[ch]: use Is_in_value_area instead of Is_in_heap_or_young.
In weak.c there are two tests determining whether a value is a custom
block or not.  The original code, using Is_in_heap_or_young, would
conclude "not a custom block" for statically-allocated custom blocks
like int64 literals.

In weak.h there is one test Is_in_heap_or_young (child) that guards
1- a test for forward blocks
2- a test for white blocks.

Both guarded tests are false for a statically-allocated block:
- test 1 because lazy values are not statically allocated normally
- test 2 because statically-allocated blocks must have black headers.

Hence it makes no difference to test Is_in_value_area (child).
2020-06-23 10:30:40 +02:00