ocaml/stdlib
Gabriel Scherer bc139ae14e PR#5644: Stream.count broken when used with Sapp or Slazy nodes
There is a bug in the way concatenating operations work when combined
with `Sgen`-defined stream (Stream.from, Stream.of_string): the
concatenation functions reset the `count` field to 0, which disturbs
the Sgen producer.

While the fix in the Scons case is easy (instead of 0, set
the count to `original_count - 1`), fixing the Sapp case is more
delicate (we can't predict the size of the prepended stream). Our
technique is to change the stored left-hand-side to not the stream
data only, but the whole stream, count included.
Once we detect the prepended stream was completely consumed, we can
then restore the count to its previous value, so that Sgen's function
can be provided correct count information. This required a change in
the internal `get_data` implementation.

Slazy-constructed streams have the exact same issue: we don't know
their count before forcin them. Again, `get_data` is changed to
dynamically update the count at forcing time.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12682 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-10 09:58:38 +00:00
..
.depend - Hashtbl: 2012-04-19 13:17:40 +00:00
.ignore uniform .ignore system 2011-07-20 15:37:36 +00:00
Compflags Module Buffer, printf, Format and Scanf are compiled with -w A. 2011-10-25 12:09:01 +00:00
Makefile renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
Makefile.nt renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
Makefile.shared Enabled 'unused rec flag' warning. 2012-05-29 12:33:51 +00:00
StdlibModules renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
arg.ml Eliminate useless rec. 2012-05-29 12:52:44 +00:00
arg.mli Fix #5437: when registering an option with Arg, if the option has an empty doc string, do not include it when printing the usage. 2011-12-22 14:04:18 +00:00
array.ml Detect (and fix some) useless recursive flags. 2012-05-29 12:31:28 +00:00
array.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
arrayLabels.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
arrayLabels.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
buffer.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
buffer.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
callback.ml continuing to change the name to OCaml 2011-12-21 15:37:54 +00:00
callback.mli typo in doc 2012-02-10 14:45:41 +00:00
camlinternalLazy.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
camlinternalLazy.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
camlinternalMod.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
camlinternalMod.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
camlinternalOO.ml Enable and fix more warnings. 2012-05-29 11:47:28 +00:00
camlinternalOO.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
char.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
char.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
complex.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
complex.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
digest.ml PR#1835: add function Digest.from_hex 2012-01-26 22:56:48 +00:00
digest.mli bumped version to 4.00.0 (per Xavier's decision) 2012-03-08 22:27:57 +00:00
filename.ml Enable and fix more warnings. 2012-05-29 11:47:28 +00:00
filename.mli #5397: Filename.temp_dir_name should be mutable. 2012-03-26 17:17:35 +00:00
format.ml Additional documentation for format strings. 2012-04-27 09:56:05 +00:00
format.mli Documentation for set/get_formatter_out_functions. 2012-04-27 12:13:29 +00:00
gc.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
gc.mli Typo. 2012-04-11 03:50:39 +00:00
genlex.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
genlex.mli merge version 3.12 from 3.12.1 to r12205 2012-03-08 19:52:03 +00:00
hashtbl.ml fix two bugs in commit 12453 2012-05-24 15:12:37 +00:00
hashtbl.mli Fix PR#5555 2012-05-15 08:36:25 +00:00
header.c renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
headernt.c renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
int32.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
int32.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
int64.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
int64.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
lazy.ml merge version 3.12 from 3.12.1 to r12205 2012-03-08 19:52:03 +00:00
lazy.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
lexing.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
lexing.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
list.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
list.mli bumped version to 4.00.0 (per Xavier's decision) 2012-03-08 22:27:57 +00:00
listLabels.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
listLabels.mli bumped version to 4.00.0 (per Xavier's decision) 2012-03-08 22:27:57 +00:00
map.ml Ensure that {Set,Map}.{filter,partition} call their functional argument 2012-05-30 11:28:28 +00:00
map.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
marshal.ml merge version 3.12 from 3.12.1 to r12205 2012-03-08 19:52:03 +00:00
marshal.mli continuing to change the name to OCaml 2011-12-21 15:37:54 +00:00
moreLabels.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
moreLabels.mli Fix PR#5555 2012-05-15 08:36:25 +00:00
nativeint.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
nativeint.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
obj.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
obj.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
oo.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
oo.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
parsing.ml Enable and fix more warnings. 2012-05-29 11:47:28 +00:00
parsing.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
pervasives.ml extra def. of ~+; cut long lines 2012-01-12 15:46:51 +00:00
pervasives.mli documentation: I/O functions can raise Sys_error 2012-05-02 14:40:23 +00:00
printexc.ml Document that a dummy declaration is here to avoid a warning. 2012-05-29 12:37:01 +00:00
printexc.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
printf.ml Introducing ikfprintf. 2012-04-11 18:01:02 +00:00
printf.mli Doc: better phrasing for %,. Introducing ikfprintf. 2012-04-11 18:00:32 +00:00
queue.ml Fix PR#5309: Queue.add is not thread/signal safe 2012-02-18 09:36:13 +00:00
queue.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
random.ml PR#5575: Random states are not marshallable across architectures 2012-04-10 15:33:21 +00:00
random.mli PR#5585: typo explicitely -> explicitly 2012-04-13 12:44:29 +00:00
scanf.ml Detect (and fix some) useless recursive flags. 2012-05-29 12:31:28 +00:00
scanf.mli Additional documentation for format strings. 2012-04-27 09:56:05 +00:00
set.ml Ensure that {Set,Map}.{filter,partition} call their functional argument 2012-05-30 11:28:28 +00:00
set.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
sharpbang #!space, pas #! 1998-04-27 15:14:31 +00:00
sort.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
sort.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
stack.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
stack.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
stdLabels.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
stdLabels.mli merge version 3.12 from 3.12.1 to r12205 2012-03-08 19:52:03 +00:00
std_exit.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
stdlib.mllib merge changes from release/3.11.1 to release/3.11.2 2010-01-20 16:26:46 +00:00
stream.ml PR#5644: Stream.count broken when used with Sapp or Slazy nodes 2012-07-10 09:58:38 +00:00
stream.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
string.ml merge version 3.12 from 3.12.1 to r12205 2012-03-08 19:52:03 +00:00
string.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
stringLabels.ml renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00
stringLabels.mli uniformization of the warnings at the head of the hidden sections of the .mli 2012-03-14 16:03:15 +00:00
sys.mli bumped version to 4.00.0 (per Xavier's decision) 2012-03-08 22:27:57 +00:00
sys.mlp merge version 3.12 from 3.12.1 to r12205 2012-03-08 19:52:03 +00:00
weak.ml Enable and fix more warnings. 2012-05-29 11:47:28 +00:00
weak.mli renaming of Objective Caml to OCaml and cleanup of copyright headers 2011-07-27 14:17:02 +00:00