| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge of branch 'hex-float'.
- Add support in byterun/floats.c for conversions between floats and strings in hex notation. We cannot rely on the C standard library here because Microsoft consistently fails at supporting hex notation as standardized in C99. Instead, the conversions are implemented from scratch.
- Add support in the lexer so that hex float literals are recognized in OCaml sources.
- Add support in formats. The ISO C99 format letters for hex floats are %a and %A, but %a is already taken. I chose %h and %H, which are rejected today as bad formats (hence no backward incompatibility) and don't mean anything in C either (h is a modifier, not a format letter).
- Add support in printf. All the trimmings are there in the implementation of %h and %H, including sign modifier and fixed precision.
- Benoit Vaugon contributed support in scanf.
Resolved conflicts:
boot/ocamlc
boot/ocamldep
boot/ocamllex
parsing/lexer.mll
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Primitives:
caml_float_of_string extended to recognize "0x" hexa notation
caml_hexstring_of_float new primitive
We do not assume hex floats are supported by the C standard library.
Instead, conversions hex string <-> float are implemented manually.
- Printf: hex FP output supported with formats %h / %H
- Scanf: remains to be updated (see TODO in stdlib/scanf.ml)
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/hex-float@16257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|\ \
| | |
| | |
| | | |
PR#6910 and GPR#224: extend marshaling to support data encodings beyond 4 Gb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- intern.c: watch out for left shift overflow
- extern.c: refactor caml_output_value_to_block
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16522 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16425 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16324 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
As suggested in the discussion of GPR#272:
- Do not go through fpclassify() (speedup: 2 to 3)
- Add 64-bit variant of the code (additional speedup: 10%-20%)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
containing the null character '\000'
Continuation of commit dc043a7:
- Protect Sys.command
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
containing the null character '\000'
Implementation notes:
- Based on c-cube's GPR#227 code, but many Unix functions were missing.
- For Unix.bind and Unix.connect to a PF_UNIX address, tolerate
file names whose first character is '\000': in Linux, these have
a meaning as "abstract socket addresses", and in other operating
systems, the resulting empty path name causes a EINVAL error
(tested under MacOS X).
- Very lightly tested.
- win32unix remains to be fixed.
|
| | |
| | |
| | |
| | | |
tools/check-typo
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- float
- int32
- int64
- nativeint
Not for int because the comparison is done directly on the untagged version.
Useful mainly for floats since they can be stored unboxed in records or arrays.
|
| | | |
|
| | |
| | |
| | |
| | | |
faster alternative to calling the libc.
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Switched the following functions:
- {Nativeint,Int32,Int64}.{of,to}_float
- Int{32,64}.float_of_bits
- Int{32,64}.bits_of_float
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
specialized at type 'float'.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16539 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
(Daniel Bünzli)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16485 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(Xavier Leroy)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16466 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
From: Frédéric Bour <frederic.bour@lakaban.net>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
From: Frédéric Bour <frederic.bour@lakaban.net>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16368 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This simplify the code, would have prevented GPR#205 and prepare ground
for upcoming improved backtrace generation.
From: Frédéric Bour <frederic.bour@lakaban.net>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
From: Frédéric Bour <frederic.bour@lakaban.net>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16366 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And share backtrace.c between asmrun and byterun.
From: Frédéric Bour <frederic.bour@lakaban.net>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
(Pierre Chambart)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(Pierre Chambart)
When allocating this kind of blocks to the minor heap, they are
added to 'caml_finalize_table' which is traversed on
'caml_empty_table' to check if any of such block is dead.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is currently a GC bug in the bytecode debug-info handling, due
to the fact that
void read_main_debug_info(struct debug_info *di)
is passed a internal pointer in the middle of a custom block inside
the OCaml heap. I could only observe the bug when such custom blocks
are allocated on the minor heap -- which does not happen with the
current implementation, but becomes possible after GPR#92 for example
(which let custom blocks with finalizer be allocated in the
minor heap).
This commit fixes this issue by moving debug_info chunks from the
OCaml heap to the C land, stored in a dynamic table. They are
allocated when caml_add_debug_info is called, and removed when
caml_remove_debug_info is called.
(Another approach would be to keep the debug_info inside the OCaml
heap, but make sure that there are no dangling internal pointers. See
GPR#228 for an attack of this by Mark Shinwell.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16356 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16352 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | | |
(Simon Cruanes)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
globroots.c:98:21: warning: Dereference of undefined pointer value
e->forward[i] = update[i]->forward[i];
^~~~~~~~~~~~~~~~~~~~~
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16336 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16335 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
byterun/backtrace.c:142:12: warning: Call to 'malloc' has an allocation size of 0 bytes
events = malloc(*num_events * sizeof(struct ev_info));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
startup_aux.c
This is a follow-up to commit r16245, PR#6902, GPR#210.
- Runtime warning machinery was local to io.c; make it globally usable.
- Move definitions and accessor functions to misc.c and gc_ctrl.c
by analogy with other configurable runtime parameters.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16325 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| |
| |
| | |
This is ugly. C pragmas are ugly. At least we're ugly and consistent now.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16315 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| |
| |
| | |
(Bernhard Schommer)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| |
| |
| | |
(Bernhard Schommer)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16312 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| |
| |
| | |
(Christopher McAlpine)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|