diff options
| author | Stefan Monnier | 2013-10-08 23:32:35 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-10-08 23:32:35 -0400 |
| commit | 79804536d8ccea5ed28745fae5650f3ec4805eda (patch) | |
| tree | dc88cce755bf9f8e72822f3c65f5849ef3c4b751 /src | |
| parent | 238150c8ff55ab6d74f0fdcc7f163c8ee98c3749 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fns.c | 10 |
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 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-10-08 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-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. |
| @@ -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 | ||
| 4543 | TEST must be a function taking two arguments and returning non-nil if | 4541 | TEST must be a function taking two arguments and returning non-nil if |
| 4544 | both arguments are the same. HASH must be a function taking one | 4542 | both arguments are the same. HASH must be a function taking one |
| 4545 | argument and return an integer that is the hash code of the argument. | 4543 | argument and returning an object that is the hash code of the argument. |
| 4546 | Hash code computation should use the whole value range of integers, | 4544 | It should be the case that if (eq (funcall HASH x1) (funcall HASH x2)) |
| 4547 | including negative integers. */) | 4545 | returns 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)); |