Commit Graph

22 Commits (a0b7aff645e10994525215d9a36f706d48d4225d)

Author SHA1 Message Date
Mark Shinwell 36c163248d Remove support for compiler plugins (#2276)
After consultation on the core developers' list I am proposing this patch to remove support for compiler plugins.

The main motivations for removing compiler plugins are:
- They are a potential security risk.
 - They increase the complexity of the build system and make maintenance of the Dynlink libraries more difficult (although actually, this complexity could probably be reduced after #2268 is merged).
 - Many applications of plugins should be able to be expressed by building custom compiler drivers that link against compilerlibs.

* Remove compiler plugins and hooks
* Add new function Dynlink.unsafe_get_global_symbol but keep it outside the documented API.
* Remove otherlibs/dynlink/nodynlink.ml
* Update Changes
2019-03-13 11:46:37 +01:00
Florian Angeletti 558530a8b4 manual: compiler-libs.mld -> compiler_libs.mld 2018-09-12 16:32:37 +02:00
Florian Angeletti ef135a71ae
MPR7546, manual: preambles and warnings for compiler-libs modules (#2020)
* preambles for compiler-libs modules

* Compilerlibs intro and warning link
2018-09-12 09:51:47 +02:00
Valentin Gatien-Baron 3d0299a185 Create warning 64, for uses of -unsafe with a -pp that returns a marshalled ast
Instead of the current print to stderr. This way it's treated the same
as other warnings: it has a position, colors, can be made an error,
disabled, goes in the expected formatter, is documented.
2018-07-15 15:08:38 -04:00
octachron 1a4dc2fa26 GPR#1187: cite typemod and pparse plugin hooks 2017-06-01 22:43:30 +02:00
Fabrice Le Fessant bfc36003aa Add hooks on some compilation phases 2016-07-12 17:59:58 +02:00
Gabriel Scherer 5f1bc3ef6f Make Pparse functions type-safe
In order to remove some redundancy, the Pparse modules used a dirty
Obj.magic trick to manipulate either structure or signature values
(ASTs parsed from source files). This unsafe approach means that
programming mistakes may result in broken type soudness, and indeed
I myself had to track a very puzzling Segfault during the development
of my Menhir backend (due to a copy-paste error I was passing
Parse.implementation instead of Parse.interface somewhere). Wondering
why your parser generator seems to generate segfaulting parsers is
Not Fun.

This change means that the external interface of Pparse has changed
a bit. There is no way to fulfill the type of Pparse.file in
a type-safe way

    val file : formatter -> tool_name:string -> string ->
      (Lexing.lexbuf -> 'a) -> string -> 'a

as it promises to be able to process any ast type 'a depending on the
magic number (the last string argument). The knew type-safe interface is

    val file : formatter -> tool_name:string -> string ->
      (Lexing.lexbuf -> 'a) -> 'a ast_kind -> 'a

where ['a ast_kind] is a GADT type:

    type 'a ast_kind =
    | Structure : Parsetree.structure ast_kind
    | Signature : Parsetree.signature ast_kind
2016-06-29 21:23:28 -04:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Alain Frisch eb0beeba69 #6582: make backport of #5904 more backwards compatible.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15414 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-02 07:37:08 +00:00
Alain Frisch 44c2066055 #5904: improve support for ppx in the toplevel by allowing ppx processors to keep information across calls (through the use of persistent cookies). Also change Ast_mapper.register so that the function that creates the mapper from arguments is executed once the context has been restored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 14:54:01 +00:00
Alain Frisch 047e09748c Cherry-pick 15062,15063,15064 from 4.02 (#6497).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:46:34 +00:00
Alain Frisch e01f145c2e More direct style, remove the temporary file created by -pp processor right after it has been read.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14085 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-10 13:48:43 +00:00
Alain Frisch 0769ab46a7 Introduce and use higher-level wrappers around parsing routine for .ml/.mli files, taking care of -pp and -ppx preprocessors.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14084 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-10 13:44:34 +00:00
Damien Doligez 7b31f54095 It is no longer necessary to keep pre-processed files in case of errors
(see commits 3817 and 5224,5302,5816)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13406 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-18 20:13:53 +00:00
Alain Frisch ef9fc7ab0f #5904: support for -ppx in the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-25 09:12:31 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Alain Frisch 4cfd2fc2a6 Reverting bad commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:23:34 +00:00
Alain Frisch 7fe8c8ce6f Fix #5490.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:21:03 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Daniel de Rauglaudre c1e0dad2a8 Regroupement du preprocessage et de la lecture directe des fichiers source
à arbre de syntaxe, dans un nouveau fichier pparse.ml commun a compile.ml
et optcompile.ml


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-02-08 10:14:31 +00:00