Commit Graph

7865 Commits (12d6154526644fa241cfe30994b049b1e187b861)

Author SHA1 Message Date
Alain Frisch 12d6154526 Remove some useless declarations of recursive functions (now captured with warning 26).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11975 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 17:35:15 +00:00
Alain Frisch 957db9c0f5 Forget warning 33 in -warn-help.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11970 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:22:38 +00:00
Alain Frisch 350f214671 More clever algorithm to detect unused (recursive) type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:20:53 +00:00
Alain Frisch 8fed6ffdfc Fix detection of unused let-bound variables in classes.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 10:20:21 +00:00
Alain Frisch 36c49108db Detect unused 'ancestor' identifier.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11962 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:50:40 +00:00
Alain Frisch d3e3438903 Reduce overhead for warning on unused opens when the warning is disabled.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11961 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-27 09:17:49 +00:00
Alain Frisch e84536543a The implicit type created by class and class types definitions is marked as used when the class or class type are referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11941 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 16:04:25 +00:00
Alain Frisch 85a99d7bd4 Detected unused type declarations. A type declaration can be used (1) through an explicit reference, (2) during signature comparison, or (3) because one of the labels or fields it defines are referenced.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11940 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 15:42:40 +00:00
Alain Frisch 86d04b3c90 Detect unused open (#5357, #5438).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11937 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-22 11:04:20 +00:00
Alain Frisch 5686436fc6 Undoing previous commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11929 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:52:10 +00:00
Alain Frisch 1061c39aac Check for unused value declaration in interface files.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11928 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:35:36 +00:00
Alain Frisch debacec776 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:28:04 +00:00
Alain Frisch f8a7879fb0 New warning 31 to detect a lot more unused value declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11924 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 15:40:54 +00:00
Alain Frisch 9d17272024 Create a branch to experiment with better warnings on unused declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11911 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 09:39:30 +00:00
Alain Frisch d79455bc76 New syntax for 'custom let bindings': let.simple_expr pat = expr in expr
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11906 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 08:58:56 +00:00
Jérémie Dimino 8c16e88983 PR#5374: be consistent for locations of type declarations between Camlp4 and the OCaml parser
Camlp4 used only the location of the rhs of type declarations, while
OCaml used the location of the whole type declaration. The location of
abstract types was then wrong when using Camlp4.

Thanks to furuse for his contribution.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11903 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 17:40:23 +00:00
Jérémie Dimino dfcbd7fc56 Avoid creating malformed location in Camlp4 when no token is consumed
When no token was consumed, Camlp4 created a location with start-pos > stop-pos.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11902 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 17:40:18 +00:00
Xavier Leroy a69f9be8c5 PR#4746: wrong detection of stack overflows in native code under Linux
(quick fix, will have to find something better)
testsuite/tests/runtime-errors: make the test output independent of
  the stack size; add a "ulimit -s" just to make sure stack is limited.
testsuite/tests/asmcomp: updated to compile again.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11898 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 14:38:53 +00:00
Xavier Leroy d0667f4e52 Cosmetic: old-style K&R function -> new style prototyped function
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11896 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 12:37:52 +00:00
Alain Frisch cf9c1a623c Fix pretty-printing of let-like operators.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11895 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 11:27:06 +00:00
Alain Frisch 16c26c6de3 let-like operators.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11894 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 11:22:32 +00:00
Xavier Leroy a40d0432b2 PR#4880: added appropriate event to "assert" so that it shows up properly in stack backtraces
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11891 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 10:42:36 +00:00
Alain Frisch c1f154ea70 New option to force the compilers to show absolute paths in error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11890 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 10:35:43 +00:00
Alain Frisch e915c394e7 Fix ocamlnet.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11889 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 10:35:11 +00:00
Xavier Leroy b51df176a8 PR#5416: better implementation of set/clear_close_on_exec
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11888 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 08:59:09 +00:00
Xavier Leroy ca0c236919 PR#4869: rare collisions between assembly labels for code and data
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11887 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-18 10:00:56 +00:00
Xavier Leroy 4af724cf54 Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS.
Part 4: cleaning up some more references & specific code for these archs.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-18 09:52:52 +00:00
Xavier Leroy 5c432bf22c Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS,
part 3: config/Makefile-templ (for reference, because this file is unused)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11884 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-17 12:44:23 +00:00
Xavier Leroy 366da2c721 Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS,
part 2: configure.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11883 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-17 11:21:24 +00:00
Xavier Leroy 3e42214295 Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS.
So long and thanks for all the fish.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11882 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-17 11:12:50 +00:00
Xavier Leroy 9178181eae The "DBM" library (interface with Unix DBM key-value stores) is no
longer part of this distribution.  It now lives its own life at
https://forge.ocamlcore.org/projects/camldbm/.  Bye bye, DBM.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11881 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-17 10:45:23 +00:00
Jérémie Dimino 4db01f01b6 #5358: update the Camlp4 ast translator to support constraints on types in sub-modules in package types.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11322 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-16 21:33:15 +00:00
Jérémie Dimino ac3d343a25 Fix printing of GADTs by Camlp4 with original syntax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-16 20:33:18 +00:00
Jérémie Dimino b50f1df8ff #5358: update Camlp4 to support constraints on types in sub-modules in package types.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11320 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-16 18:00:40 +00:00
Xavier Leroy e10723e701 Merged proc_nt.ml into proc.ml in directories asmcomp/i386 and asmcomp/amd64.
This avoids much code duplication and is a baby step towards Mingw-64 bits 
support (PR#5179).  (There will be no need to create a third proc_xxx.ml
file for this configuration.)
Also, in amd64/emit_nt.mlp, the ml64 assembler didn't like my label subtractions, so I put the jumptable in code area instead of in data area.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-16 17:02:48 +00:00
Jacques Garrigue 7ff9d50434 trim module signatures
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-15 10:20:50 +00:00
Jacques Garrigue 6cc516aec6 A patch adding primitives to browse types in the toplevel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11317 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-15 07:58:02 +00:00
Jacques Garrigue 5b08f5b131 Fix PR#5425 and PR#5427
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11316 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-15 02:25:01 +00:00
Alain Frisch 032648c3d4 #5411: close input channel when loading a .cmo file fails in the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11315 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-14 11:04:06 +00:00
Alain Frisch 0b002c286a Update Changes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-14 10:40:58 +00:00
Alain Frisch ece3353035 #5358: package types allow constraints on typed in sub-modules. Camlp4 compiles but does not support this new feature yet.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11311 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-14 10:26:15 +00:00
Jacques Garrigue 01dceea3cc remove conflict
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-14 08:59:07 +00:00
Alain Frisch e461027b89 Boostrap ocamlbuild (#5338).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-14 08:24:03 +00:00
Alain Frisch fcf6dcf3cb Doc.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 17:59:10 +00:00
Alain Frisch 3f23ef49c4 #5411: New #load_rec primitive for the toplevel (finds and loads .cmo files recursively).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11306 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 17:50:08 +00:00
Alain Frisch 14b778db90 #5420: fix.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11305 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 16:21:10 +00:00
Alain Frisch 84dd8601e0 #5420: adding a O_SHARE_DELETE flag to Unix.openfile, for enabling FILE_SHARE_DELETE mode under Windows (ignored under Unix).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 16:18:13 +00:00
Xavier Leroy d187828b8c PR#5306: comparing values of type Thread.t
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11303 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 15:21:14 +00:00
Alain Frisch ee31501232 #5338: sanitize.sh has windows style end-of-lines (mingw).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11301 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-13 11:19:35 +00:00
Alain Frisch 5f8ff42f10 #5179: the 'official' 32-bit mingw compiler is now the one from the mingw-w64 project, packaged in Cygwin (as supported by flexdll 0.27).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11300 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-12 11:38:06 +00:00