Lisp_Object
exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
- Lisp_Object args_template, int nargs, Lisp_Object *args)
+ Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args)
{
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
#ifdef BYTE_CODE_METER
int this_op = 0;
int prev_op;
/* Lisp_Object v1, v2; */
Lisp_Object *vectorp;
#ifdef BYTE_CODE_SAFE
- int const_length;
+ ptrdiff_t const_length;
Lisp_Object *stacke;
int bytestr_length;
#endif
CHECK_STRING (bytestr);
CHECK_VECTOR (vector);
- CHECK_NUMBER (maxdepth);
+ CHECK_NATNUM (maxdepth);
#ifdef BYTE_CODE_SAFE
const_length = ASIZE (vector);
if (INTEGERP (args_template))
{
- int at = XINT (args_template);
+ EMACS_INT at = XINT (args_template);
int rest = at & 128;
int mandatory = at & 127;
- int nonrest = at >> 8;
+ EMACS_INT nonrest = at >> 8;
eassert (mandatory <= nonrest);
if (nargs <= nonrest)
{
- int i;
+ EMACS_INT i;
for (i = 0 ; i < nargs; i++, args++)
PUSH (*args);
if (nargs < mandatory)
}
else if (rest)
{
- int i;
+ ptrdiff_t i;
for (i = 0 ; i < nonrest; i++, args++)
PUSH (*args);
PUSH (Flist (nargs - nonrest, args));
case Bsave_window_excursion: /* Obsolete since 24.1. */
{
- register int count1 = SPECPDL_INDEX ();
+ register ptrdiff_t count1 = SPECPDL_INDEX ();
record_unwind_protect (Fset_window_configuration,
Fcurrent_window_configuration (Qnil));
BEFORE_POTENTIAL_GC ();
case Bnth:
{
Lisp_Object v1, v2;
+ EMACS_INT n;
BEFORE_POTENTIAL_GC ();
v1 = POP;
v2 = TOP;
CHECK_NUMBER (v2);
- op = XINT (v2);
+ n = XINT (v2);
immediate_quit = 1;
- while (--op >= 0 && CONSP (v1))
+ while (--n >= 0 && CONSP (v1))
v1 = XCDR (v1);
immediate_quit = 0;
TOP = CAR (v1);
if (CONSP (TOP))
{
/* Exchange args and then do nth. */
+ EMACS_INT n;
BEFORE_POTENTIAL_GC ();
v2 = POP;
v1 = TOP;
CHECK_NUMBER (v2);
AFTER_POTENTIAL_GC ();
- op = XINT (v2);
+ n = XINT (v2);
immediate_quit = 1;
- while (--op >= 0 && CONSP (v1))
+ while (--n >= 0 && CONSP (v1))
v1 = XCDR (v1);
immediate_quit = 0;
TOP = CAR (v1);
void
syms_of_bytecode (void)
{
- Qbytecode = intern_c_string ("byte-code");
- staticpro (&Qbytecode);
+ DEFSYM (Qbytecode, "byte-code");
defsubr (&Sbyte_code);
byte_metering_on = 0;
Vbyte_code_meter = Fmake_vector (make_number (256), make_number (0));
- Qbyte_code_meter = intern_c_string ("byte-code-meter");
- staticpro (&Qbyte_code_meter);
+ DEFSYM (Qbyte_code_meter, "byte-code-meter");
{
int i = 256;
while (i--)