[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc 8557cbe9ef3 1/2: Avoid using XHASH if HAVE_MPS
From: |
Gerd Moellmann |
Subject: |
scratch/igc 8557cbe9ef3 1/2: Avoid using XHASH if HAVE_MPS |
Date: |
Tue, 24 Dec 2024 03:47:30 -0500 (EST) |
branch: scratch/igc
commit 8557cbe9ef38a202d19f190e5bce70278838c1c0
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Avoid using XHASH if HAVE_MPS
* src/profiler.c (trace_hash): Use igc_hash instead of XHASH for igc.
---
src/profiler.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/profiler.c b/src/profiler.c
index c24a92de6d7..3db7fe0eb3e 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -185,9 +185,14 @@ trace_hash (Lisp_Object *trace, int depth)
for (int i = 0; i < depth; i++)
{
Lisp_Object f = trace[i];
- EMACS_UINT hash1
- = (CLOSUREP (f) ? XHASH (AREF (f, CLOSURE_CODE)) : XHASH (f));
- hash = sxhash_combine (hash, hash1);
+ EMACS_UINT hash1;
+#ifdef HAVE_MPS
+ hash1 = (CLOSUREP (f) ? igc_hash (AREF (f, CLOSURE_CODE)) : igc_hash
(f));
+#else
+ hash1 = (CLOSUREP (f) ? XHASH (AREF (f, CLOSURE_CODE)) : XHASH (f));
+#endif
+ hash = sxhash_combine (hash, hash1);
+
}
return hash;
}