Start tidying up the runtime:
- document most of the "size" and "length" parameters and global variables,
  specifying bytes or words. Change some of them from bytes to words.
- start getting rid of "char *" and use sensible types instead.
- other small changes


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15647 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
apply GPR123: fix stupid bug in opttoploop

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15649 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
simplify the spellcheck functions

- expose the core spellchecking functionality in Misc rather than Typetexp
- remove the too high-order (yet insufficiently parametric)
  Typetexp.spellcheck from the public interface
- rewrite the spellchecking functions for variants and fields in
  Typecore from the Misc functions rather than reusing
  Typetexp.spellcheck

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
'Did you mean' for variables missing on one side of an or-pattern

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
simplify spellchecking of labels in typecore.ml:

By computing the list of valid names at Wrong_name raising point, we
can remove the logic to reconstruct the set of valid names to draw
suggestion from after the fact:
- no spellchecking-related code in the NameChoice functor
- seamlessly extends to fields of inline records (were not spellchecked before)

I made the type of the "wrong name" in the Wrong_name exception more
precise, from Longident.t to string. The rationale is that:
- we only raise this exception when the longident happens to be
  a (Lident str)
- the list of valid names is a list of field or variant names; those
  are strings rather than idents

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15652 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
typecore.ml: minor refactoring

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
'Did you mean' for unbound method names

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15654 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
'Did you mean' for instance variables

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
rewrite the printing of Lazy values in toplevel/genprintval.ml

The code previously used Lazy.is_val to know whether the value was
already-evaluated (and, in this case, Lazy.force to extract this value
and print it more precisely). But it lies inside a functor that is
instantiated over different implementations of Obj, while
Lazy.{is_val,force} force the use of the Obj module of the standard
library. This could cause segfaults when this code is called from the
debugger, which instantiates it with a different Obj module talking
over a socket.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15656 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
rewrite cycle-detection in genprintval.ml to use O instead of Obj

(see previous commit)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
ocamldebug: fix printing of variables of lazy type

"print a" in ocamldebug when a is a forced lazy value segfaults on all
OCaml versions I tested it on. This comes from the fact that the
debugcomm.ml re-implementation of the Obj module (talking over the
debugging socket) implements Obj.tag without special-casing integers
(that is, testing is_block first), and always assumes its input is
a block.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15658 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
PR6695: Add ASCII counterparts to case-mapping functions.

This updates Char, String, Bytes in the stdlib.

For now, they are hidden from documentation and are only for
internal compiler use.
PR6695: Make sure the compiler only uses ASCII string functions.

This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.