mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-31 01:20:37 -08:00
(Fbyte_code): Avoid dangerous side effects in NILP argument.
This commit is contained in:
parent
09706e1fc4
commit
21ed6de35b
1 changed files with 50 additions and 34 deletions
|
|
@ -524,15 +524,19 @@ If the third argument is incorrect, Emacs may crash. */)
|
|||
}
|
||||
|
||||
case Bgotoifnil:
|
||||
MAYBE_GC ();
|
||||
op = FETCH2;
|
||||
if (NILP (POP))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
CHECK_RANGE (op);
|
||||
stack.pc = stack.byte_string_start + op;
|
||||
}
|
||||
break;
|
||||
{
|
||||
Lisp_Object v1;
|
||||
MAYBE_GC ();
|
||||
op = FETCH2;
|
||||
v1 = POP;
|
||||
if (NILP (v1))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
CHECK_RANGE (op);
|
||||
stack.pc = stack.byte_string_start + op;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case Bcar:
|
||||
{
|
||||
|
|
@ -730,15 +734,19 @@ If the third argument is incorrect, Emacs may crash. */)
|
|||
break;
|
||||
|
||||
case Bgotoifnonnil:
|
||||
MAYBE_GC ();
|
||||
op = FETCH2;
|
||||
if (!NILP (POP))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
CHECK_RANGE (op);
|
||||
stack.pc = stack.byte_string_start + op;
|
||||
}
|
||||
break;
|
||||
{
|
||||
Lisp_Object v1;
|
||||
MAYBE_GC ();
|
||||
op = FETCH2;
|
||||
v1 = POP;
|
||||
if (!NILP (v1))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
CHECK_RANGE (op);
|
||||
stack.pc = stack.byte_string_start + op;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case Bgotoifnilelsepop:
|
||||
MAYBE_GC ();
|
||||
|
|
@ -771,24 +779,32 @@ If the third argument is incorrect, Emacs may crash. */)
|
|||
break;
|
||||
|
||||
case BRgotoifnil:
|
||||
MAYBE_GC ();
|
||||
if (NILP (POP))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
stack.pc += (int) *stack.pc - 128;
|
||||
}
|
||||
stack.pc++;
|
||||
break;
|
||||
{
|
||||
Lisp_Object v1;
|
||||
MAYBE_GC ();
|
||||
v1 = POP;
|
||||
if (NILP (v1))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
stack.pc += (int) *stack.pc - 128;
|
||||
}
|
||||
stack.pc++;
|
||||
break;
|
||||
}
|
||||
|
||||
case BRgotoifnonnil:
|
||||
MAYBE_GC ();
|
||||
if (!NILP (POP))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
stack.pc += (int) *stack.pc - 128;
|
||||
}
|
||||
stack.pc++;
|
||||
break;
|
||||
{
|
||||
Lisp_Object v1;
|
||||
MAYBE_GC ();
|
||||
v1 = POP;
|
||||
if (!NILP (v1))
|
||||
{
|
||||
BYTE_CODE_QUIT;
|
||||
stack.pc += (int) *stack.pc - 128;
|
||||
}
|
||||
stack.pc++;
|
||||
break;
|
||||
}
|
||||
|
||||
case BRgotoifnilelsepop:
|
||||
MAYBE_GC ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue