summaryrefslogtreecommitdiff
path: root/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the use of custom .() and .[]octachron2016-04-012-0/+31
| | | | | | | | | | | | | This commit modifies the parser to use the newly defined .() and .[] operators. It also moves the definition of the standard .() and .[] operator for String/Bytes and Array to the pervasives module. Before this commit, expressions of the form array.(index) and string.(index) where desugared to Array.get[_unsafe] array index and Strinf.get[_unsafe] string index. The unsafe or unsafe version were chosen depending on the presence of the "-unsafe" compiler option. Such expression are now desugared to ( .() ) array index and ( .[] ) string index respectively. The same desugar operation is applied to array.(index) <- value which becomes ( .()<- ) array index value. In order to keep the standard semantic for the string and array index operations, these new index operators are defined in the pervasives module using new compiler primitives, e.g. let .() = "%array_opt_get". These new primitives are then mapped to safe or unsafe version depending on the the "-unsafe" compiler option. Consequently, these modifications should have no impact on existing code. With these modifications, defining custom .() and .[] operators should be easier, at the cost of losing access to the standard index operator for either array or string.
* Also enable more warnings in stdlib/ and fix them.Alain Frisch2016-03-1531-98/+166
|
* Merge remote-tracking branch 'origin/4.03' into trunkFrançois Bobot2016-03-111-5/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | travis.yml is kept from trunk Conflicts: .depend Changes Makefile VERSION boot/ocamlc boot/ocamldep boot/ocamllex parsing/parser.mly parsing/pprintast.ml stdlib/hashtbl.ml testsuite/tests/unwind/Makefile tools/check-typo
| * Bug fix: Hashtbl.filter_map_inplace did not correctly update the size field.Alain Frisch2016-03-101-1/+1
| |
| * Fix PR7157 (too many minor collections)Mark Shinwell2016-03-031-2/+5
| |
| * update .depend and bootstrap compilers before releaseDamien Doligez2016-02-291-5/+9
| |
| * tweak tools/check-typo and break more overlong linesDamien Doligez2016-02-192-2/+3
| |
* | Adapt filter_map_inplace.alainfrisch2016-03-111-11/+29
| |
* | Keep track of whether a traversal is ongoing and in this case, disables the ↵alainfrisch2016-03-111-19/+52
| | | | | | | | inplace implementation of resizing.
* | Optimize Hashtbl by using in-place updates of bucket list cells.alainfrisch2016-03-111-83/+123
| |
* | Switch to inline records to represent bucket lists in Hashtbl.alainfrisch2016-03-111-32/+32
| |
* | Bug fix: Hashtbl.filter_map_inplace did not correctly update the size field.Alain Frisch2016-03-101-1/+1
| |
* | GPR#324: Make boot/ocamlc read directly byterun/primitives (patch by ↵alainfrisch2016-03-101-2/+3
| | | | | | | | Francois Bobot).
* | Fix PR7157 (too many minor collections)Mark Shinwell2016-03-031-2/+5
| |
* | tweak tools/check-typo and break more overlong linesDamien Doligez2016-02-192-2/+3
|/
* Update headers for the new license.Damien Doligez2016-02-18108-1302/+1518
| | | | Remains to be done: remove all headers in testsuite/tests.
* clean up whitespace and cut long linesDamien Doligez2016-02-174-5/+10
|
* Build stdlib, etc. with -O3 in Flambda modeMark Shinwell2016-02-111-2/+7
|
* slightly improved wording in array.mlichrismamo12016-02-101-1/+1
|
* organized the documentation in array.mli so that it now more closely ↵chrismamo12016-02-101-27/+40
| | | | resembles the documentation for List
* fixed exception handling in array.ml to conform to conventionschrismamo12016-02-101-2/+2
|
* corrected a typo in the interface for Array.iter2chrismamo12016-02-101-1/+1
|
* corrected a typo where I accidentally defined 'Array.iter2' with the name ↵chrismamo12016-02-101-1/+1
| | | | 'Array.iter'
* added an Array.iter2 function to the standard library in order to bring the ↵chrismamo12016-02-102-1/+11
| | | | Array library up to speed with the List library
* added an Array.map2 function to the standard library in order to bring the ↵chrismamo12016-02-102-0/+19
| | | | Array library up to speed with the List library
* Protect install paths against spaces (on Windows)Christophe Troestler2016-02-103-16/+16
|
* doc: fix typo in 5ec086870f9ce002dab4315e140e3f63f1f6a4bfDamien Doligez2016-02-051-1/+1
|
* Typos - ephemeronsFourchaux2016-02-052-23/+23
|
* better wording of documentation for Scanf.unescapedDamien Doligez2016-02-031-3/+3
|
* remove ocamlbuild-specific filesGabriel Scherer2016-02-011-49/+0
|
* modify documentation of Stack.foldSimon Cruanes2016-01-291-3/+3
|
* add `Stack.fold` (issue 0003622)Simon Cruanes2016-01-292-0/+8
|
* [Ephemeron] Advise to use {!filter_map_inplace}François Bobot2016-01-251-0/+7
| | | | Add another example of use.
* Add a test specifically for weak tableFrançois Bobot2016-01-251-0/+7
| | | | | | | And fix a bug in the handling of ephemeron during minor collection found thanks to this test. Oldifying of ephemerons' data was not iterated enough because `oldify_todo_list` doesn't become non-null each time `caml_oldify_one` is run.
* [Ephemeron] Don't advertise `Obj.Ephemeron`François Bobot2016-01-251-5/+4
|
* Precise documentation for ephemeronsFrançois Bobot2016-01-251-19/+30
| | | | (Thanks Romait Troit alias William)
* Fix creation of Ephemeron.K2François Bobot2016-01-251-1/+1
| | | | | And use the tests for the classic hashtables for testing the (non-weak) behavior of weak hashtables.
* Fix mantis 5349, semantic of `replace`François Bobot2016-01-252-22/+28
| | | | | The closed bug report is about classic hashtable but it is also applicable for weak hashtable (thanks @signoles for the heads up)
* Add precisions on the equality for Weak.MakeFrançois Bobot2016-01-251-1/+4
| | | | It can't be physical equality since it use `Weak.get_copy`.
* Fix bad cleaning of ephemeronsFrançois Bobot2016-01-252-30/+69
| | | | size not exact and infinite resizing
* [Stdlib] Rename Obj.Ephemeron.eph in .tFrançois Bobot2016-01-253-32/+37
| | | | An ugly obj_t is needed for the shadowing of Obj.t
* [Stdlib] Rephrase hash table by hash set in WeakFrançois Bobot2016-01-251-7/+7
|
* [Stdlib] Ephemeron: add the module in the stdlibFrançois Bobot2016-01-257-1/+950
|
* [Stdlib] Hashtbl: add a getter for randomizeFrançois Bobot2016-01-232-0/+6
|
* [GC] add full-featured ephemerons in an inefficient wayFrançois Bobot2016-01-231-1/+1
| | | | | | | | | - use the generic abstract tag like weak pointers - a weak pointer is implemented using an ephemeron (one additionnal word) - add for every full GC a complexity of O((n+m)*(m+1)) with m the number of pure ephemerons, n the number of ephemerons used as weak pointers - multiple keys, modifiable keys
* GPR#337: Hashtbl.filter_map_inplace.alainfrisch2016-01-223-2/+44
|
* Improve comment in Obj about set_field-like operationsMark Shinwell2016-01-151-1/+1
|
* Improve comment in Obj about set_field-like operationsMark Shinwell2016-01-151-2/+14
|
* newlineMark Shinwell2016-01-141-0/+1
|
* commentMark Shinwell2016-01-141-1/+1
|