summaryrefslogtreecommitdiff
path: root/byterun/ints.c
Commit message (Collapse)AuthorAgeFilesLines
* String_val: return 'const char *' when -safe-string is globally enabled (#1274)yallop2017-08-031-6/+6
|
* Move INT64_LITERAL from byterun/ints.c to m.hDavid Allsopp2017-05-161-7/+0
|
* Install all include files, and access internals with CAML_INTERNALSFabrice Le Fessant2016-07-121-0/+2
|
* Fix compilation using Visual Studio .NET 2002David Allsopp2016-03-101-8/+15
| | | | | Microsoft introduced the `LL` suffix for integer literals in Visual Studio .NET 2003 - earlier versions use `i64`
* Update headers for the new license.Damien Doligez2016-02-181-12/+14
| | | | Remains to be done: remove all headers in testsuite/tests.
* Make specialized compare unboxedFrançois Bobot2015-11-051-11/+19
| | | | | | | | | | - 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.
* Switch a few externals to [@@unboxed]Jeremie Dimino2015-11-031-12/+50
| | | | | | | Switched the following functions: - {Nativeint,Int32,Int64}.{of,to}_float - Int{32,64}.float_of_bits - Int{32,64}.bits_of_float
* whitespace cleanup, cut long lines, add some missing headersDamien Doligez2015-09-111-1/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6649, GPR#222: accept (int_of_string "+3")Gabriel Scherer2015-08-021-1/+2
| | | | | | (Christopher McAlpine) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6316: Scanf.scanf failure on %u formats when reading big integers.Xavier Leroy2015-07-241-10/+13
| | | | | | | | | | The approach implemented is the second one suggested by Benoît Vaugon in the PR: - The int_of_string functions accept a "0u" prefix meaning "decimal unsigned". - The '%u' format of the scanf functions adds this "0u" prefix before conversion. This is consistent with the current handling of unsigned hexa, octal, and binary numbers. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16241 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header ↵Gabriel Scherer2014-12-271-7/+7
| | | | | | | | | name clashes (Jérôme Vouillon and Adrien Nader and Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6560: Wrong failure message for {Int32,Int64,NativeInt}.of_stringGabriel Scherer2014-12-141-17/+22
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15672 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Start tidying up the runtime:Damien Doligez2014-12-121-10/+10
| | | | | | | | | | - 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
* PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrownXavier Leroy2014-08-271-56/+56
| | | | | | | types {,u}int{32,64}. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev ↵Damien Doligez2014-08-221-1/+1
| | | | | | 15121) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6075: avoid using unsafe C library functions (strcpy, strcat, sprintf).Xavier Leroy2014-04-151-151/+67
| | | | | | | | | | An ISO C99-compliant C compiler and standard library is now assumed. (Plus special exceptions for MSVC.) In particular, emulation code for 64-bit integer arithmetic was removed, the C compiler must support a 64-bit integer type. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14607 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Under BSD, swap32 is a macro defined in some system header, so don't useDamien Doligez2013-04-181-9/+9
| | | | | | | it as a function name. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13563 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* fix a few problems with whitespace and over-long linesDamien Doligez2013-03-091-1/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* #5744: remove other primitives.Alain Frisch2012-12-171-3/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13136 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* #5774: caml_int64_direct_bswap should not be a primitive.Alain Frisch2012-12-171-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13134 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5774: Add bswap primitives for amd64Fabrice Le Fessant2012-11-291-0/+65
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13106 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* remove all $Id keywordsDamien Doligez2012-10-151-2/+0
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* More renaming to OCamlDamien Doligez2012-02-101-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* renaming of Objective Caml to OCaml and cleanup of copyright headersDamien Doligez2011-07-271-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5290: added hash functions for channels, nats, mutexes, conditions.Xavier Leroy2011-07-231-3/+6
| | | | | | | | | Also: added "custom_compare_ext_default" to all struct custom_operations: default initialization to 0 did what we want, but explicit initialization better documents the C sources. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11143 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes from 3.12.0 to 3.12.1Damien Doligez2011-07-201-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Better hashing!Xavier Leroy2011-05-291-2/+13
| | | | | | | | | | | - New generic hash function based on Murmur 3, with better statistical properties (PR#5225), and better speed - Make sure equal floats hash equally (PR#5222) - Breadth-first traversal instead of depth-first - Added seeded hash functions and seeded functorial interface to Hashtbl. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11056 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* clean up spaces and tabsDamien Doligez2010-01-221-2/+2
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#4210, PR#4245: tightened bound checking in string->integer conversion ↵Xavier Leroy2009-07-151-5/+12
| | | | | | functions, without changing what the lexer accepts git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9317 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes from ocaml3110 to ocaml3111rc0Damien Doligez2009-05-201-8/+37
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes 3.10.0 -> 3.10.1Damien Doligez2008-01-111-2/+8
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* More fixes for IL32LLP64 modelXavier Leroy2006-05-051-4/+5
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7399 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Nettoyages pour modele IL32LLP64Xavier Leroy2006-05-041-2/+2
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Remplacement long/unsigned long par intnat/uintnatXavier Leroy2005-09-221-48/+50
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7064 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* depollution suite (et fin?) (PR#1914 et PR#1956)Damien Doligez2004-01-021-5/+5
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6047 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* depollution suite (PR#1914 et PR#1956)Damien Doligez2004-01-011-173/+175
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* depollution suite (PR#1914, PR#1956)Damien Doligez2003-12-311-5/+5
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6044 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* depollution suite (PR#1914 et PR#1956); byterun/weak.c: PR#1929 suiteDamien Doligez2003-12-291-4/+4
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6041 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Introduction de Int32.float_of_bits et Int32.bits_of_float. Remplacement de ↵Xavier Leroy2003-12-201-0/+14
| | | | | | float_of_bytes par Int64.float_of_bits. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* depollution (PR#1914, PR#1956)Damien Doligez2003-12-161-3/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6023 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Verification de debordements dans les conversions string -> intXavier Leroy2003-11-211-6/+29
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5957 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* int_of_string: proteger contre les caracteres nulsXavier Leroy2003-06-231-7/+8
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5611 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Optimisation de Pervasives.compare par strength reductionXavier Leroy2003-04-011-8/+37
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* printf, formats non signes, argument de type Caml int: utiliser ↵Xavier Leroy2003-03-311-7/+21
| | | | | | Unsigned_long_val au lieu de Long_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5467 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Probleme d'alignement dans int64_to_float (PR#1428)Xavier Leroy2003-03-201-1/+4
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* int_of_string doit implementer les conventions lexicales du langage sinon le ↵Damien Doligez2002-10-111-1/+1
| | | | | | compilo fait Fatal Error git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5176 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Unused match case 'B' in orpat.Pierre Weis2002-10-071-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5161 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Software emulation of 64-bit integers if needed. Use safe division for ↵Xavier Leroy2002-05-251-115/+78
| | | | | | int32 and nativeint if necessary git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4832 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Ajout operations sur gros fichiersXavier Leroy2002-03-021-5/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* _ dans les litteraux d'entiers et de flottantsXavier Leroy2002-02-041-6/+9
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4350 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02