ref: 20f83a55fa8c814b5584fcfe03ed01feb0b1ba8b
parent: 0835b541d77cd3e5e1b101239d9b4d85219aeb27
parent: 9178a59adace081f3d576cb659c28c40264737f7
author: Lennart Augustsson <lennart@augustsson.net>
date: Sat Aug 31 17:43:02 EDT 2024
Merge branch 'master' into bytestring
--- a/ghc/System/IO/Serialize.hs
+++ b/ghc/System/IO/Serialize.hs
@@ -5,6 +5,7 @@
hSerialize, hDeserialize,
writeSerialized,
-}
+ writeSerialized,
writeSerializedCompressed,
readSerialized,
) where
@@ -22,6 +23,10 @@
writeSerializedCompressed :: forall a . HasCallStack => FilePath -> a -> IO ()
writeSerializedCompressed = errghc
+
+writeSerialized :: forall a . HasCallStack => FilePath -> a -> IO ()
+writeSerialized = errghc
+
readSerialized :: forall a . HasCallStack => FilePath -> IO a
readSerialized = errghc
--- a/src/runtime/eval.c
+++ b/src/runtime/eval.c
@@ -1892,7 +1892,7 @@
if (n < cells || n >= cells + heap_size) abort();
//PRINT("find_sharing %p %llu ", n, LABEL(n));tag_t tag = GETTAG(n);
- if (tag == T_AP || tag == T_ARR) {+ if (tag == T_AP || tag == T_ARR || tag == T_BSTR) { if (test_bit(pb->shared_bits, n)) {/* Alread marked as shared */
//PRINT("shared\n");@@ -1906,18 +1906,22 @@
/* Mark as visited, and recurse */
//PRINT("unmarked\n");set_bit(pb->marked_bits, n);
- if (tag == T_AP) {+ switch(tag) {+ case T_AP:
find_sharing(pb, FUN(n));
n = ARG(n);
goto top;
- } else {+ case T_ARR:
for(size_t i = 0; i < ARR(n)->size; i++) {find_sharing(pb, ARR(n)->array[i]);
}
+ break;
+ default:
+ break;
}
}
} else {- /* Not an application, so do nothing */
+ /* Not an sharable node, so do nothing */
//PRINT("not T_AP\n");;
}
--
⑨