Conversation
as for the bytecode case. All differences byte/native are now done in module Toploop (except tracing, which is still extra). There is only one source for Toploop (toploop.mlp).
|
I am a bit concerned with the use of BEGIN_BYTE/END_BYTE and idem for native code. Wouldn't it be possible to create a shared functor (maybe in Also, since |
|
I guess the functor approach would be possible, in order to isolate the code that is specific for byte/native. Not sure whether The core part are the different implementations of |
|
Will provide this externally. Sorry for disturbing you. |
|
This sounded like a useful contribution. Any opposition to having it included if someone else wants to put some more effort to it? |
|
Please take it if you want. |
Frame descriptors WG3 comments
The modes for the function being applied were wrong in the case of a Regional function, which can allow a heap closure to close over a stack closure.
ce76e02 flambda-backend: Bugfix for type_application (ocaml#746) 44f3afb flambda-backend: PR580 for main branch (ocaml#743) b851eaa flambda-backend: Backport first part of ocaml/ocaml PR10498 (ocaml#737) fafb4bd flambda-backend: Fix return mode for eta-expanded function in type_argument (ocaml#735) c31f6c3 flambda-backend: Fix treatment of functions called [@nontail] (ocaml#725) 847781e flambda-backend: Fix build_upstream post-PR703 (ocaml#712) bfcbbf8 flambda-backend: Extend Pblock value kind to handle variants (ocaml#703) b2cab95 flambda-backend: Merge ocaml-jst a6d6e0e flambda-backend: Merge ocaml-jst 88a4f63 flambda-backend: Use Pmakearray for immutable arrays (ocaml#699) eeaa44b flambda-backend: Install an ocamldoc binary (ocaml#695) 48d322b flambda-backend: Ensure that GC is not invoked from bounds check failures (ocaml#681) 4370fa1 flambda-backend: Review changes of term directory (ocaml#602) 65a4566 flambda-backend: Add code coverage using bisect_ppx (ocaml#352) 63ab65f flambda-backend: Bugfix for primitive inclusion (ocaml#662) 7e3e0c8 flambda-backend: Fix inclusion checks for primitives (ocaml#661) 96c68f9 flambda-backend: Speed up linking by changing cmxa format (ocaml#607) 1829150 flambda-backend: Bugfix for Translmod.all_idents (ocaml#659) git-subtree-dir: ocaml git-subtree-split: ce76e02
The modes for the function being applied were wrong in the case of a Regional function, which can allow a heap closure to close over a stack closure.
Added (10): * Conex - establishing trust into data repositories * Generic Programming in OCaml * Improving the OCaml Web Stack: Motivations and Progress * Learn OCaml: An Online Learning Center for OCaml * Lock-free programming for the masses * OCaml inside: a drop-in replacement for libtls * Semantics of the Lambda intermediate language * Sundials/ML: interfacing with numerical solvers * The State of the OCaml Platform: September 2016 * Who's got your Mail? Mr. Mime Still Missing (2): * OPAM-builder: Continuous Monitoring of OPAM Repositories * Statistically profiling memory in OCaml Extra (1): * What's new in OCamls 4.03: https://watch.ocaml.org/videos/watch/b967996a-3dab-415f-8e51-d8908361b2b2 Co-authored-by: Cuihtlauac ALVARADO <cuihtmlauac@tarides.com>
This PR gets rid of the separate toplevel/opt* modules and unifies all toploop functionality into the modules that are also used in the bytecode case. That way, the latest improvements for the bytecode toplevel are also available for the native version. Also, this makes it simpler to use the native toplevel (e.g. important for findlib). In particular:
Toploopis built from a single sourcetoploop.mlp, which is preprocessed resulting intotoploop.mlbyteandtoploop.mlopt. The code sections that are only for one of the versions are marked withBEGIN_BYTE/END_BYTEandBEGIN_NATIVE/END_NATIVE, respectively.Topdirs.load_filealso went intoToploopTopdirswent intoTraceThere are two open issues:
#use load_recIt is also not clear to me what happens when we get conflicting symbols, e.g. when modified versions of the same module are loaded. (If this does not work reliably, we should catch it and reject it.)
This branch is not yet super-well tested. I'm sending this PR in particular because I'm hoping for testers. Use
make ocamlnataftermake world.optto build the native toplevel.There is a findlib branch supporting the native toploop: https://gitlab.camlcity.org/gerd/lib-findlib/tree/ocamlnat
I did not include the .depends files in the PR, so you'll have run
make dependbefore building.