Commit Graph

19096 Commits (0912ecde6f71012a506d136f219430ae6edfac77)

Author SHA1 Message Date
Sébastien Hinderer 0912ecde6f ocamltest: introduce the action_name variable
This variable makes the name of the currently executed action available in
the ocamltest environment.
2019-09-26 17:44:22 +02:00
Sébastien Hinderer 529b9132d8 ocamltest: rename action_name into name in the Actions module. 2019-09-26 17:44:22 +02:00
Sébastien Hinderer 47c887584d ocamltest: take parsing of response files out of environments module
This commit is a follow-up to 123334881a.

Its purpose is to make the environments module abstract again,
by moving the parsing mechanism in its own module.
Consequently, the environments module can be linked earlier again (as
was the case before the commit mentionned above) and can thus be
used in other modules.
2019-09-26 17:44:22 +02:00
Gabriel Scherer b1848d3a27
Merge pull request #8959 from gasche/refactor-pat-bound-idents
clarify the implementation of Typedtree.pat_bound_idents_full
2019-09-25 14:14:44 +02:00
Daniel Bünzli 17ef076000 .ocamlinit: XDG base directory lookup. (#8834) 2019-09-25 13:50:25 +02:00
Gabriel Scherer 0f9ad95c46 [minor] clarify the implementation of Typedtree.pat_bound_idents_full
The previous implementation used global state and was making another
change more difficult than it had to be.

Note: I got rid of `rev_let_bound_idents` in the API because computing
it is no more efficient than `Fun.compose List.rev let_bound_idents`.

(Only the _full versions might have a more-efficient rev_ version,
and those are not exposed, which is the right choice:
                           a simpler API is worth a list reversal.)
2019-09-25 11:47:24 +02:00
Gabriel Scherer 776fcc3919 make depend 2019-09-25 11:45:33 +02:00
Nicolás Ojeda Bär 3aff5141fd Add a new -output-complete-exe option (#8872)
This option allows to build self-contained bytecode executable and is aimed to replace `-custom`. The main difference between the two is that executables produced by `-output-compete-exe` can be stripped.
2019-09-25 08:07:31 +01:00
Gabriel Scherer e6ffdba72a
Merge pull request #8968 from gasche/refactor-pattern-traversals
typedtree: refactor the generic pattern traversal functions
2019-09-24 22:47:44 +02:00
Gabriel Scherer 7b10a26bc8 refactor the generic pattern traversal functions 2019-09-24 21:20:10 +02:00
Stephen Dolan b3720334e2
Merge pull request #8974 from gasche/robust-obj-id-test
Move the Obj.id+serialization tests from expect tests to reference tests
2019-09-24 12:19:10 -04:00
Gabriel Scherer 0c16e3939d Move the Obj.id+serialization tests from expect tests to reference tests
Thoses test should *not* be toplevel or expect-style tests, because
then the Obj.id counter of the compiler implementation (called by the
bytecode read-eval-print loop) is the same as the Obj.id counter of
the test code below. In particular, any change to the compiler
implementation to use more objects or exceptions will change the
reference numbers, making the test fragile in a very surprising way.

I found the issue while working on #8968, which hits the bug.

I tested this PR by adding a spurious

    let exception Unused in
    ignore Unused;

in typing/typecore.ml:unify_pat_types. Before this PR,

    make one DIR=tests/typing-objects

would be broken by the change. After this PR,

    make one DIR=tests/typing-objects
    make one DIR=tests/runtime-objects

works fine.

(no change entry needed)
2019-09-24 16:43:06 +02:00
Gabriel Scherer d70d6df648
Merge pull request #8967 from gasche/cmt2annot-proper-iterator
tools/cmt2annot: use proper Tast_iter instead of Tast_mapper
2019-09-24 16:41:26 +02:00
Sébastien Hinderer 107100e7a8
Merge pull request #8973 from diml/add-missing-header-to-typedecl_unboxed
Add a header to typedecl_unboxed.mli
2019-09-24 12:00:20 +02:00
Jeremie Dimino 35f262d84d Add header to typedecl_unboxed.mli
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-09-24 10:24:46 +01:00
Jeremie Dimino 2d31ebfc8b Add support for [@@immediate64]
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-09-24 07:56:15 +01:00
Nicolás Ojeda Bär 31d75f7526
Merge pull request #8966 from shindere/fix-reading-ocamltests-files
Accept ocamltests files not terminated by a newline
2019-09-24 08:05:54 +02:00
Sébastien Hinderer d22bbd4db8 Accept ocamltests files not terminated by a newline 2019-09-24 06:55:07 +02:00
Jose Fernando Lopez Fernandez e6096b8f6c Removed function caml_init_alloc_for_heap from memory.h (#8710)
* Removed the function 'caml_init_alloc_from_heap' from memory.h, as well as it's definition in memory.c, and the calling code in gc_ctrl.c. The function was unconditionally returning zero with no other functionality, as explained in issue #8709.

No change entry needed.
2019-09-23 16:04:43 +02:00
Sébastien Hinderer 7b44da68cf
Merge pull request #8947 from shindere/fix-bfd-support
Fix/improve support for the BFD library
2019-09-23 14:55:29 +02:00
Sébastien Hinderer 688687d153 Changes entry 2019-09-23 14:52:25 +02:00
Sébastien Hinderer a74def9144 Inria CI: request BFD support on MacOS X 2019-09-23 14:49:03 +02:00
Sébastien Hinderer ff20676fdc configure: improve support for the BFD library
This commit adds:

- The --with-bfd command-line option

- The BFD_INCLUDE_DIR and BFD_LIB_DIR configuration variables
2019-09-23 14:48:48 +02:00
Sébastien Hinderer e3b33a5750 Build system: introduce the BFD_LDFLAGS variable
This variable is not really used yet but will be used soon.
2019-09-23 14:45:54 +02:00
Sébastien Hinderer 4b1ca767cb Build system: reorder BFD-related variables in Makefile.config 2019-09-23 14:45:54 +02:00
Sébastien Hinderer 762fe0abaa Build system: rename the LIBBFD_INCLUDE variable to BFD_CPPFLAGS 2019-09-23 14:45:54 +02:00
Sébastien Hinderer d718cd9db3 Build system: rename the LIBBFD_LINK variable to BFD_LDFLAGS 2019-09-23 14:45:54 +02:00
Sébastien Hinderer 3d642545e8 configure: fix typo in variable name 2019-09-23 14:45:54 +02:00
Gabriel Scherer 36c461d8b9 tools/cmt2annot: use proper Tast_iter instead of Tast_mapper 2019-09-23 11:21:50 +02:00
Gabriel Scherer 9618f860e5
Merge pull request #8960 from gasche/fix-typecore-Tpat_exception-trunk
typecore: fix a small bug in type_pat
2019-09-21 10:22:12 +02:00
Gabriel Scherer ab13c54366 typecore: fix a small bug in type_pat
The Tpat_exception case would make several calls to the continuation
'k', which must be used linearily -- exactly once.

This bug is harmless and hard to reach today because Tpat_exception is
mostly used at the toplevel or under an or-pattern, where the
continuation is the identity. But the type-checker still allows
Ppat_constraint and Ppat_open nodes above exception-patterns, allowing
to observe the duplication. And maybe more tomorrow?

    $ ocaml -dsource
    # fun f x -> match f x with _ -> () | (exception _ : exn) -> ();;
      [...]
        pattern
           Tpat_constraint
           core_type
             Ttyp_constr "exn/7!"
             []
           pattern
             Tpat_exception
             pattern
               Tpat_constraint
               core_type
                 Ttyp_constr "exn/7!"
                 []
               pattern
                 Tpat_any
      [...]
    # fun f x -> match f x with _ -> () | Stdlib.(exception _) -> ();;
      [...]
        pattern
          Tpat_open ""Stdlib!""
          pattern
            Tpat_exception
            pattern
              Tpat_open ""Stdlib!""
              pattern (//toplevel//[1,0+42]..//toplevel//[1,0+43])
                Tpat_any
      [...]
2019-09-21 00:46:18 +02:00
Gabriel Scherer 8f7708a0fb
Merge pull request #8954 from Armael/fix-toplevel-submsg-locs
Fix error submessages in the toplevel: do not display dummy locations
2019-09-20 10:58:09 +02:00
Florian Angeletti cb11bcf50a
manual: move pattern open out of the extension chapter (#8950)
* move the grammar description to the pattern section of the language reference
* add a small example in the module chapter of the tutorial
2019-09-20 10:19:18 +02:00
Armaël Guéneau e5a87c7233 update Changes 2019-09-19 15:43:07 +02:00
Armaël Guéneau 3167a57bd5 Fix error submessages in the toplevel: do not display dummy locations
Fixes #8953
2019-09-19 15:42:32 +02:00
Gabriel Scherer 452c3df125 Changes: create a 4.09 maintenance branch, just in case 2019-09-19 15:39:04 +02:00
Florian Angeletti c56ed411f8 Merge pull request #8827 from gasche/revert-numeric-operators-hint
Revert #2307 ( Hint on type error on numeric operators )

(cherry picked from commit 1fadc49604a791a7e9fa41c90fedad9304267f19)
2019-09-19 15:00:24 +02:00
Thomas Refis f56b59d017
Fix "open struct .. end" on clambda backend (#8944) 2019-09-17 06:50:11 -04:00
Alain Frisch 5c031d2d3d Decide unboxing of let-bound expressions based on their Cmm translation (#2165) 2019-09-17 10:22:08 +02:00
Gabriel Scherer 5c7c619d4d List.find_map : ('a -> 'b option) -> 'a list -> 'b option (#8832) 2019-09-13 17:58:01 +02:00
Gabriel Scherer 2ed8badb40 [minor] fix 4.08.1 Changes 2019-09-13 13:36:52 +02:00
Gabriel Scherer 46a8f926e9 Changes: 4.09 reorderings 2019-09-13 11:58:27 +02:00
Gabriel Scherer f400d5c46d Changes WIP 2019-09-13 11:50:42 +02:00
Gabriel Scherer 08469ec0ce
Merge pull request #8928 from gretay-js/linear_funstate
Move contains_calls and num_stack_slots from Proc to Mach.fundecl
2019-09-12 22:21:29 +02:00
Greta Yorsh ad67512171 Undo changes in .depend and Makefile that are no longer needed 2019-09-12 13:25:36 +01:00
Greta Yorsh 04996b7e2e Update Changes 2019-09-12 12:58:54 +01:00
Greta Yorsh 1c128fdf25 Make contains_calls into a reference instance variable 2019-09-12 12:58:54 +01:00
Armaël Guéneau 133994824e PR#8611: fix test tool-toplevel/pr6468.ml 2019-09-11 20:29:47 +02:00
Armaël Guéneau c4109d6051 PR#8611: be more conservative (no assert false), and tweak some comments 2019-09-11 20:08:50 +02:00
Kyle Miller 03ddf295d5 Fix source highlighting for long toplevel phrases (#7925) (#8611)
Fix #7925: error messages for long toplevel inputs would have dummy locations
2019-09-11 20:07:34 +02:00