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.
* More robust implementation of Misc.no_overflow_mul
The old one fails on [a = min_int, b = -1] and [b = 0]. The new one is taken from Hacker's Delight.
* Changes: add entry
* testsuite: add tests for Misc.no_overflow_{add,sub,mul}
The terminfo C library was used for displaying error messages from the
toplevel. Instead, just use ANSI escape sequences to display, and a
ioctl() to get the number of lines of the terminal.
- Remove byterun/terminfo.c
- Add primitive to query number of lines to io.c
with OS-dependent code in unix.c (ioctl-based implementation)
and win32.c (no implementation yet)
- Add a Terminfo.num_lines function and simplify interface to Terminfo.setup
- Query num_lines every time an error message needs to be highlighted,
so as to react to windows resizing.
- Bootstrap to enable removal of old primitives.
-(un)safe-string becomes -(no-)force-safe-string
-(un)safe-string-default becomes -default-unsafe-string
Config.safe_string (and Clflags.unsafe_string) keep their name for
backward-compatibility, as well as the C define CAML_SAFE_STRING
(which corresponds to -force-safe-string).
ocamlc complained that the temporary files it just created existed.
since ed60dece81575305b5f1f7394cdda652b65b037a and
19d3bccf48fee6e5e91e65e9f8a5d07c49d2afd4
* MPR#7472: create .cmi files atomically
This is done by writing the data to a temporary file, compute the checksum, finish writing the data, and only then rename the temporary file to the destination .cmi file.
Writing .cmi files this way should avoid the corruption of .cmi files reported in MPR#4991. This corruption can occur when a .cmi file is produced simultaneously by a run of ocamlc and a run of ocamlopt.
"Atomic" here means "as atomic as the underlying file system guarantees". The atomicity guarantees of Windows file systems aren't entirely clear.
* Create .annot and .cmt files atomically, like .cmi files
Follow-up to MPR#7472. The pattern "write to temporary file then rename"
is abstracted in the new function Misc.output_to_file_via_temporary
and applied to .cmi, .cmt and .annot files.
The install-flexdll target now puts the object files for FlexDLL in a
subdirectory flexdll of the Standard Library instead of in the Standard
Library itself.
A configuration tweak means that -I +flexdll is effectively added to all
compiler invocations and also a pseudo-option -L+flexdll to ocamlmklib
calls to Config.mkdll which fixes PR#7373.
Deprecation warning (3) is currently only reported when directly
accessing a component marked with the deprecated attribute; but it is
missed when we coerce the signature contaning the deprecated component
to a signature without the attribute.
This commit adds the required machinery to detect such cases
and report the same warning. (An alternative design could be
to introduce a new warning for that purpose.)
Some of the new machinery could be used for other purposes:
- During the inclusion check, keep the location that would used in
the error message if the check fails.
- Warnings can now hold extra "sub-locations" (and associated
messages).