Commit Graph

12584 Commits (4ee998dbb442368571e269f64c62e2a99f90dff5)

Author SHA1 Message Date
Jeremie Dimino 4ee998dbb4 Add tests for Ast_invariants 2016-01-27 18:41:12 +00:00
Jeremie Dimino d8704f6ba8 Add module Ast_invariants
This module checks all the AST invariants. This is to ensure that all
invariants are written down in one place and are consistently checked
between the various clients of the AST (typer, pprintast, ...).

The invariants are checked in Pparsee, after applying the ppx
rewriters.
2016-01-27 18:41:12 +00:00
Jeremie Dimino 9e8facef9c typo 2016-01-27 18:40:54 +00:00
Damien Doligez 192ccd0902 Merge pull request #236
PR#6263: Add size_in_bytes and kind_size_in_bytes to Bigarray
2016-01-27 16:00:44 +01:00
Runhang Li 2ef65ed2aa Fix test
Several tests will fail on 32-bit machine.
2016-01-27 15:59:47 +01:00
Runhang Li 0544aac0af Add Shinwell as reviewer 2016-01-27 15:59:47 +01:00
Runhang Li a62ab0e163 Update Changelog 2016-01-27 15:58:06 +01:00
Runhang Li 829dea35a4 Change function names, improve documentation.
Change ``byte_size'' to ``size_in_bytes``, change ``kind_byte_size``
to ``kind_size_in_bytes``.

Add detailed comment indicating size functions do not consider header
of OCaml value.
2016-01-27 15:58:06 +01:00
Runhang Li aacf9f6c46 Update changelog 2016-01-27 15:58:06 +01:00
Runhang Li a41b820d26 Add byte_size and kind_byte_size to Bigarray 2016-01-27 15:57:19 +01:00
Damien Doligez 012cb8bd7b Merge pull request #335 from hhugo/missing_cmi
GPR#335: Typing: unification error - warn about missing cmi
2016-01-27 15:35:49 +01:00
Damien Doligez 6e6cabfe1b Merge pull request #370 from dra27/normalise-warnings
PR#7106: Warnings emitted by the compiler may contain \r\r\n on Windows
2016-01-27 15:28:20 +01:00
Mark Shinwell d708e2e7c7 Merge pull request #22 from bobot/feature/ephemerons
GPR#22: Add Ephemerons to OCaml
2016-01-27 09:37:59 +00:00
Mark Shinwell b1d549c3e0 Merge pull request #401 from dra27/testsuite-retries
GPR#401: Allow automatic re-running of failed tests
2016-01-26 17:25:26 +00:00
Alain Frisch 63fe7d97f8 Merge pull request #441 from trefis/constraints-loc
Better type error location in presence of constraints
2016-01-26 17:53:14 +01:00
Rafaël Bocquet 3c2f747f0b GPR#112: octal escape sequences for char and string literals
merged by Damien Doligez
2016-01-26 17:32:31 +01:00
David Allsopp 771d1bd06a Display list of directories which ran no tests
Testsuite directories should now display " => skipped" for each test,
rather than simply displaying nothing.
2016-01-26 14:47:49 +00:00
David Allsopp 6b8ce81f18 Display plurals correctly in testsuite summary
David R Allsopp -- pedantically eschewing lazy plural(s) since 1994.
2016-01-26 14:47:49 +00:00
David Allsopp 790d9c9885 Display details of all skipped tests
Some Makefile's displayed "=> skipped" lines; some Makefile's displayed
a summary line including the word skipped; most Makefile's are simply
silent if tests are skipped.

Silent obviously doesn't discern between "skipped" and "broken"!

Patch alters all existing to display an explicit "=> skipped" for any
test which is skipped (including ocamlopt tests if
`BYTECODE_ONLY=true`).

The summary is updated to include:

 - The number of skipped tests, and their names (if all tests are
   skipped in a directory then just the directory name is displayed)
 - The total number of tests considered - which should therefore be the
   same on all platforms in all configurations
2016-01-26 14:47:49 +00:00
David Allsopp e37f72f348 Remove requirement for gawk in testsuite
switch is a GNU extension - not supported, for example, by the default
installation of awk on Ubuntu.
2016-01-26 14:46:22 +00:00
David Allsopp 4bf93642af Allow automatic re-running of failed tests
MAX_TESTSUITE_DIR_RETRIES (which defaults to 1 for the native Windows
ports and 0 for all other platforms) causes the `all` and `list` targets
to re-run any given test directory an additional number of times in
order to eliminate random failures during tests.
2016-01-26 14:46:22 +00:00
Mark Shinwell 026572c2ec Merge pull request #366 from dra27/testsuite-windows
GPR#366: Various test-suite fixes for Windows
2016-01-26 14:21:00 +00:00
Mark Shinwell 341908f8cd Merge pull request #435 from bobot/test_debug_runtime
GPR#435: Make travis runs the testsuite with the debug runtime
2016-01-26 14:18:42 +00:00
Leo White ebd1a90dcd Update .depends 2016-01-26 11:26:40 +00:00
Thomas Refis d9337d856d Better type error location in presence of constraints 2016-01-26 10:48:34 +00:00
Pierre Chambart 3f95abd9d1 Merge pull request #428 from chambart/OCAMLPARAM_configuration_file
OCAMLPARAM option passed using a configuration file
2016-01-25 19:11:04 +01:00
Pierre Chambart ab2e736358 Rename compiler_configuration file
Renamed to ocaml_compiler_internal_params.
2016-01-25 18:50:29 +01:00
Pierre Chambart 2555c4e773 Update main and ocamldep 2016-01-25 18:50:29 +01:00
Pierre Chambart 5b2d1e7d5d Reindent compenv 2016-01-25 18:50:29 +01:00
Pierre Chambart d6ea706a02 Add handling of OCAMLPARAM as a file 2016-01-25 18:45:04 +01:00
Pierre Chambart c0d5375e06 Merge pull request #414 from chambart/add_middle_end_to_makefile
Build flambda
2016-01-25 18:41:19 +01:00
David Allsopp b505fc699c Improve threading tests on Windows
The `CANKILL` testsuite variable is eliminated in favour of testing for
`TOOLCHAIN`.

tests/lib-threads/signal.ml can be executed under native Windows by
means of a wrapper program to send CTRL+C.

tests/lib-threads/signal2.ml is not possible under native Windows
because Thread.sigmask is not implemented, so the precheck is updated to
reflect this, rather than the lack of kill -INT.

tests/lib-threads/sockets.ml is re-enabled, since the two MPRs affecting
it have been fixed.
2016-01-25 15:08:08 +00:00
David Allsopp e66d98e23e Missing reference files in the test suite 2016-01-25 15:08:06 +00:00
David Allsopp 09c5ded55b Add missing '@' to testsuite Makefiles
Various testsuite Makefiles displaying commands, which fog up the log
files.
2016-01-25 15:08:05 +00:00
David Allsopp 8d00870c39 Fix testsuite incorrectly running native tests
Warnings tests didn't check `$(BYTECODE_ONLY)`
2016-01-25 15:08:04 +00:00
David Allsopp 81604e76f6 Minor corrections to clean targets 2016-01-25 15:08:03 +00:00
David Allsopp 7c10fb227e Eliminate testsuite ulimit warning on Cygwin
Cygwin doesn't allow the stack limit (uname -s) to be changed, though it
can be queried. Alter the test so that the stack limit is only changed if
it is either unlimited or very large (and skip the tests if ulimit returns
an error)
2016-01-25 15:08:02 +00:00
David Allsopp 7d2e2afd12 Missing items from .gitignore 2016-01-25 15:08:01 +00:00
David Allsopp 0dc60eefc7 Fix test-suite custom scripts on Windows
.precheck, .runner and .checker files are part of scripts and need to
have LF line-endings.
2016-01-25 15:08:00 +00:00
David Allsopp 9b7c1134de Fix parsing tests on Windows
Testing the parsetree fails on Windows because the .ml files have `\r\n`
endings. For these tests, simplest simply to ensure that they are checked
out using LF endings, even on Windows.
2016-01-25 15:07:59 +00:00
David Allsopp 340788e216 Fix XML tokenization test on Windows
XML sample document behaves differently when checked out on Windows where
the source line endings in the test document become `\r\n`.

Alternative would have been to specify that t01.ml needs LF endings in
.gitattributes, but explicitly including the \n and \t in the OCaml string
seems less brittle.
2016-01-25 15:07:58 +00:00
François Bobot dbf2b8f90b [Ephemeron] Advise to use {!filter_map_inplace}
Add another example of use.
2016-01-25 08:44:31 +01:00
François Bobot e77b7aba50 Use CAML_EPHE_*_OFFSET for better readability
in major_gc
2016-01-25 08:33:57 +01:00
François Bobot d8823e11d4 Do cleaning less often. optimize No_naked_pointer
During clean phase for consistency we need to check if the key
   checked or got is alive or not. Three possibilities:
     - Doesn't unset the key, but still return the right value as if it
       is unset.
     - Unset the key and the data
     - Clean the ephemeron

   Testing aliveness is a little costly, so it is better to amortize
   this cost. Previously the last possibility was implemented but a
   better trade-off seems the second one, since the clean phase is still
   going to clean the ephemeron eventually.
2016-01-25 08:33:57 +01:00
François Bobot 40fd65c485 Check ephemerons after marking globals 2016-01-25 08:33:57 +01:00
François Bobot 4e8a7ff173 Move caml_ephe_clean to the weak.h
So that major_gc.c can inline this function for clean phase.
2016-01-25 08:33:57 +01:00
François Bobot 07b88bb5ac Add a test specifically for weak table
And fix a bug in the handling of ephemeron during minor collection
    found thanks to this test. Oldifying of ephemerons' data was not iterated
    enough because `oldify_todo_list` doesn't become non-null each time
    `caml_oldify_one` is run.
2016-01-25 08:33:57 +01:00
François Bobot cbb96ecdc8 [GC] shortcut in mark_ephe_aux as caml_ephe_clean 2016-01-25 08:33:56 +01:00
François Bobot 300c8e9656 [GC] Fix some comments and debug message 2016-01-25 08:33:56 +01:00
François Bobot 511192d547 Add Pierre Chambart to reviewers in Changes 2016-01-25 08:33:56 +01:00