Mercurial > hg > xemacs-beta
comparison src/bytecode.c @ 4677:8f1ee2d15784
Support full Common Lisp multiple values in C.
lisp/ChangeLog
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el :
Update this file to support full C-level multiple values. This
involves:
-- Four new bytecodes, and special compiler functions to compile
multiple-value-call, multiple-value-list-internal, values,
values-list, and, since it now needs to pass back multiple values
and is a special form, throw.
-- There's a new compiler variable, byte-compile-checks-on-load,
which is a list of forms that are evaluated at the very start of a
file, with an error thrown if any of them give nil.
-- The header is now inserted *after* compilation, giving a chance
for the compilation process to influence what those checks
are. There is still a check done before compilation for non-ASCII
characters, to try to turn off dynamic docstrings if appopriate,
in `byte-compile-maybe-reset-coding'.
Space is reserved for checks; comments describing the version of
the byte compiler generating the file are inserted if space
remains for them.
* bytecomp.el (byte-compile-version):
Update this, we're a newer version of the byte compiler.
* byte-optimize.el (byte-optimize-funcall):
Correct a comment.
* bytecomp.el (byte-compile-lapcode):
Discard the arg with byte-multiple-value-call.
* bytecomp.el (byte-compile-checks-and-comments-space):
New variable, describe how many octets to reserve for checks at
the start of byte-compiled files.
* cl-compat.el:
Remove the fake multiple-value implementation. Have the functions
that use it use the real multiple-value implementation instead.
* cl-macs.el (cl-block-wrapper, cl-block-throw):
Revise the byte-compile properties of these symbols to work now
we've made throw into a special form; keep the byte-compile
properties as anonymous lambdas, since we don't have docstrings
for them.
* cl-macs.el (multiple-value-bind, multiple-value-setq)
(multiple-value-list, nth-value):
Update these functions to work with the C support for multiple
values.
* cl-macs.el (values):
Modify the setf handler for this to call
#'multiple-value-list-internal appropriately.
* cl-macs.el (cl-setf-do-store):
If the store form is a cons, treat it specially as wrapping the
store value.
* cl.el (cl-block-wrapper):
Make this an alias of #'and, not #'identity, since it needs to
pass back multiple values.
* cl.el (multiple-value-apply):
We no longer support this, mark it obsolete.
* lisp-mode.el (eval-interactive-verbose):
Remove a useless space in the docstring.
* lisp-mode.el (eval-interactive):
Update this function and its docstring. It now passes back a list,
basically wrapping any eval calls with multiple-value-list. This
allows multiple values to be printed by default in *scratch*.
* lisp-mode.el (prin1-list-as-multiple-values):
New function, printing a list as multiple values in the manner of
Bruno Haible's clisp, separating each entry with " ;\n".
* lisp-mode.el (eval-last-sexp):
Call #'prin1-list-as-multiple-values on the return value of
#'eval-interactive.
* lisp-mode.el (eval-defun):
Call #'prin1-list-as-multiple-values on the return value of
#'eval-interactive.
* mouse.el (mouse-eval-sexp):
Deal with lists corresponding to multiple values from
#'eval-interactive. Call #'cl-prettyprint, which is always
available, instead of sometimes calling #'pprint and sometimes
falling back to prin1.
* obsolete.el (obsolete-throw):
New function, called from eval.c when #'funcall encounters an
attempt to call #'throw (now a special form) as a function. Only
needed for compatibility with 21.4 byte-code.
man/ChangeLog addition:
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* cl.texi (Organization):
Remove references to the obsolete multiple-value emulating code.
src/ChangeLog addition:
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* bytecode.c (enum Opcode /* Byte codes */):
Add four new bytecodes, to deal with multiple values.
(POP_WITH_MULTIPLE_VALUES): New macro.
(POP): Modify this macro to ignore multiple values.
(DISCARD_PRESERVING_MULTIPLE_VALUES): New macro.
(DISCARD): Modify this macro to ignore multiple values.
(TOP_WITH_MULTIPLE_VALUES): New macro.
(TOP_ADDRESS): New macro.
(TOP): Modify this macro to ignore multiple values.
(TOP_LVALUE): New macro.
(Bcall): Ignore multiple values where appropriate.
(Breturn): Pass back multiple values.
(Bdup): Preserve multiple values.
Use TOP_LVALUE with most bytecodes that assign anything to
anything.
(Bbind_multiple_value_limits, Bmultiple_value_call,
Bmultiple_value_list_internal, Bthrow): Implement the new
bytecodes.
(Bgotoifnilelsepop, Bgotoifnonnilelsepop, BRgotoifnilelsepop,
BRgotoifnonnilelsepop):
Discard any multiple values.
* callint.c (Fcall_interactively):
Ignore multiple values when calling #'eval, in two places.
* device-x.c (x_IO_error_handler):
* macros.c (pop_kbd_macro_event):
* eval.c (Fsignal):
* eval.c (flagged_a_squirmer):
Call throw_or_bomb_out, not Fthrow, now that the latter is a
special form.
* eval.c:
Make Qthrow, Qobsolete_throw available as symbols.
Provide multiple_value_current_limit, multiple-values-limit (the
latter as specified by Common Lisp.
* eval.c (For):
Ignore multiple values when comparing with Qnil, but pass any
multiple values back for the last arg.
* eval.c (Fand):
Ditto.
* eval.c (Fif):
Ignore multiple values when examining the result of the
condition.
* eval.c (Fcond):
Ignore multiple values when comparing what the clauses give, but
pass them back if a clause gave non-nil.
* eval.c (Fprog2):
Never pass back multiple values.
* eval.c (FletX, Flet):
Ignore multiple when evaluating what exactly symbols should be
bound to.
* eval.c (Fwhile):
Ignore multiple values when evaluating the test.
* eval.c (Fsetq, Fdefvar, Fdefconst):
Ignore multiple values.
* eval.c (Fthrow):
Declare this as a special form; ignore multiple values for TAG,
preserve them for VALUE.
* eval.c (throw_or_bomb_out):
Make this available to other files, now Fthrow is a special form.
* eval.c (Feval):
Ignore multiple values when calling a compiled function, a
non-special-form subr, or a lambda expression.
* eval.c (Ffuncall):
If we attempt to call #'throw (now a special form) as a function,
don't error, call #'obsolete-throw instead.
* eval.c (make_multiple_value, multiple_value_aset)
(multiple_value_aref, print_multiple_value, mark_multiple_value)
(size_multiple_value):
Implement the multiple_value type. Add a long comment describing
our implementation.
* eval.c (bind_multiple_value_limits):
New function, used by the bytecode and by #'multiple-value-call,
#'multiple-value-list-internal.
* eval.c (multiple_value_call):
New function, used by the bytecode and #'multiple-value-call.
* eval.c (Fmultiple_value_call):
New special form.
* eval.c (multiple_value_list_internal):
New function, used by the byte code and
#'multiple-value-list-internal.
* eval.c (Fmultiple_value_list_internal, Fmultiple_value_prog1):
New special forms.
* eval.c (Fvalues, Fvalues_list):
New Lisp functions.
* eval.c (values2):
New function, for C code returning multiple values.
* eval.c (syms_of_eval):
Make our new Lisp functions and symbols available.
* eval.c (multiple-values-limit):
Make this available to Lisp.
* event-msw.c (dde_eval_string):
* event-stream.c (execute_help_form):
* glade.c (connector):
* glyphs-widget.c (glyph_instantiator_to_glyph):
* glyphs.c (evaluate_xpm_color_symbols):
* gui-x.c (wv_set_evalable_slot, button_item_to_widget_value):
* gui.c (gui_item_value, gui_item_display_flush_left):
* lread.c (check_if_suppressed):
* menubar-gtk.c (menu_convert, menu_descriptor_to_widget_1):
* menubar-msw.c (populate_menu_add_item):
* print.c (Fwith_output_to_temp_buffer):
* symbols.c (Fsetq_default):
Ignore multiple values when calling Feval.
* symeval.h:
Add the header declarations necessary for the multiple-values
implementation.
* inline.c:
#include symeval.h, now that it has some inline functions.
* lisp.h:
Update Fthrow's declaration. Make throw_or_bomb_out available to
all files.
* lrecord.h (enum lrecord_type):
Add the multiple_value type here.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 16 Aug 2009 20:55:49 +0100 |
parents | d674024a8674 |
children | b5e1d4f6b66f |
comparison
equal
deleted
inserted
replaced
4676:e3feb329bda9 | 4677:8f1ee2d15784 |
---|---|
241 BRgotoifnonnilelsepop = 0256, | 241 BRgotoifnonnilelsepop = 0256, |
242 | 242 |
243 BlistN = 0257, | 243 BlistN = 0257, |
244 BconcatN = 0260, | 244 BconcatN = 0260, |
245 BinsertN = 0261, | 245 BinsertN = 0261, |
246 | |
247 Bbind_multiple_value_limits = 0262, /* New in 21.5. */ | |
248 Bmultiple_value_list_internal = 0263, /* New in 21.5. */ | |
249 Bmultiple_value_call = 0264, /* New in 21.5. */ | |
250 Bthrow = 0265, /* New in 21.5. */ | |
251 | |
246 Bmember = 0266, /* new in v20 */ | 252 Bmember = 0266, /* new in v20 */ |
247 Bassq = 0267, /* new in v20 */ | 253 Bassq = 0267, /* new in v20 */ |
248 | 254 |
249 Bconstant = 0300 | 255 Bconstant = 0300 |
250 }; | 256 }; |
651 #define JUMPR_NEXT ((void) (program_ptr += 1)) | 657 #define JUMPR_NEXT ((void) (program_ptr += 1)) |
652 | 658 |
653 /* Push x onto the execution stack. */ | 659 /* Push x onto the execution stack. */ |
654 #define PUSH(x) (*++stack_ptr = (x)) | 660 #define PUSH(x) (*++stack_ptr = (x)) |
655 | 661 |
656 /* Pop a value off the execution stack. */ | 662 /* Pop a value, which may be multiple, off the execution stack. */ |
657 #define POP (*stack_ptr--) | 663 #define POP_WITH_MULTIPLE_VALUES (*stack_ptr--) |
664 | |
665 /* Pop a value off the execution stack, treating multiple values as single. */ | |
666 #define POP (IGNORE_MULTIPLE_VALUES (POP_WITH_MULTIPLE_VALUES)) | |
667 | |
668 #define DISCARD_PRESERVING_MULTIPLE_VALUES(n) (stack_ptr -= (n)) | |
658 | 669 |
659 /* Discard n values from the execution stack. */ | 670 /* Discard n values from the execution stack. */ |
660 #define DISCARD(n) (stack_ptr -= (n)) | 671 #define DISCARD(n) do { \ |
672 if (1 != multiple_value_current_limit) \ | |
673 { \ | |
674 int i, en = n; \ | |
675 for (i = 0; i < en; i++) \ | |
676 { \ | |
677 *stack_ptr = ignore_multiple_values (*stack_ptr); \ | |
678 stack_ptr--; \ | |
679 } \ | |
680 } \ | |
681 else \ | |
682 { \ | |
683 stack_ptr -= (n); \ | |
684 } \ | |
685 } while (0) | |
686 | |
687 /* Get the value, which may be multiple, at the top of the execution stack; | |
688 and leave it there. */ | |
689 #define TOP_WITH_MULTIPLE_VALUES (*stack_ptr) | |
690 | |
691 #define TOP_ADDRESS (stack_ptr) | |
661 | 692 |
662 /* Get the value which is at the top of the execution stack, | 693 /* Get the value which is at the top of the execution stack, |
663 but don't pop it. */ | 694 but don't pop it. */ |
664 #define TOP (*stack_ptr) | 695 #define TOP (IGNORE_MULTIPLE_VALUES (TOP_WITH_MULTIPLE_VALUES)) |
696 | |
697 #define TOP_LVALUE (*stack_ptr) | |
698 | |
699 | |
665 | 700 |
666 /* See comment before the big switch in execute_optimized_program(). */ | 701 /* See comment before the big switch in execute_optimized_program(). */ |
667 #define GCPRO_STACK (gcpro1.nvars = stack_ptr - stack_beg) | 702 #define GCPRO_STACK (gcpro1.nvars = stack_ptr - stack_beg) |
668 | 703 |
669 /* The actual interpreter for byte code. | 704 /* The actual interpreter for byte code. |
857 Lisp_Object val = Fget (TOP, Qbyte_code_meter, Qnil); | 892 Lisp_Object val = Fget (TOP, Qbyte_code_meter, Qnil); |
858 if (INTP (val)) | 893 if (INTP (val)) |
859 Fput (TOP, Qbyte_code_meter, make_int (XINT (val) + 1)); | 894 Fput (TOP, Qbyte_code_meter, make_int (XINT (val) + 1)); |
860 } | 895 } |
861 #endif | 896 #endif |
862 TOP = Ffuncall (n + 1, &TOP); | 897 TOP_LVALUE = TOP; /* Ignore multiple values. */ |
898 TOP_LVALUE = Ffuncall (n + 1, TOP_ADDRESS); | |
863 break; | 899 break; |
864 | 900 |
865 case Bunbind: | 901 case Bunbind: |
866 case Bunbind+1: | 902 case Bunbind+1: |
867 case Bunbind+2: | 903 case Bunbind+2: |
893 else | 929 else |
894 JUMP_NEXT; | 930 JUMP_NEXT; |
895 break; | 931 break; |
896 | 932 |
897 case Bgotoifnilelsepop: | 933 case Bgotoifnilelsepop: |
898 if (NILP (TOP)) | 934 /* Discard any multiple value: */ |
935 if (NILP (TOP_LVALUE = TOP)) | |
899 JUMP; | 936 JUMP; |
900 else | 937 else |
901 { | 938 { |
902 DISCARD (1); | 939 DISCARD (1); |
903 JUMP_NEXT; | 940 JUMP_NEXT; |
904 } | 941 } |
905 break; | 942 break; |
906 | 943 |
907 case Bgotoifnonnilelsepop: | 944 case Bgotoifnonnilelsepop: |
908 if (!NILP (TOP)) | 945 /* Discard any multiple value: */ |
946 if (!NILP (TOP_LVALUE = TOP)) | |
909 JUMP; | 947 JUMP; |
910 else | 948 else |
911 { | 949 { |
912 DISCARD (1); | 950 DISCARD (1); |
913 JUMP_NEXT; | 951 JUMP_NEXT; |
932 else | 970 else |
933 JUMPR_NEXT; | 971 JUMPR_NEXT; |
934 break; | 972 break; |
935 | 973 |
936 case BRgotoifnilelsepop: | 974 case BRgotoifnilelsepop: |
937 if (NILP (TOP)) | 975 if (NILP (TOP_LVALUE = TOP)) |
938 JUMPR; | 976 JUMPR; |
939 else | 977 else |
940 { | 978 { |
941 DISCARD (1); | 979 DISCARD (1); |
942 JUMPR_NEXT; | 980 JUMPR_NEXT; |
943 } | 981 } |
944 break; | 982 break; |
945 | 983 |
946 case BRgotoifnonnilelsepop: | 984 case BRgotoifnonnilelsepop: |
947 if (!NILP (TOP)) | 985 if (!NILP (TOP_LVALUE = TOP)) |
948 JUMPR; | 986 JUMPR; |
949 else | 987 else |
950 { | 988 { |
951 DISCARD (1); | 989 DISCARD (1); |
952 JUMPR_NEXT; | 990 JUMPR_NEXT; |
958 #ifdef ERROR_CHECK_BYTE_CODE | 996 #ifdef ERROR_CHECK_BYTE_CODE |
959 /* Binds and unbinds are supposed to be compiled balanced. */ | 997 /* Binds and unbinds are supposed to be compiled balanced. */ |
960 if (specpdl_depth() != speccount) | 998 if (specpdl_depth() != speccount) |
961 invalid_byte_code ("unbalanced specbinding stack", Qunbound); | 999 invalid_byte_code ("unbalanced specbinding stack", Qunbound); |
962 #endif | 1000 #endif |
963 return TOP; | 1001 return TOP_WITH_MULTIPLE_VALUES; |
964 | 1002 |
965 case Bdiscard: | 1003 case Bdiscard: |
966 DISCARD (1); | 1004 DISCARD (1); |
967 break; | 1005 break; |
968 | 1006 |
969 case Bdup: | 1007 case Bdup: |
970 { | 1008 { |
971 Lisp_Object arg = TOP; | 1009 Lisp_Object arg = TOP_WITH_MULTIPLE_VALUES; |
972 PUSH (arg); | 1010 PUSH (arg); |
973 break; | 1011 break; |
974 } | 1012 } |
975 | 1013 |
976 case Bconstant2: | 1014 case Bconstant2: |
977 PUSH (constants_data[READ_UINT_2]); | 1015 PUSH (constants_data[READ_UINT_2]); |
978 break; | 1016 break; |
979 | 1017 |
980 case Bcar: | 1018 case Bcar: |
981 /* Fcar can GC via wrong_type_argument. */ | 1019 { |
982 /* GCPRO_STACK; */ | 1020 /* Fcar can GC via wrong_type_argument. */ |
983 TOP = CONSP (TOP) ? XCAR (TOP) : Fcar (TOP); | 1021 /* GCPRO_STACK; */ |
984 break; | 1022 Lisp_Object arg = TOP; |
1023 TOP_LVALUE = CONSP (arg) ? XCAR (arg) : Fcar (arg); | |
1024 break; | |
1025 } | |
985 | 1026 |
986 case Bcdr: | 1027 case Bcdr: |
987 /* Fcdr can GC via wrong_type_argument. */ | 1028 { |
988 /* GCPRO_STACK; */ | 1029 /* Fcdr can GC via wrong_type_argument. */ |
989 TOP = CONSP (TOP) ? XCDR (TOP) : Fcdr (TOP); | 1030 /* GCPRO_STACK; */ |
990 break; | 1031 Lisp_Object arg = TOP; |
991 | 1032 TOP_LVALUE = CONSP (arg) ? XCDR (arg) : Fcdr (arg); |
1033 break; | |
1034 } | |
992 | 1035 |
993 case Bunbind_all: | 1036 case Bunbind_all: |
994 /* To unbind back to the beginning of this frame. Not used yet, | 1037 /* To unbind back to the beginning of this frame. Not used yet, |
995 but will be needed for tail-recursion elimination. */ | 1038 but will be needed for tail-recursion elimination. */ |
996 unbind_to (speccount); | 1039 unbind_to (speccount); |
999 case Bnth: | 1042 case Bnth: |
1000 { | 1043 { |
1001 Lisp_Object arg = POP; | 1044 Lisp_Object arg = POP; |
1002 /* Fcar and Fnthcdr can GC via wrong_type_argument. */ | 1045 /* Fcar and Fnthcdr can GC via wrong_type_argument. */ |
1003 /* GCPRO_STACK; */ | 1046 /* GCPRO_STACK; */ |
1004 TOP = Fcar (Fnthcdr (TOP, arg)); | 1047 TOP_LVALUE = Fcar (Fnthcdr (TOP, arg)); |
1005 break; | 1048 break; |
1006 } | 1049 } |
1007 | 1050 |
1008 case Bsymbolp: | 1051 case Bsymbolp: |
1009 TOP = SYMBOLP (TOP) ? Qt : Qnil; | 1052 TOP_LVALUE = SYMBOLP (TOP) ? Qt : Qnil; |
1010 break; | 1053 break; |
1011 | 1054 |
1012 case Bconsp: | 1055 case Bconsp: |
1013 TOP = CONSP (TOP) ? Qt : Qnil; | 1056 TOP_LVALUE = CONSP (TOP) ? Qt : Qnil; |
1014 break; | 1057 break; |
1015 | 1058 |
1016 case Bstringp: | 1059 case Bstringp: |
1017 TOP = STRINGP (TOP) ? Qt : Qnil; | 1060 TOP_LVALUE = STRINGP (TOP) ? Qt : Qnil; |
1018 break; | 1061 break; |
1019 | 1062 |
1020 case Blistp: | 1063 case Blistp: |
1021 TOP = LISTP (TOP) ? Qt : Qnil; | 1064 TOP_LVALUE = LISTP (TOP) ? Qt : Qnil; |
1022 break; | 1065 break; |
1023 | 1066 |
1024 case Bnumberp: | 1067 case Bnumberp: |
1025 #ifdef WITH_NUMBER_TYPES | 1068 #ifdef WITH_NUMBER_TYPES |
1026 TOP = NUMBERP (TOP) ? Qt : Qnil; | 1069 TOP_LVALUE = NUMBERP (TOP) ? Qt : Qnil; |
1027 #else | 1070 #else |
1028 TOP = INT_OR_FLOATP (TOP) ? Qt : Qnil; | 1071 TOP_LVALUE = INT_OR_FLOATP (TOP) ? Qt : Qnil; |
1029 #endif | 1072 #endif |
1030 break; | 1073 break; |
1031 | 1074 |
1032 case Bintegerp: | 1075 case Bintegerp: |
1033 #ifdef HAVE_BIGNUM | 1076 #ifdef HAVE_BIGNUM |
1034 TOP = INTEGERP (TOP) ? Qt : Qnil; | 1077 TOP_LVALUE = INTEGERP (TOP) ? Qt : Qnil; |
1035 #else | 1078 #else |
1036 TOP = INTP (TOP) ? Qt : Qnil; | 1079 TOP_LVALUE = INTP (TOP) ? Qt : Qnil; |
1037 #endif | 1080 #endif |
1038 break; | 1081 break; |
1039 | 1082 |
1040 case Beq: | 1083 case Beq: |
1041 { | 1084 { |
1042 Lisp_Object arg = POP; | 1085 Lisp_Object arg = POP; |
1043 TOP = EQ_WITH_EBOLA_NOTICE (TOP, arg) ? Qt : Qnil; | 1086 TOP_LVALUE = EQ_WITH_EBOLA_NOTICE (TOP, arg) ? Qt : Qnil; |
1044 break; | 1087 break; |
1045 } | 1088 } |
1046 | 1089 |
1047 case Bnot: | 1090 case Bnot: |
1048 TOP = NILP (TOP) ? Qt : Qnil; | 1091 TOP_LVALUE = NILP (TOP) ? Qt : Qnil; |
1049 break; | 1092 break; |
1050 | 1093 |
1051 case Bcons: | 1094 case Bcons: |
1052 { | 1095 { |
1053 Lisp_Object arg = POP; | 1096 Lisp_Object arg = POP; |
1054 TOP = Fcons (TOP, arg); | 1097 TOP_LVALUE = Fcons (TOP, arg); |
1055 break; | 1098 break; |
1056 } | 1099 } |
1057 | 1100 |
1058 case Blist1: | 1101 case Blist1: |
1059 TOP = Fcons (TOP, Qnil); | 1102 TOP_LVALUE = Fcons (TOP, Qnil); |
1060 break; | 1103 break; |
1061 | 1104 |
1062 | 1105 |
1063 case BlistN: | 1106 case BlistN: |
1064 n = READ_UINT_1; | 1107 n = READ_UINT_1; |
1077 if (--n) | 1120 if (--n) |
1078 { | 1121 { |
1079 DISCARD (1); | 1122 DISCARD (1); |
1080 goto list_loop; | 1123 goto list_loop; |
1081 } | 1124 } |
1082 TOP = list; | 1125 TOP_LVALUE = list; |
1083 break; | 1126 break; |
1084 } | 1127 } |
1085 | 1128 |
1086 | 1129 |
1087 case Bconcat2: | 1130 case Bconcat2: |
1095 n = READ_UINT_1; | 1138 n = READ_UINT_1; |
1096 do_concat: | 1139 do_concat: |
1097 DISCARD (n - 1); | 1140 DISCARD (n - 1); |
1098 /* Apparently `concat' can GC; Fconcat GCPROs its arguments. */ | 1141 /* Apparently `concat' can GC; Fconcat GCPROs its arguments. */ |
1099 /* GCPRO_STACK; */ | 1142 /* GCPRO_STACK; */ |
1100 TOP = Fconcat (n, &TOP); | 1143 TOP_LVALUE = TOP; /* Ignore multiple values. */ |
1144 TOP_LVALUE = Fconcat (n, TOP_ADDRESS); | |
1101 break; | 1145 break; |
1102 | 1146 |
1103 | 1147 |
1104 case Blength: | 1148 case Blength: |
1105 TOP = Flength (TOP); | 1149 TOP_LVALUE = Flength (TOP); |
1106 break; | 1150 break; |
1107 | 1151 |
1108 case Baset: | 1152 case Baset: |
1109 { | 1153 { |
1110 Lisp_Object arg2 = POP; | 1154 Lisp_Object arg2 = POP; |
1111 Lisp_Object arg1 = POP; | 1155 Lisp_Object arg1 = POP; |
1112 TOP = Faset (TOP, arg1, arg2); | 1156 TOP_LVALUE = Faset (TOP, arg1, arg2); |
1113 break; | 1157 break; |
1114 } | 1158 } |
1115 | 1159 |
1116 case Bsymbol_value: | 1160 case Bsymbol_value: |
1117 /* Why does this need GCPRO_STACK? If not, remove others, too. */ | 1161 /* Why does this need GCPRO_STACK? If not, remove others, too. */ |
1118 /* GCPRO_STACK; */ | 1162 /* GCPRO_STACK; */ |
1119 TOP = Fsymbol_value (TOP); | 1163 TOP_LVALUE = Fsymbol_value (TOP); |
1120 break; | 1164 break; |
1121 | 1165 |
1122 case Bsymbol_function: | 1166 case Bsymbol_function: |
1123 TOP = Fsymbol_function (TOP); | 1167 TOP_LVALUE = Fsymbol_function (TOP); |
1124 break; | 1168 break; |
1125 | 1169 |
1126 case Bget: | 1170 case Bget: |
1127 { | 1171 { |
1128 Lisp_Object arg = POP; | 1172 Lisp_Object arg = POP; |
1129 TOP = Fget (TOP, arg, Qnil); | 1173 TOP_LVALUE = Fget (TOP, arg, Qnil); |
1130 break; | 1174 break; |
1131 } | 1175 } |
1132 | 1176 |
1133 case Bsub1: | 1177 case Bsub1: |
1178 { | |
1134 #ifdef HAVE_BIGNUM | 1179 #ifdef HAVE_BIGNUM |
1135 TOP = Fsub1 (TOP); | 1180 TOP_LVALUE = Fsub1 (TOP); |
1136 #else | 1181 #else |
1137 TOP = INTP (TOP) ? INT_MINUS1 (TOP) : Fsub1 (TOP); | 1182 Lisp_Object arg = TOP; |
1138 #endif | 1183 TOP_LVALUE = INTP (arg) ? INT_MINUS1 (arg) : Fsub1 (arg); |
1139 break; | 1184 #endif |
1140 | 1185 break; |
1186 } | |
1141 case Badd1: | 1187 case Badd1: |
1188 { | |
1142 #ifdef HAVE_BIGNUM | 1189 #ifdef HAVE_BIGNUM |
1143 TOP = Fadd1 (TOP); | 1190 TOP_LVALUE = Fadd1 (TOP); |
1144 #else | 1191 #else |
1145 TOP = INTP (TOP) ? INT_PLUS1 (TOP) : Fadd1 (TOP); | 1192 Lisp_Object arg = TOP; |
1146 #endif | 1193 TOP_LVALUE = INTP (arg) ? INT_PLUS1 (arg) : Fadd1 (arg); |
1147 break; | 1194 #endif |
1148 | 1195 break; |
1196 } | |
1149 | 1197 |
1150 case Beqlsign: | 1198 case Beqlsign: |
1151 { | 1199 { |
1152 Lisp_Object arg = POP; | 1200 Lisp_Object arg = POP; |
1153 TOP = bytecode_arithcompare (TOP, arg) == 0 ? Qt : Qnil; | 1201 TOP_LVALUE = bytecode_arithcompare (TOP, arg) == 0 ? Qt : Qnil; |
1154 break; | 1202 break; |
1155 } | 1203 } |
1156 | 1204 |
1157 case Bgtr: | 1205 case Bgtr: |
1158 { | 1206 { |
1159 Lisp_Object arg = POP; | 1207 Lisp_Object arg = POP; |
1160 TOP = bytecode_arithcompare (TOP, arg) > 0 ? Qt : Qnil; | 1208 TOP_LVALUE = bytecode_arithcompare (TOP, arg) > 0 ? Qt : Qnil; |
1161 break; | 1209 break; |
1162 } | 1210 } |
1163 | 1211 |
1164 case Blss: | 1212 case Blss: |
1165 { | 1213 { |
1166 Lisp_Object arg = POP; | 1214 Lisp_Object arg = POP; |
1167 TOP = bytecode_arithcompare (TOP, arg) < 0 ? Qt : Qnil; | 1215 TOP_LVALUE = bytecode_arithcompare (TOP, arg) < 0 ? Qt : Qnil; |
1168 break; | 1216 break; |
1169 } | 1217 } |
1170 | 1218 |
1171 case Bleq: | 1219 case Bleq: |
1172 { | 1220 { |
1173 Lisp_Object arg = POP; | 1221 Lisp_Object arg = POP; |
1174 TOP = bytecode_arithcompare (TOP, arg) <= 0 ? Qt : Qnil; | 1222 TOP_LVALUE = bytecode_arithcompare (TOP, arg) <= 0 ? Qt : Qnil; |
1175 break; | 1223 break; |
1176 } | 1224 } |
1177 | 1225 |
1178 case Bgeq: | 1226 case Bgeq: |
1179 { | 1227 { |
1180 Lisp_Object arg = POP; | 1228 Lisp_Object arg = POP; |
1181 TOP = bytecode_arithcompare (TOP, arg) >= 0 ? Qt : Qnil; | 1229 TOP_LVALUE = bytecode_arithcompare (TOP, arg) >= 0 ? Qt : Qnil; |
1182 break; | 1230 break; |
1183 } | 1231 } |
1184 | 1232 |
1185 | 1233 |
1186 case Bnegate: | 1234 case Bnegate: |
1187 TOP = bytecode_negate (TOP); | 1235 TOP_LVALUE = bytecode_negate (TOP); |
1188 break; | 1236 break; |
1189 | 1237 |
1190 case Bnconc: | 1238 case Bnconc: |
1191 DISCARD (1); | 1239 DISCARD (1); |
1192 /* nconc2 GCPROs before calling this. */ | 1240 /* nconc2 GCPROs before calling this. */ |
1193 /* GCPRO_STACK; */ | 1241 /* GCPRO_STACK; */ |
1194 TOP = bytecode_nconc2 (&TOP); | 1242 TOP_LVALUE = TOP; /* Ignore multiple values. */ |
1243 TOP_LVALUE = bytecode_nconc2 (TOP_ADDRESS); | |
1195 break; | 1244 break; |
1196 | 1245 |
1197 case Bplus: | 1246 case Bplus: |
1198 { | 1247 { |
1199 Lisp_Object arg2 = POP; | 1248 Lisp_Object arg2 = POP; |
1200 Lisp_Object arg1 = TOP; | 1249 Lisp_Object arg1 = TOP; |
1201 #ifdef HAVE_BIGNUM | 1250 #ifdef HAVE_BIGNUM |
1202 TOP = bytecode_arithop (arg1, arg2, opcode); | 1251 TOP_LVALUE = bytecode_arithop (arg1, arg2, opcode); |
1203 #else | 1252 #else |
1204 TOP = INTP (arg1) && INTP (arg2) ? | 1253 TOP_LVALUE = INTP (arg1) && INTP (arg2) ? |
1205 INT_PLUS (arg1, arg2) : | 1254 INT_PLUS (arg1, arg2) : |
1206 bytecode_arithop (arg1, arg2, opcode); | 1255 bytecode_arithop (arg1, arg2, opcode); |
1207 #endif | 1256 #endif |
1208 break; | 1257 break; |
1209 } | 1258 } |
1211 case Bdiff: | 1260 case Bdiff: |
1212 { | 1261 { |
1213 Lisp_Object arg2 = POP; | 1262 Lisp_Object arg2 = POP; |
1214 Lisp_Object arg1 = TOP; | 1263 Lisp_Object arg1 = TOP; |
1215 #ifdef HAVE_BIGNUM | 1264 #ifdef HAVE_BIGNUM |
1216 TOP = bytecode_arithop (arg1, arg2, opcode); | 1265 TOP_LVALUE = bytecode_arithop (arg1, arg2, opcode); |
1217 #else | 1266 #else |
1218 TOP = INTP (arg1) && INTP (arg2) ? | 1267 TOP_LVALUE = INTP (arg1) && INTP (arg2) ? |
1219 INT_MINUS (arg1, arg2) : | 1268 INT_MINUS (arg1, arg2) : |
1220 bytecode_arithop (arg1, arg2, opcode); | 1269 bytecode_arithop (arg1, arg2, opcode); |
1221 #endif | 1270 #endif |
1222 break; | 1271 break; |
1223 } | 1272 } |
1226 case Bquo: | 1275 case Bquo: |
1227 case Bmax: | 1276 case Bmax: |
1228 case Bmin: | 1277 case Bmin: |
1229 { | 1278 { |
1230 Lisp_Object arg = POP; | 1279 Lisp_Object arg = POP; |
1231 TOP = bytecode_arithop (TOP, arg, opcode); | 1280 TOP_LVALUE = bytecode_arithop (TOP, arg, opcode); |
1232 break; | 1281 break; |
1233 } | 1282 } |
1234 | 1283 |
1235 case Bpoint: | 1284 case Bpoint: |
1236 PUSH (make_int (BUF_PT (current_buffer))); | 1285 PUSH (make_int (BUF_PT (current_buffer))); |
1237 break; | 1286 break; |
1238 | 1287 |
1239 case Binsert: | 1288 case Binsert: |
1240 /* Says it can GC. */ | 1289 /* Says it can GC. */ |
1241 /* GCPRO_STACK; */ | 1290 /* GCPRO_STACK; */ |
1242 TOP = Finsert (1, &TOP); | 1291 TOP_LVALUE = TOP; /* Ignore multiple values. */ |
1292 TOP_LVALUE = Finsert (1, TOP_ADDRESS); | |
1243 break; | 1293 break; |
1244 | 1294 |
1245 case BinsertN: | 1295 case BinsertN: |
1246 n = READ_UINT_1; | 1296 n = READ_UINT_1; |
1247 DISCARD (n - 1); | 1297 DISCARD (n - 1); |
1248 /* See Binsert. */ | 1298 /* See Binsert. */ |
1249 /* GCPRO_STACK; */ | 1299 /* GCPRO_STACK; */ |
1250 TOP = Finsert (n, &TOP); | 1300 TOP_LVALUE = TOP; /* Ignore multiple values. */ |
1301 TOP_LVALUE = Finsert (n, TOP_ADDRESS); | |
1251 break; | 1302 break; |
1252 | 1303 |
1253 case Baref: | 1304 case Baref: |
1254 { | 1305 { |
1255 Lisp_Object arg = POP; | 1306 Lisp_Object arg = POP; |
1256 TOP = Faref (TOP, arg); | 1307 TOP_LVALUE = Faref (TOP, arg); |
1257 break; | 1308 break; |
1258 } | 1309 } |
1259 | 1310 |
1260 case Bmemq: | 1311 case Bmemq: |
1261 { | 1312 { |
1262 Lisp_Object arg = POP; | 1313 Lisp_Object arg = POP; |
1263 TOP = Fmemq (TOP, arg); | 1314 TOP_LVALUE = Fmemq (TOP, arg); |
1264 break; | 1315 break; |
1265 } | 1316 } |
1266 | 1317 |
1267 case Bset: | 1318 case Bset: |
1268 { | 1319 { |
1269 Lisp_Object arg = POP; | 1320 Lisp_Object arg = POP; |
1270 /* Fset may call magic handlers */ | 1321 /* Fset may call magic handlers */ |
1271 /* GCPRO_STACK; */ | 1322 /* GCPRO_STACK; */ |
1272 TOP = Fset (TOP, arg); | 1323 TOP_LVALUE = Fset (TOP, arg); |
1273 break; | 1324 break; |
1274 } | 1325 } |
1275 | 1326 |
1276 case Bequal: | 1327 case Bequal: |
1277 { | 1328 { |
1278 Lisp_Object arg = POP; | 1329 Lisp_Object arg = POP; |
1279 /* Can QUIT, so can GC, right? */ | 1330 /* Can QUIT, so can GC, right? */ |
1280 /* GCPRO_STACK; */ | 1331 /* GCPRO_STACK; */ |
1281 TOP = Fequal (TOP, arg); | 1332 TOP_LVALUE = Fequal (TOP, arg); |
1282 break; | 1333 break; |
1283 } | 1334 } |
1284 | 1335 |
1285 case Bnthcdr: | 1336 case Bnthcdr: |
1286 { | 1337 { |
1287 Lisp_Object arg = POP; | 1338 Lisp_Object arg = POP; |
1288 TOP = Fnthcdr (TOP, arg); | 1339 TOP_LVALUE = Fnthcdr (TOP, arg); |
1289 break; | 1340 break; |
1290 } | 1341 } |
1291 | 1342 |
1292 case Belt: | 1343 case Belt: |
1293 { | 1344 { |
1294 Lisp_Object arg = POP; | 1345 Lisp_Object arg = POP; |
1295 TOP = Felt (TOP, arg); | 1346 TOP_LVALUE = Felt (TOP, arg); |
1296 break; | 1347 break; |
1297 } | 1348 } |
1298 | 1349 |
1299 case Bmember: | 1350 case Bmember: |
1300 { | 1351 { |
1301 Lisp_Object arg = POP; | 1352 Lisp_Object arg = POP; |
1302 /* Can QUIT, so can GC, right? */ | 1353 /* Can QUIT, so can GC, right? */ |
1303 /* GCPRO_STACK; */ | 1354 /* GCPRO_STACK; */ |
1304 TOP = Fmember (TOP, arg); | 1355 TOP_LVALUE = Fmember (TOP, arg); |
1305 break; | 1356 break; |
1306 } | 1357 } |
1307 | 1358 |
1308 case Bgoto_char: | 1359 case Bgoto_char: |
1309 TOP = Fgoto_char (TOP, Qnil); | 1360 TOP_LVALUE = Fgoto_char (TOP, Qnil); |
1310 break; | 1361 break; |
1311 | 1362 |
1312 case Bcurrent_buffer: | 1363 case Bcurrent_buffer: |
1313 { | 1364 { |
1314 Lisp_Object buffer = wrap_buffer (current_buffer); | 1365 Lisp_Object buffer = wrap_buffer (current_buffer); |
1319 | 1370 |
1320 case Bset_buffer: | 1371 case Bset_buffer: |
1321 /* #### WAG: set-buffer may cause Fset's of buffer locals | 1372 /* #### WAG: set-buffer may cause Fset's of buffer locals |
1322 Didn't prevent crash. :-( */ | 1373 Didn't prevent crash. :-( */ |
1323 /* GCPRO_STACK; */ | 1374 /* GCPRO_STACK; */ |
1324 TOP = Fset_buffer (TOP); | 1375 TOP_LVALUE = Fset_buffer (TOP); |
1325 break; | 1376 break; |
1326 | 1377 |
1327 case Bpoint_max: | 1378 case Bpoint_max: |
1328 PUSH (make_int (BUF_ZV (current_buffer))); | 1379 PUSH (make_int (BUF_ZV (current_buffer))); |
1329 break; | 1380 break; |
1335 case Bskip_chars_forward: | 1386 case Bskip_chars_forward: |
1336 { | 1387 { |
1337 Lisp_Object arg = POP; | 1388 Lisp_Object arg = POP; |
1338 /* Can QUIT, so can GC, right? */ | 1389 /* Can QUIT, so can GC, right? */ |
1339 /* GCPRO_STACK; */ | 1390 /* GCPRO_STACK; */ |
1340 TOP = Fskip_chars_forward (TOP, arg, Qnil); | 1391 TOP_LVALUE = Fskip_chars_forward (TOP, arg, Qnil); |
1341 break; | 1392 break; |
1342 } | 1393 } |
1343 | 1394 |
1344 case Bassq: | 1395 case Bassq: |
1345 { | 1396 { |
1346 Lisp_Object arg = POP; | 1397 Lisp_Object arg = POP; |
1347 TOP = Fassq (TOP, arg); | 1398 TOP_LVALUE = Fassq (TOP, arg); |
1348 break; | 1399 break; |
1349 } | 1400 } |
1350 | 1401 |
1351 case Bsetcar: | 1402 case Bsetcar: |
1352 { | 1403 { |
1353 Lisp_Object arg = POP; | 1404 Lisp_Object arg = POP; |
1354 TOP = Fsetcar (TOP, arg); | 1405 TOP_LVALUE = Fsetcar (TOP, arg); |
1355 break; | 1406 break; |
1356 } | 1407 } |
1357 | 1408 |
1358 case Bsetcdr: | 1409 case Bsetcdr: |
1359 { | 1410 { |
1360 Lisp_Object arg = POP; | 1411 Lisp_Object arg = POP; |
1361 TOP = Fsetcdr (TOP, arg); | 1412 TOP_LVALUE = Fsetcdr (TOP, arg); |
1362 break; | 1413 break; |
1363 } | 1414 } |
1364 | 1415 |
1365 case Bnreverse: | 1416 case Bnreverse: |
1366 TOP = bytecode_nreverse (TOP); | 1417 TOP_LVALUE = bytecode_nreverse (TOP); |
1367 break; | 1418 break; |
1368 | 1419 |
1369 case Bcar_safe: | 1420 case Bcar_safe: |
1370 TOP = CONSP (TOP) ? XCAR (TOP) : Qnil; | 1421 TOP_LVALUE = CONSP (TOP) ? XCAR (TOP) : Qnil; |
1371 break; | 1422 break; |
1372 | 1423 |
1373 case Bcdr_safe: | 1424 case Bcdr_safe: |
1374 TOP = CONSP (TOP) ? XCDR (TOP) : Qnil; | 1425 TOP_LVALUE = CONSP (TOP) ? XCDR (TOP) : Qnil; |
1375 break; | 1426 break; |
1376 | 1427 |
1377 } | 1428 } |
1378 } | 1429 } |
1379 } | 1430 } |
1388 Lisp_Object * | 1439 Lisp_Object * |
1389 execute_rare_opcode (Lisp_Object *stack_ptr, | 1440 execute_rare_opcode (Lisp_Object *stack_ptr, |
1390 const Opbyte *UNUSED (program_ptr), | 1441 const Opbyte *UNUSED (program_ptr), |
1391 Opcode opcode) | 1442 Opcode opcode) |
1392 { | 1443 { |
1444 REGISTER int n; | |
1445 | |
1393 switch (opcode) | 1446 switch (opcode) |
1394 { | 1447 { |
1395 | 1448 |
1396 case Bsave_excursion: | 1449 case Bsave_excursion: |
1397 record_unwind_protect (save_excursion_restore, | 1450 record_unwind_protect (save_excursion_restore, |
1401 case Bsave_window_excursion: | 1454 case Bsave_window_excursion: |
1402 { | 1455 { |
1403 int count = specpdl_depth (); | 1456 int count = specpdl_depth (); |
1404 record_unwind_protect (save_window_excursion_unwind, | 1457 record_unwind_protect (save_window_excursion_unwind, |
1405 call1 (Qcurrent_window_configuration, Qnil)); | 1458 call1 (Qcurrent_window_configuration, Qnil)); |
1406 TOP = Fprogn (TOP); | 1459 TOP_LVALUE = Fprogn (TOP); |
1407 unbind_to (count); | 1460 unbind_to (count); |
1408 break; | 1461 break; |
1409 } | 1462 } |
1410 | 1463 |
1411 case Bsave_restriction: | 1464 case Bsave_restriction: |
1414 break; | 1467 break; |
1415 | 1468 |
1416 case Bcatch: | 1469 case Bcatch: |
1417 { | 1470 { |
1418 Lisp_Object arg = POP; | 1471 Lisp_Object arg = POP; |
1419 TOP = internal_catch (TOP, Feval, arg, 0, 0, 0); | 1472 TOP_LVALUE = internal_catch (TOP, Feval, arg, 0, 0, 0); |
1420 break; | 1473 break; |
1421 } | 1474 } |
1422 | 1475 |
1423 case Bskip_chars_backward: | 1476 case Bskip_chars_backward: |
1424 { | 1477 { |
1425 Lisp_Object arg = POP; | 1478 Lisp_Object arg = POP; |
1426 TOP = Fskip_chars_backward (TOP, arg, Qnil); | 1479 TOP_LVALUE = Fskip_chars_backward (TOP, arg, Qnil); |
1427 break; | 1480 break; |
1428 } | 1481 } |
1429 | 1482 |
1430 case Bunwind_protect: | 1483 case Bunwind_protect: |
1431 record_unwind_protect (Fprogn, POP); | 1484 record_unwind_protect (Fprogn, POP); |
1433 | 1486 |
1434 case Bcondition_case: | 1487 case Bcondition_case: |
1435 { | 1488 { |
1436 Lisp_Object arg2 = POP; /* handlers */ | 1489 Lisp_Object arg2 = POP; /* handlers */ |
1437 Lisp_Object arg1 = POP; /* bodyform */ | 1490 Lisp_Object arg1 = POP; /* bodyform */ |
1438 TOP = condition_case_3 (arg1, TOP, arg2); | 1491 TOP_LVALUE = condition_case_3 (arg1, TOP, arg2); |
1439 break; | 1492 break; |
1440 } | 1493 } |
1441 | 1494 |
1442 case Bset_marker: | 1495 case Bset_marker: |
1443 { | 1496 { |
1444 Lisp_Object arg2 = POP; | 1497 Lisp_Object arg2 = POP; |
1445 Lisp_Object arg1 = POP; | 1498 Lisp_Object arg1 = POP; |
1446 TOP = Fset_marker (TOP, arg1, arg2); | 1499 TOP_LVALUE = Fset_marker (TOP, arg1, arg2); |
1447 break; | 1500 break; |
1448 } | 1501 } |
1449 | 1502 |
1450 case Brem: | 1503 case Brem: |
1451 { | 1504 { |
1452 Lisp_Object arg = POP; | 1505 Lisp_Object arg = POP; |
1453 TOP = Frem (TOP, arg); | 1506 TOP_LVALUE = Frem (TOP, arg); |
1454 break; | 1507 break; |
1455 } | 1508 } |
1456 | 1509 |
1457 case Bmatch_beginning: | 1510 case Bmatch_beginning: |
1458 TOP = Fmatch_beginning (TOP); | 1511 TOP_LVALUE = Fmatch_beginning (TOP); |
1459 break; | 1512 break; |
1460 | 1513 |
1461 case Bmatch_end: | 1514 case Bmatch_end: |
1462 TOP = Fmatch_end (TOP); | 1515 TOP_LVALUE = Fmatch_end (TOP); |
1463 break; | 1516 break; |
1464 | 1517 |
1465 case Bupcase: | 1518 case Bupcase: |
1466 TOP = Fupcase (TOP, Qnil); | 1519 TOP_LVALUE = Fupcase (TOP, Qnil); |
1467 break; | 1520 break; |
1468 | 1521 |
1469 case Bdowncase: | 1522 case Bdowncase: |
1470 TOP = Fdowncase (TOP, Qnil); | 1523 TOP_LVALUE = Fdowncase (TOP, Qnil); |
1471 break; | 1524 break; |
1472 | 1525 |
1473 case Bfset: | 1526 case Bfset: |
1474 { | 1527 { |
1475 Lisp_Object arg = POP; | 1528 Lisp_Object arg = POP; |
1476 TOP = Ffset (TOP, arg); | 1529 TOP_LVALUE = Ffset (TOP, arg); |
1477 break; | 1530 break; |
1478 } | 1531 } |
1479 | 1532 |
1480 case Bstring_equal: | 1533 case Bstring_equal: |
1481 { | 1534 { |
1482 Lisp_Object arg = POP; | 1535 Lisp_Object arg = POP; |
1483 TOP = Fstring_equal (TOP, arg); | 1536 TOP_LVALUE = Fstring_equal (TOP, arg); |
1484 break; | 1537 break; |
1485 } | 1538 } |
1486 | 1539 |
1487 case Bstring_lessp: | 1540 case Bstring_lessp: |
1488 { | 1541 { |
1489 Lisp_Object arg = POP; | 1542 Lisp_Object arg = POP; |
1490 TOP = Fstring_lessp (TOP, arg); | 1543 TOP_LVALUE = Fstring_lessp (TOP, arg); |
1491 break; | 1544 break; |
1492 } | 1545 } |
1493 | 1546 |
1494 case Bsubstring: | 1547 case Bsubstring: |
1495 { | 1548 { |
1496 Lisp_Object arg2 = POP; | 1549 Lisp_Object arg2 = POP; |
1497 Lisp_Object arg1 = POP; | 1550 Lisp_Object arg1 = POP; |
1498 TOP = Fsubstring (TOP, arg1, arg2); | 1551 TOP_LVALUE = Fsubstring (TOP, arg1, arg2); |
1499 break; | 1552 break; |
1500 } | 1553 } |
1501 | 1554 |
1502 case Bcurrent_column: | 1555 case Bcurrent_column: |
1503 PUSH (make_int (current_column (current_buffer))); | 1556 PUSH (make_int (current_column (current_buffer))); |
1504 break; | 1557 break; |
1505 | 1558 |
1506 case Bchar_after: | 1559 case Bchar_after: |
1507 TOP = Fchar_after (TOP, Qnil); | 1560 TOP_LVALUE = Fchar_after (TOP, Qnil); |
1508 break; | 1561 break; |
1509 | 1562 |
1510 case Bindent_to: | 1563 case Bindent_to: |
1511 TOP = Findent_to (TOP, Qnil, Qnil); | 1564 TOP_LVALUE = Findent_to (TOP, Qnil, Qnil); |
1512 break; | 1565 break; |
1513 | 1566 |
1514 case Bwiden: | 1567 case Bwiden: |
1515 PUSH (Fwiden (Qnil)); | 1568 PUSH (Fwiden (Qnil)); |
1516 break; | 1569 break; |
1547 case Binteractive_p: | 1600 case Binteractive_p: |
1548 PUSH (Finteractive_p ()); | 1601 PUSH (Finteractive_p ()); |
1549 break; | 1602 break; |
1550 | 1603 |
1551 case Bforward_char: | 1604 case Bforward_char: |
1552 TOP = Fforward_char (TOP, Qnil); | 1605 TOP_LVALUE = Fforward_char (TOP, Qnil); |
1553 break; | 1606 break; |
1554 | 1607 |
1555 case Bforward_word: | 1608 case Bforward_word: |
1556 TOP = Fforward_word (TOP, Qnil); | 1609 TOP_LVALUE = Fforward_word (TOP, Qnil); |
1557 break; | 1610 break; |
1558 | 1611 |
1559 case Bforward_line: | 1612 case Bforward_line: |
1560 TOP = Fforward_line (TOP, Qnil); | 1613 TOP_LVALUE = Fforward_line (TOP, Qnil); |
1561 break; | 1614 break; |
1562 | 1615 |
1563 case Bchar_syntax: | 1616 case Bchar_syntax: |
1564 TOP = Fchar_syntax (TOP, Qnil); | 1617 TOP_LVALUE = Fchar_syntax (TOP, Qnil); |
1565 break; | 1618 break; |
1566 | 1619 |
1567 case Bbuffer_substring: | 1620 case Bbuffer_substring: |
1568 { | 1621 { |
1569 Lisp_Object arg = POP; | 1622 Lisp_Object arg = POP; |
1570 TOP = Fbuffer_substring (TOP, arg, Qnil); | 1623 TOP_LVALUE = Fbuffer_substring (TOP, arg, Qnil); |
1571 break; | 1624 break; |
1572 } | 1625 } |
1573 | 1626 |
1574 case Bdelete_region: | 1627 case Bdelete_region: |
1575 { | 1628 { |
1576 Lisp_Object arg = POP; | 1629 Lisp_Object arg = POP; |
1577 TOP = Fdelete_region (TOP, arg, Qnil); | 1630 TOP_LVALUE = Fdelete_region (TOP, arg, Qnil); |
1578 break; | 1631 break; |
1579 } | 1632 } |
1580 | 1633 |
1581 case Bnarrow_to_region: | 1634 case Bnarrow_to_region: |
1582 { | 1635 { |
1583 Lisp_Object arg = POP; | 1636 Lisp_Object arg = POP; |
1584 TOP = Fnarrow_to_region (TOP, arg, Qnil); | 1637 TOP_LVALUE = Fnarrow_to_region (TOP, arg, Qnil); |
1585 break; | 1638 break; |
1586 } | 1639 } |
1587 | 1640 |
1588 case Bend_of_line: | 1641 case Bend_of_line: |
1589 TOP = Fend_of_line (TOP, Qnil); | 1642 TOP_LVALUE = Fend_of_line (TOP, Qnil); |
1590 break; | 1643 break; |
1591 | 1644 |
1592 case Btemp_output_buffer_setup: | 1645 case Btemp_output_buffer_setup: |
1593 temp_output_buffer_setup (TOP); | 1646 temp_output_buffer_setup (TOP); |
1594 TOP = Vstandard_output; | 1647 TOP_LVALUE = Vstandard_output; |
1595 break; | 1648 break; |
1596 | 1649 |
1597 case Btemp_output_buffer_show: | 1650 case Btemp_output_buffer_show: |
1598 { | 1651 { |
1599 Lisp_Object arg = POP; | 1652 Lisp_Object arg = POP; |
1600 temp_output_buffer_show (TOP, Qnil); | 1653 temp_output_buffer_show (TOP, Qnil); |
1601 TOP = arg; | 1654 TOP_LVALUE = arg; |
1602 /* GAG ME!! */ | 1655 /* GAG ME!! */ |
1603 /* pop binding of standard-output */ | 1656 /* pop binding of standard-output */ |
1604 unbind_to (specpdl_depth() - 1); | 1657 unbind_to (specpdl_depth() - 1); |
1605 break; | 1658 break; |
1606 } | 1659 } |
1607 | 1660 |
1608 case Bold_eq: | 1661 case Bold_eq: |
1609 { | 1662 { |
1610 Lisp_Object arg = POP; | 1663 Lisp_Object arg = POP; |
1611 TOP = HACKEQ_UNSAFE (TOP, arg) ? Qt : Qnil; | 1664 TOP_LVALUE = HACKEQ_UNSAFE (TOP, arg) ? Qt : Qnil; |
1612 break; | 1665 break; |
1613 } | 1666 } |
1614 | 1667 |
1615 case Bold_memq: | 1668 case Bold_memq: |
1616 { | 1669 { |
1617 Lisp_Object arg = POP; | 1670 Lisp_Object arg = POP; |
1618 TOP = Fold_memq (TOP, arg); | 1671 TOP_LVALUE = Fold_memq (TOP, arg); |
1619 break; | 1672 break; |
1620 } | 1673 } |
1621 | 1674 |
1622 case Bold_equal: | 1675 case Bold_equal: |
1623 { | 1676 { |
1624 Lisp_Object arg = POP; | 1677 Lisp_Object arg = POP; |
1625 TOP = Fold_equal (TOP, arg); | 1678 TOP_LVALUE = Fold_equal (TOP, arg); |
1626 break; | 1679 break; |
1627 } | 1680 } |
1628 | 1681 |
1629 case Bold_member: | 1682 case Bold_member: |
1630 { | 1683 { |
1631 Lisp_Object arg = POP; | 1684 Lisp_Object arg = POP; |
1632 TOP = Fold_member (TOP, arg); | 1685 TOP_LVALUE = Fold_member (TOP, arg); |
1633 break; | 1686 break; |
1634 } | 1687 } |
1635 | 1688 |
1636 case Bold_assq: | 1689 case Bold_assq: |
1637 { | 1690 { |
1638 Lisp_Object arg = POP; | 1691 Lisp_Object arg = POP; |
1639 TOP = Fold_assq (TOP, arg); | 1692 TOP_LVALUE = Fold_assq (TOP, arg); |
1640 break; | 1693 break; |
1694 } | |
1695 | |
1696 case Bbind_multiple_value_limits: | |
1697 { | |
1698 Lisp_Object upper = POP, first = TOP, speccount; | |
1699 | |
1700 CHECK_NATNUM (upper); | |
1701 CHECK_NATNUM (first); | |
1702 | |
1703 speccount = make_int (bind_multiple_value_limits (XINT (first), | |
1704 XINT (upper))); | |
1705 PUSH (upper); | |
1706 PUSH (speccount); | |
1707 break; | |
1708 } | |
1709 | |
1710 case Bmultiple_value_call: | |
1711 { | |
1712 n = XINT (POP); | |
1713 DISCARD_PRESERVING_MULTIPLE_VALUES (n - 1); | |
1714 /* Discard multiple values for the first (function) argument: */ | |
1715 TOP_LVALUE = TOP; | |
1716 TOP_LVALUE = multiple_value_call (n, TOP_ADDRESS); | |
1717 break; | |
1718 } | |
1719 | |
1720 case Bmultiple_value_list_internal: | |
1721 { | |
1722 DISCARD_PRESERVING_MULTIPLE_VALUES (3); | |
1723 TOP_LVALUE = multiple_value_list_internal (4, TOP_ADDRESS); | |
1724 break; | |
1725 } | |
1726 | |
1727 case Bthrow: | |
1728 { | |
1729 Lisp_Object arg = POP_WITH_MULTIPLE_VALUES; | |
1730 | |
1731 /* We never throw to a catch tag that is a multiple value: */ | |
1732 throw_or_bomb_out (TOP, arg, 0, Qnil, Qnil); | |
1733 break; | |
1641 } | 1734 } |
1642 | 1735 |
1643 default: | 1736 default: |
1644 ABORT(); | 1737 ABORT(); |
1645 break; | 1738 break; |