comparison src/bytecode.c @ 46293:1fb8f75062c6

Use macro SPECPDL_INDEX.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 11 Jul 2002 14:18:02 +0000
parents 36bc4f35dc18
children 40db0673e6f0
comparison
equal deleted inserted replaced
46292:712d0161e499 46293:1fb8f75062c6
418 the third, MAXDEPTH, the maximum stack depth used in this function. 418 the third, MAXDEPTH, the maximum stack depth used in this function.
419 If the third argument is incorrect, Emacs may crash. */) 419 If the third argument is incorrect, Emacs may crash. */)
420 (bytestr, vector, maxdepth) 420 (bytestr, vector, maxdepth)
421 Lisp_Object bytestr, vector, maxdepth; 421 Lisp_Object bytestr, vector, maxdepth;
422 { 422 {
423 int count = specpdl_ptr - specpdl; 423 int count = SPECPDL_INDEX ();
424 #ifdef BYTE_CODE_METER 424 #ifdef BYTE_CODE_METER
425 int this_op = 0; 425 int this_op = 0;
426 int prev_op; 426 int prev_op;
427 #endif 427 #endif
428 int op; 428 int op;
726 case Bunbind+4: 726 case Bunbind+4:
727 case Bunbind+5: 727 case Bunbind+5:
728 op -= Bunbind; 728 op -= Bunbind;
729 dounbind: 729 dounbind:
730 BEFORE_POTENTIAL_GC (); 730 BEFORE_POTENTIAL_GC ();
731 unbind_to (specpdl_ptr - specpdl - op, Qnil); 731 unbind_to (SPECPDL_INDEX () - op, Qnil);
732 AFTER_POTENTIAL_GC (); 732 AFTER_POTENTIAL_GC ();
733 break; 733 break;
734 734
735 case Bunbind_all: 735 case Bunbind_all:
736 /* To unbind back to the beginning of this frame. Not used yet, 736 /* To unbind back to the beginning of this frame. Not used yet,
907 BEFORE_POTENTIAL_GC (); 907 BEFORE_POTENTIAL_GC ();
908 v1 = POP; 908 v1 = POP;
909 temp_output_buffer_show (TOP); 909 temp_output_buffer_show (TOP);
910 TOP = v1; 910 TOP = v1;
911 /* pop binding of standard-output */ 911 /* pop binding of standard-output */
912 unbind_to (specpdl_ptr - specpdl - 1, Qnil); 912 unbind_to (SPECPDL_INDEX () - 1, Qnil);
913 AFTER_POTENTIAL_GC (); 913 AFTER_POTENTIAL_GC ();
914 break; 914 break;
915 } 915 }
916 916
917 case Bnth: 917 case Bnth:
1723 exit: 1723 exit:
1724 1724
1725 byte_stack_list = byte_stack_list->next; 1725 byte_stack_list = byte_stack_list->next;
1726 1726
1727 /* Binds and unbinds are supposed to be compiled balanced. */ 1727 /* Binds and unbinds are supposed to be compiled balanced. */
1728 if (specpdl_ptr - specpdl != count) 1728 if (SPECPDL_INDEX () != count)
1729 #ifdef BYTE_CODE_SAFE 1729 #ifdef BYTE_CODE_SAFE
1730 error ("binding stack not balanced (serious byte compiler bug)"); 1730 error ("binding stack not balanced (serious byte compiler bug)");
1731 #else 1731 #else
1732 abort (); 1732 abort ();
1733 #endif 1733 #endif