diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-07-27 17:41:09 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-07-27 17:41:09 +0000 |
commit | 863984ea8ba4be4fc317680c3c457aa8f89c2c72 (patch) | |
tree | bf5238495f6f944178e294c623a68ceafee97df5 /byterun/hash.c | |
parent | b44ab158b2735be981330ff8a0d696051a246cc6 (diff) |
Ajout du tag Double_array_tag.
Deplacement de copy_double dans floats.c.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/hash.c')
-rw-r--r-- | byterun/hash.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/byterun/hash.c b/byterun/hash.c index 7585c1b94..b7a6f0a3d 100644 --- a/byterun/hash.c +++ b/byterun/hash.c @@ -30,7 +30,7 @@ static void hash_aux(obj) value obj; { unsigned char * p; - mlsize_t i; + mlsize_t i, j; tag_t tag; hash_univ_limit--; @@ -69,6 +69,21 @@ static void hash_aux(obj) #endif Combine_small(*p); break; + case Double_array_tag: + hash_univ_count--; + for (j = 0; j < Bosize_val(obj); j += sizeof(double)) { +#ifdef BIG_ENDIAN + for (p = &Byte_u(obj, j + sizeof(double) - 1), i = sizeof(double); + i > 0; + p--, i--) +#else + for (p = &Byte_u(obj, j), i = sizeof(double); + i > 0; + p++, i--) +#endif + Combine_small(*p); + } + break; case Abstract_tag: case Final_tag: /* We don't know anything about the contents of the block. |