diff options
| author | Tom Tromey | 2018-08-11 13:34:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-08-11 13:34:17 -0600 |
| commit | 78ec68e18f07a90a9ad400683b973ff51baa80e1 (patch) | |
| tree | 638c986bf753e3ddab9992ba1ef0a10a3d4891f0 /lisp | |
| parent | ba1c4f63e3d2adbe9b590a3c51c2a0808c84723f (diff) | |
| parent | 79f59d41a3d2ef3b4a9a87265bf517206a5837ad (diff) | |
| download | emacs-78ec68e18f07a90a9ad400683b973ff51baa80e1.tar.gz emacs-78ec68e18f07a90a9ad400683b973ff51baa80e1.zip | |
Merge branch 'feature/bignum'
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 4 | ||||
| -rw-r--r-- | lisp/international/ccl.el | 18 |
2 files changed, 16 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 5c0b5e340bb..1920503b8c4 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -1195,14 +1195,14 @@ | |||
| 1195 | window-width zerop)) | 1195 | window-width zerop)) |
| 1196 | (side-effect-and-error-free-fns | 1196 | (side-effect-and-error-free-fns |
| 1197 | '(arrayp atom | 1197 | '(arrayp atom |
| 1198 | bobp bolp bool-vector-p | 1198 | bignump bobp bolp bool-vector-p |
| 1199 | buffer-end buffer-list buffer-size buffer-string bufferp | 1199 | buffer-end buffer-list buffer-size buffer-string bufferp |
| 1200 | car-safe case-table-p cdr-safe char-or-string-p characterp | 1200 | car-safe case-table-p cdr-safe char-or-string-p characterp |
| 1201 | charsetp commandp cons consp | 1201 | charsetp commandp cons consp |
| 1202 | current-buffer current-global-map current-indentation | 1202 | current-buffer current-global-map current-indentation |
| 1203 | current-local-map current-minor-mode-maps current-time | 1203 | current-local-map current-minor-mode-maps current-time |
| 1204 | eobp eolp eq equal eventp | 1204 | eobp eolp eq equal eventp |
| 1205 | floatp following-char framep | 1205 | fixnump floatp following-char framep |
| 1206 | get-largest-window get-lru-window | 1206 | get-largest-window get-lru-window |
| 1207 | hash-table-p | 1207 | hash-table-p |
| 1208 | identity ignore integerp integer-or-marker-p interactive-p | 1208 | identity ignore integerp integer-or-marker-p interactive-p |
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index d2f490d59cd..58083f05d92 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el | |||
| @@ -184,11 +184,19 @@ | |||
| 184 | (defvar ccl-current-ic 0 | 184 | (defvar ccl-current-ic 0 |
| 185 | "The current index for `ccl-program-vector'.") | 185 | "The current index for `ccl-program-vector'.") |
| 186 | 186 | ||
| 187 | ;; The CCL compiled codewords are 28bits, but the CCL implementation | ||
| 188 | ;; assumes that the codewords are sign-extended, so that data constants in | ||
| 189 | ;; the upper part of the codeword are signed. This function truncates a | ||
| 190 | ;; codeword to 28bits, and then sign extends the result to a fixnum. | ||
| 191 | (defun ccl-fixnum (code) | ||
| 192 | "Convert a CCL code word to a fixnum value." | ||
| 193 | (- (logxor (logand code #x0fffffff) #x08000000) #x08000000)) | ||
| 194 | |||
| 187 | (defun ccl-embed-data (data &optional ic) | 195 | (defun ccl-embed-data (data &optional ic) |
| 188 | "Embed integer DATA in `ccl-program-vector' at `ccl-current-ic' and | 196 | "Embed integer DATA in `ccl-program-vector' at `ccl-current-ic' and |
| 189 | increment it. If IC is specified, embed DATA at IC." | 197 | increment it. If IC is specified, embed DATA at IC." |
| 190 | (if ic | 198 | (if ic |
| 191 | (aset ccl-program-vector ic data) | 199 | (aset ccl-program-vector ic (ccl-fixnum data)) |
| 192 | (let ((len (length ccl-program-vector))) | 200 | (let ((len (length ccl-program-vector))) |
| 193 | (if (>= ccl-current-ic len) | 201 | (if (>= ccl-current-ic len) |
| 194 | (let ((new (make-vector (* len 2) nil))) | 202 | (let ((new (make-vector (* len 2) nil))) |
| @@ -196,7 +204,7 @@ increment it. If IC is specified, embed DATA at IC." | |||
| 196 | (setq len (1- len)) | 204 | (setq len (1- len)) |
| 197 | (aset new len (aref ccl-program-vector len))) | 205 | (aset new len (aref ccl-program-vector len))) |
| 198 | (setq ccl-program-vector new)))) | 206 | (setq ccl-program-vector new)))) |
| 199 | (aset ccl-program-vector ccl-current-ic data) | 207 | (aset ccl-program-vector ccl-current-ic (ccl-fixnum data)) |
| 200 | (setq ccl-current-ic (1+ ccl-current-ic)))) | 208 | (setq ccl-current-ic (1+ ccl-current-ic)))) |
| 201 | 209 | ||
| 202 | (defun ccl-embed-symbol (symbol prop) | 210 | (defun ccl-embed-symbol (symbol prop) |
| @@ -230,7 +238,8 @@ proper index number for SYMBOL. PROP should be | |||
| 230 | `ccl-program-vector' at IC without altering the other bit field." | 238 | `ccl-program-vector' at IC without altering the other bit field." |
| 231 | (let ((relative (- ccl-current-ic (1+ ic)))) | 239 | (let ((relative (- ccl-current-ic (1+ ic)))) |
| 232 | (aset ccl-program-vector ic | 240 | (aset ccl-program-vector ic |
| 233 | (logior (aref ccl-program-vector ic) (ash relative 8))))) | 241 | (logior (aref ccl-program-vector ic) |
| 242 | (ccl-fixnum (ash relative 8)))))) | ||
| 234 | 243 | ||
| 235 | (defun ccl-embed-code (op reg data &optional reg2) | 244 | (defun ccl-embed-code (op reg data &optional reg2) |
| 236 | "Embed CCL code for the operation OP and arguments REG and DATA in | 245 | "Embed CCL code for the operation OP and arguments REG and DATA in |
| @@ -986,7 +995,8 @@ is a list of CCL-BLOCKs." | |||
| 986 | (defun ccl-get-next-code () | 995 | (defun ccl-get-next-code () |
| 987 | "Return a CCL code in `ccl-code' at `ccl-current-ic'." | 996 | "Return a CCL code in `ccl-code' at `ccl-current-ic'." |
| 988 | (prog1 | 997 | (prog1 |
| 989 | (aref ccl-code ccl-current-ic) | 998 | (let ((code (aref ccl-code ccl-current-ic))) |
| 999 | (if (numberp code) (ccl-fixnum code) code)) | ||
| 990 | (setq ccl-current-ic (1+ ccl-current-ic)))) | 1000 | (setq ccl-current-ic (1+ ccl-current-ic)))) |
| 991 | 1001 | ||
| 992 | (defun ccl-dump-1 () | 1002 | (defun ccl-dump-1 () |