X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fbytecode.c;h=8a2c963e9e30bb7e21be4bdd000ce4726ea3e522;hb=e4092ce710193e23052612e97aa7815e547f6461;hp=b0ff4e0d0e206397527aabcc90545567e497c32d;hpb=3890a2e3064a7f562107c58e59d928284ec04741;p=chise%2Fxemacs-chise.git diff --git a/src/bytecode.c b/src/bytecode.c index b0ff4e0..8a2c963 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -56,8 +56,6 @@ by Hallvard: #include "opaque.h" #include "syntax.h" -#include - EXFUN (Ffetch_bytecode, 1); Lisp_Object Qbyte_code, Qcompiled_functionp, Qinvalid_byte_code; @@ -473,7 +471,6 @@ Lisp_Object funcall_compiled_function (Lisp_Object fun, int nargs, Lisp_Object args[]) { /* This function can GC */ - Lisp_Object symbol, tail; int speccount = specpdl_depth(); REGISTER int i = 0; Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun); @@ -488,24 +485,26 @@ funcall_compiled_function (Lisp_Object fun, int nargs, Lisp_Object args[]) and local variables of fun. So just reserve it once. */ SPECPDL_RESERVE (f->specpdl_depth); - /* Fmake_byte_code() guaranteed that f->arglist is a valid list - containing only non-constant symbols. */ - LIST_LOOP_3 (symbol, f->arglist, tail) - { - if (EQ (symbol, Qand_rest)) - { - tail = XCDR (tail); - symbol = XCAR (tail); - SPECBIND_FAST_UNSAFE (symbol, Flist (nargs - i, &args[i])); - goto run_code; - } - else if (EQ (symbol, Qand_optional)) - optional = 1; - else if (i == nargs && !optional) - goto wrong_number_of_arguments; - else - SPECBIND_FAST_UNSAFE (symbol, i < nargs ? args[i++] : Qnil); - } + { + /* Fmake_byte_code() guaranteed that f->arglist is a valid list + containing only non-constant symbols. */ + LIST_LOOP_3 (symbol, f->arglist, tail) + { + if (EQ (symbol, Qand_rest)) + { + tail = XCDR (tail); + symbol = XCAR (tail); + SPECBIND_FAST_UNSAFE (symbol, Flist (nargs - i, &args[i])); + goto run_code; + } + else if (EQ (symbol, Qand_optional)) + optional = 1; + else if (i == nargs && !optional) + goto wrong_number_of_arguments; + else + SPECBIND_FAST_UNSAFE (symbol, i < nargs ? args[i++] : Qnil); + } + } if (i < nargs) goto wrong_number_of_arguments; @@ -2265,7 +2264,7 @@ Return the constants vector of the compiled-function object FUNCTION. } DEFUN ("compiled-function-stack-depth", Fcompiled_function_stack_depth, 1, 1, 0, /* -Return the max stack depth of the compiled-function object FUNCTION. +Return the maximum stack depth of the compiled-function object FUNCTION. */ (function)) { @@ -2412,8 +2411,7 @@ syms_of_bytecode (void) { INIT_LRECORD_IMPLEMENTATION (compiled_function); - deferror (&Qinvalid_byte_code, "invalid-byte-code", - "Invalid byte code", Qerror); + DEFERROR_STANDARD (Qinvalid_byte_code, Qinvalid_state); defsymbol (&Qbyte_code, "byte-code"); defsymbol (&Qcompiled_functionp, "compiled-function-p");