mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-24 05:22:04 -08:00
Binsert support
This commit is contained in:
parent
0c7115c7b8
commit
1510e15c3c
2 changed files with 14 additions and 3 deletions
|
|
@ -1945,7 +1945,8 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length,
|
|||
break;
|
||||
|
||||
case BinsertN:
|
||||
error ("BinsertN not supported");
|
||||
op = FETCH;
|
||||
EMIT_SCRATCH_CALL_N ("Finsert", op);
|
||||
break;
|
||||
|
||||
case Bstack_set:
|
||||
|
|
|
|||
|
|
@ -314,12 +314,22 @@
|
|||
(1+ (let ((a 1)
|
||||
(_b)
|
||||
(_c))
|
||||
a)))
|
||||
a)))
|
||||
(defun comp-tests-insertn-f (a b c d)
|
||||
;; Binsert
|
||||
(insert a b c d))
|
||||
|
||||
(byte-compile #'comp-tests-discardn-f)
|
||||
(native-compile #'comp-tests-discardn-f)
|
||||
(byte-compile #'comp-tests-insertn-f)
|
||||
(native-compile #'comp-tests-insertn-f)
|
||||
|
||||
(should (= (comp-tests-discardn-f 10) 2)))
|
||||
(should (= (comp-tests-discardn-f 10) 2))
|
||||
|
||||
(should (string= (with-temp-buffer
|
||||
(comp-tests-insertn-f "a" "b" "c" "d")
|
||||
(buffer-string))
|
||||
"abcd")))
|
||||
|
||||
(ert-deftest comp-tests-gc ()
|
||||
"Try to do some longer computation to let the gc kick in."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue