X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/af09cb431efd4a6cc448f28313ec33b7c2dc22f2..26c76ace8de7d0fa687d8a76b3a3bce5fb1ee692:/src/bytecode.c diff --git a/src/bytecode.c b/src/bytecode.c index 39e2ae4a43..ae290c2735 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -15,7 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. hacked on by jwz@lucid.com 17-jun-91 o added a compile-time switch to turn on simple sanity checking; @@ -129,7 +130,8 @@ Lisp_Object Qbytecode; #define Bmult 0137 #define Bpoint 0140 -#define Bmark 0141 /* no longer generated as of v18 */ +/* Was Bmark in v17. */ +#define Bsave_current_buffer 0141 #define Bgoto_char 0142 #define Binsert 0143 #define Bpoint_max 0144 @@ -251,8 +253,9 @@ Lisp_Object Qbytecode; DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0, "Function used internally in byte-compiled code.\n\ -The first argument is a string of byte code; the second, a vector of constants;\n\ -the third, the maximum stack depth used in this function.\n\ +The first argument, BYTESTR, is a string of byte code;\n\ +the second, VECTOR, a vector of constants;\n\ +the third, MAXDEPTH, the maximum stack depth used in this function.\n\ If the third argument is incorrect, Emacs may crash.") (bytestr, vector, maxdepth) Lisp_Object bytestr, vector, maxdepth; @@ -473,14 +476,14 @@ If the third argument is incorrect, Emacs may crash.") case BRgoto: QUIT; - pc += *pc - 127; + pc += (int) *pc - 127; break; case BRgotoifnil: if (NILP (POP)) { QUIT; - pc += *pc - 128; + pc += (int) *pc - 128; } pc++; break; @@ -489,7 +492,7 @@ If the third argument is incorrect, Emacs may crash.") if (!NILP (POP)) { QUIT; - pc += *pc - 128; + pc += (int) *pc - 128; } pc++; break; @@ -535,6 +538,10 @@ If the third argument is incorrect, Emacs may crash.") record_unwind_protect (save_excursion_restore, save_excursion_save ()); break; + case Bsave_current_buffer: + record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); + break; + case Bsave_window_excursion: TOP = Fsave_window_excursion (TOP); break; @@ -758,7 +765,18 @@ If the third argument is incorrect, Emacs may crash.") v2 = POP; v1 = TOP; CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1, 0); CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2, 0); - TOP = (XFLOATINT (v1) == XFLOATINT (v2)) ? Qt : Qnil; +#ifdef LISP_FLOAT_TYPE + if (FLOATP (v1) || FLOATP (v2)) + { + double f1, f2; + + f1 = (FLOATP (v1) ? XFLOAT (v1)->data : XINT (v1)); + f2 = (FLOATP (v2) ? XFLOAT (v2)->data : XINT (v2)); + TOP = (f1 == f2 ? Qt : Qnil); + } + else +#endif + TOP = (XINT (v1) == XINT (v2) ? Qt : Qnil); break; case Bgtr: @@ -828,7 +846,7 @@ If the third argument is incorrect, Emacs may crash.") break; case Bpoint: - XSETFASTINT (v1, point); + XSETFASTINT (v1, PT); PUSH (v1); break;