Commit Graph

51 Commits (9e181ca8f446d238ba279bc22fef9d166d4f38b0)

Author SHA1 Message Date
Thomas Refis 9fdc759ac0
Centralized tracking of frontend's global state (#9963)
import Local_store from merlin, with a simplified API following review comments
2020-10-15 14:47:19 +02:00
Leo White 76752f7255 Avoid polymorphic compare in Ident 2020-03-04 14:41:42 +00:00
Jeremie Dimino 7e0862a212 Refactor load path management and initial environment
- Add a Load_path module which caches files lookup

- Instead of falling back to the external environment, allow to
  declare in the environment that a module comes from the external
  world. This allows persistent structures to shadows non-persistent
  ones
2019-01-30 16:36:38 +00:00
Daniel Bünzli a7afd89003 s/string_of_int/Int.to_string/g 2018-11-07 13:52:02 +01:00
Thomas Refis eaa85dbbf9 ident: better printing 2018-09-21 11:47:44 -04:00
Thomas Refis 8641a978f6 ident: lowest_scope for globals, highest_scope for locals 2018-09-21 11:47:44 -04:00
Thomas Refis 553151b53a ident: fix unique name 2018-09-21 11:47:44 -04:00
Thomas Refis 582127f240 ident: remove create_hidden 2018-09-21 11:47:44 -04:00
Thomas Refis fc210f08e4 ident: hide stamp related functions from the interface
The only remaining user was [Predef], which was bumping the counter by
999 to allow cmis to remain compatible if new predefs were defined.
This commit removes that use by making sure that every ident defined in
predef.ml is marked as predef and use a different stamp counter as user
defined idents. That way idents in cmi always start at 1, no matter how
many predefs there are.

Stamps on predef aren't strictly necessary: predefs names are unique.
However, predef idents comparison is just faster with stamps.
2018-09-21 11:47:44 -04:00
Thomas Refis b134588f28 ident: split Local into Local and Scoped
Also rename [create] into [create_scoped] and [create_var] into
[create_local].
2018-09-21 11:47:44 -04:00
Thomas Refis 686961f032 ident: use a variant type instead of the flags field 2018-09-21 11:47:44 -04:00
Thomas Refis 67f29d1a18 ident: add an explicit scope field
- Ident.create now takes a scope as argument
- added Ident.create_var to use when the scope doesn't matter
- the current_time and the current_level are unrelated as of this
  commit. But one has to remember to bump the level when creating new
  scopes.
2018-09-21 11:47:42 -04:00
Jérémie Dimino 9124ab82d1
Deprecate Pervasives (#1605)
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.

- remove special case for Stdlib.Pervasives in printtyp.ml
2018-08-27 12:42:14 +01:00
Thomas Refis b65d86d82f Ident.hide -> Ident.create_hidden 2018-08-07 09:10:46 +01:00
Gabriel Radanne b073f825de Make Ident.t abstract and immutable. (#1704) 2018-04-09 10:19:23 +01:00
Sébastien Hinderer fa7019437c Add the -dunique-ids and -dno-unique-ids options to the compilers
These options allow to control whether identifiers are made unique by
appending a stamp to them when dumping intermediate representations or not.

The default is to print the stamp, as is done currently.

The "-dno-unique-ids" option is useful e.g. to simplify the comparison
between a produced intermediate reprsentation (-dlambda, say) and the
expected one, in the context of the testsuite, for instance.
2018-02-20 18:02:35 +01:00
alainfrisch 0fd3e65748 Starting to switch to a layered representation of 'opens'. 2017-03-24 14:24:36 +01: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
Pierre Chambart 38ce618089 Make the Ident module identifiable 2016-01-12 18:01:25 +01:00
Gabriel Scherer 2bdc8f610a minor: add Ident.compare to call Set.Make(Ident) directly 2015-12-14 15:20:10 +01:00
Alain Frisch 3856cd00c5 Remove dead code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-16 14:55:15 +00:00
Luc Maranget fcf3571123 Folllowup to PR#6359, great cleanup of switch actions sharing.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 15:43:20 +00:00
Jacques Garrigue 26e1ff7138 Merge short-paths into a fresh branch of trunk.
Also fix a bit unification and subtyping errors.
You now need the flag -short-path to activate short paths.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths-4.01@13285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-29 14:21:12 +00:00
Jacques Garrigue 8fac736f31 clean up and merge the patch disambiguate-with-warning from PR#5759
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/record-disambiguation@13048 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-29 07:54:06 +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
Jacques Garrigue 1d79bec5d0 build a map from internal paths to printed paths
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12340 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-11 05:50:08 +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
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Damien Doligez ddc87e9802 PR#1914,PR#1956 depollution de l'espace de noms
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6055 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-04 14:32:34 +00:00
Jacques Garrigue f2095623ff fast and compact classes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5977 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-11-25 09:20:45 +00:00
Xavier Leroy e11c636eaf Reinitialiser le gensym de Ident entre 2 compilations (PR#1618)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-05-12 09:34:05 +00:00
Xavier Leroy 48bb2ad5b4 Ajout unique_toplevel_name pour les besoins de Translmod.transl_toplevel_item
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5545 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-05-12 09:09:16 +00:00
Pierre Weis 2116da4220 Getting rid of obsolete boolean operators & and or
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3359 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-12-28 13:07:42 +00:00
Xavier Leroy 7092eeb82b Ajout de Ident.rename
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3161 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-05-16 06:27:44 +00:00
Pierre Weis b34a32bdd8 Le module Ident passe a Format.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2955 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-13 16:49:01 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Pierre Weis 632e0ddfab Réécriture des messages d'erreur en printf. Suppression de code mort.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-12 16:30:27 +00:00
Xavier Leroy a048d42b10 Ajout du module Formatmsg pour rediriger les messages du systeme vers stdout ou stderr suivant le contexte
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2486 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-08 17:06:33 +00:00
Jérôme Vouillon 793eb64fe1 Bug de let module
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2166 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-11-11 16:58:05 +00:00
Damien Doligez 84e2a4bb07 ident.ml: suppression du dernier matching non exhaustif
printtyp.ml: changement du type de List.iter


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1749 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-10-31 13:02:30 +00:00
Jérôme Vouillon b405e0582f Suppression de Ident.identity.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-10 00:23:53 +00:00
Jérôme Vouillon 2a44439fcd Les identificateurs n'etaient pas identifies "dans le bon sens".
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-07 22:12:23 +00:00
Pierre Weis a6c6120f14 Changement des boi^tes de pretty-print
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-02-04 08:03:29 +00:00
Xavier Leroy 3b14330560 Ident: ajout de Ident.iter.
Autres: unification sous prefixe lors de l'inference de types, corrige
le bug de Russo:
let x = ref [];; module F(X) = struct type t let _ = (x:t list ref) ... end;;


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-07-15 16:35:35 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Jérôme Vouillon 7974a9d8b1 Extension objets.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-22 11:15:41 +00:00
Xavier Leroy 6ad9216c04 ident: identify rend aussi egaux les noms en plus des stamps
typecore: detection des formats errones en fin de chaine.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-10-05 12:29:40 +00:00
Xavier Leroy e4066357b1 Ajout des notices de copyright
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy 0c9e80f2c8 Nouvelle technique de construction du CRC pour les .cmi.
List.combine maintenant decurryfiee.
Introduction de Ident.unique_name.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@59 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-07-02 16:50:08 +00:00
Xavier Leroy e57ef00576 Remplacement de Cset par Set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@20 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-05-30 13:36:40 +00:00