aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2013-10-08 23:32:35 -0400
committerStefan Monnier2013-10-08 23:32:35 -0400
commit79804536d8ccea5ed28745fae5650f3ec4805eda (patch)
treedc88cce755bf9f8e72822f3c65f5849ef3c4b751 /src
parent238150c8ff55ab6d74f0fdcc7f163c8ee98c3749 (diff)
downloademacs-79804536d8ccea5ed28745fae5650f3ec4805eda.tar.gz
emacs-79804536d8ccea5ed28745fae5650f3ec4805eda.zip
* lisp/profiler.el: Create a more coherent calltree from partial backtraces.
(profiler-format): Hide the tail with `invisible' so that C-s can still find the hidden elements. (profiler-calltree-depth): Don't recurse so enthusiastically. (profiler-function-equal): New hash-table-test. (profiler-calltree-build-unified): New function. (profiler-calltree-build): Use it. (profiler-report-make-name-part): Indent the calltree less. (profiler-report-mode): Add visibility specs for profiler-format. (profiler-report-expand-entry, profiler-report-toggle-entry): Expand the whole subtree when provided with a prefix arg. * src/fns.c (hashfn_user_defined): Allow hash functions to return any Lisp_Object.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/fns.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5196eb230d8..a205ea72b7f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * fns.c (hashfn_user_defined): Allow hash functions to return any
4 Lisp_Object.
5
12013-10-08 Paul Eggert <eggert@cs.ucla.edu> 62013-10-08 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Fix minor problems found by static checking. 8 Fix minor problems found by static checking.
diff --git a/src/fns.c b/src/fns.c
index 151977ecdc4..e991711b871 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3571,9 +3571,7 @@ hashfn_user_defined (struct hash_table_test *ht, Lisp_Object key)
3571 args[0] = ht->user_hash_function; 3571 args[0] = ht->user_hash_function;
3572 args[1] = key; 3572 args[1] = key;
3573 hash = Ffuncall (2, args); 3573 hash = Ffuncall (2, args);
3574 if (!INTEGERP (hash)) 3574 return hashfn_eq (ht, hash);
3575 signal_error ("Invalid hash code returned from user-supplied hash function", hash);
3576 return XUINT (hash);
3577} 3575}
3578 3576
3579/* An upper bound on the size of a hash table index. It must fit in 3577/* An upper bound on the size of a hash table index. It must fit in
@@ -4542,9 +4540,9 @@ compare keys, and HASH for computing hash codes of keys.
4542 4540
4543TEST must be a function taking two arguments and returning non-nil if 4541TEST must be a function taking two arguments and returning non-nil if
4544both arguments are the same. HASH must be a function taking one 4542both arguments are the same. HASH must be a function taking one
4545argument and return an integer that is the hash code of the argument. 4543argument and returning an object that is the hash code of the argument.
4546Hash code computation should use the whole value range of integers, 4544It should be the case that if (eq (funcall HASH x1) (funcall HASH x2))
4547including negative integers. */) 4545returns nil, then (funcall TEST x1 x2) also returns nil. */)
4548 (Lisp_Object name, Lisp_Object test, Lisp_Object hash) 4546 (Lisp_Object name, Lisp_Object test, Lisp_Object hash)
4549{ 4547{
4550 return Fput (name, Qhash_table_test, list2 (test, hash)); 4548 return Fput (name, Qhash_table_test, list2 (test, hash));