(Fbyte_code): Use type test macros.
This commit is contained in:
parent
d50d3dc8e3
commit
617bd3f62f
1 changed files with 13 additions and 13 deletions
|
@ -280,7 +280,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
register unsigned char *strbeg;
|
register unsigned char *strbeg;
|
||||||
|
|
||||||
CHECK_STRING (bytestr, 0);
|
CHECK_STRING (bytestr, 0);
|
||||||
if (XTYPE (vector) != Lisp_Vector)
|
if (!VECTORP (vector))
|
||||||
vector = wrong_type_argument (Qvectorp, vector);
|
vector = wrong_type_argument (Qvectorp, vector);
|
||||||
CHECK_NUMBER (maxdepth, 2);
|
CHECK_NUMBER (maxdepth, 2);
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
op = op - Bvarref;
|
op = op - Bvarref;
|
||||||
varref:
|
varref:
|
||||||
v1 = vectorp[op];
|
v1 = vectorp[op];
|
||||||
if (XTYPE (v1) != Lisp_Symbol)
|
if (!SYMBOLP (v1))
|
||||||
v2 = Fsymbol_value (v1);
|
v2 = Fsymbol_value (v1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -407,11 +407,11 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
docall:
|
docall:
|
||||||
DISCARD (op);
|
DISCARD (op);
|
||||||
#ifdef BYTE_CODE_METER
|
#ifdef BYTE_CODE_METER
|
||||||
if (byte_metering_on && XTYPE (TOP) == Lisp_Symbol)
|
if (byte_metering_on && SYMBOLP (TOP))
|
||||||
{
|
{
|
||||||
v1 = TOP;
|
v1 = TOP;
|
||||||
v2 = Fget (v1, Qbyte_code_meter);
|
v2 = Fget (v1, Qbyte_code_meter);
|
||||||
if (XTYPE (v2) == Lisp_Int
|
if (INTEGERP (v2)
|
||||||
&& XINT (v2) != ((1<<VALBITS)-1))
|
&& XINT (v2) != ((1<<VALBITS)-1))
|
||||||
{
|
{
|
||||||
XSETINT (v2, XINT (v2) + 1);
|
XSETINT (v2, XINT (v2) + 1);
|
||||||
|
@ -611,7 +611,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
goto docar;
|
goto docar;
|
||||||
|
|
||||||
case Bsymbolp:
|
case Bsymbolp:
|
||||||
TOP = XTYPE (TOP) == Lisp_Symbol ? Qt : Qnil;
|
TOP = SYMBOLP (TOP) ? Qt : Qnil;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Bconsp:
|
case Bconsp:
|
||||||
|
@ -619,7 +619,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Bstringp:
|
case Bstringp:
|
||||||
TOP = XTYPE (TOP) == Lisp_String ? Qt : Qnil;
|
TOP = STRINGP (TOP) ? Qt : Qnil;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Blistp:
|
case Blistp:
|
||||||
|
@ -750,7 +750,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
|
|
||||||
case Bsub1:
|
case Bsub1:
|
||||||
v1 = TOP;
|
v1 = TOP;
|
||||||
if (XTYPE (v1) == Lisp_Int)
|
if (INTEGERP (v1))
|
||||||
{
|
{
|
||||||
XSETINT (v1, XINT (v1) - 1);
|
XSETINT (v1, XINT (v1) - 1);
|
||||||
TOP = v1;
|
TOP = v1;
|
||||||
|
@ -761,7 +761,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
|
|
||||||
case Badd1:
|
case Badd1:
|
||||||
v1 = TOP;
|
v1 = TOP;
|
||||||
if (XTYPE (v1) == Lisp_Int)
|
if (INTEGERP (v1))
|
||||||
{
|
{
|
||||||
XSETINT (v1, XINT (v1) + 1);
|
XSETINT (v1, XINT (v1) + 1);
|
||||||
TOP = v1;
|
TOP = v1;
|
||||||
|
@ -804,7 +804,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
|
|
||||||
case Bnegate:
|
case Bnegate:
|
||||||
v1 = TOP;
|
v1 = TOP;
|
||||||
if (XTYPE (v1) == Lisp_Int)
|
if (INTEGERP (v1))
|
||||||
{
|
{
|
||||||
XSETINT (v1, - XINT (v1));
|
XSETINT (v1, - XINT (v1));
|
||||||
TOP = v1;
|
TOP = v1;
|
||||||
|
@ -1021,7 +1021,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Belt:
|
case Belt:
|
||||||
if (XTYPE (TOP) == Lisp_Cons)
|
if (CONSP (TOP))
|
||||||
{
|
{
|
||||||
/* Exchange args and then do nth. */
|
/* Exchange args and then do nth. */
|
||||||
v2 = POP;
|
v2 = POP;
|
||||||
|
@ -1058,7 +1058,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
|
|
||||||
case Bcar_safe:
|
case Bcar_safe:
|
||||||
v1 = TOP;
|
v1 = TOP;
|
||||||
if (XTYPE (v1) == Lisp_Cons)
|
if (CONSP (v1))
|
||||||
TOP = XCONS (v1)->car;
|
TOP = XCONS (v1)->car;
|
||||||
else
|
else
|
||||||
TOP = Qnil;
|
TOP = Qnil;
|
||||||
|
@ -1066,7 +1066,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
|
|
||||||
case Bcdr_safe:
|
case Bcdr_safe:
|
||||||
v1 = TOP;
|
v1 = TOP;
|
||||||
if (XTYPE (v1) == Lisp_Cons)
|
if (CONSP (v1))
|
||||||
TOP = XCONS (v1)->cdr;
|
TOP = XCONS (v1)->cdr;
|
||||||
else
|
else
|
||||||
TOP = Qnil;
|
TOP = Qnil;
|
||||||
|
@ -1082,7 +1082,7 @@ If the third argument is incorrect, Emacs may crash.")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Bintegerp:
|
case Bintegerp:
|
||||||
TOP = XTYPE (TOP) == Lisp_Int ? Qt : Qnil;
|
TOP = INTEGERP (TOP) ? Qt : Qnil;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef BYTE_CODE_SAFE
|
#ifdef BYTE_CODE_SAFE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue