1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 07:30:21 +00:00

Cleanup typeof.c (#156)

* instanceof: Remove unused local var `type`.

* Remove unused N_OP_dtest.

This isn't used to actually implement the op. That is done via
the `DTEST` macro defined in `inc/inlineC.h` which duplicated
this code with minor differences in how it signals the error.
This commit is contained in:
Bruce Mitchener 2021-01-04 01:33:31 +07:00 committed by GitHub
parent 907e86c8d9
commit 1d9c9eaa3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,29 +28,6 @@
#include "typeofdefs.h"
/************************************************************************/
/* */
/* N _ O P _ d t e s t */
/* */
/* Check for type conformity, else error. */
/* */
/************************************************************************/
LispPTR N_OP_dtest(register LispPTR tos, register int atom_index) {
register struct dtd *dtd68k;
for (dtd68k = (struct dtd *)GetDTD(GetTypeNumber(tos));
#ifdef BIGVM
atom_index != dtd68k->dtd_name;
#else
atom_index != dtd68k->dtd_namelo + (dtd68k->dtd_namehi << 16);
#endif /* BIGVM */
dtd68k = (struct dtd *)GetDTD(dtd68k->dtd_supertype)) {
if (dtd68k->dtd_supertype == 0) ERROR_EXIT(tos);
}
return (tos);
} /* OP_DTEST END */
/************************************************************************/
/* */
/* N _ O P _ i n s t a n c e p */
@ -60,7 +37,6 @@ LispPTR N_OP_dtest(register LispPTR tos, register int atom_index) {
/************************************************************************/
LispPTR N_OP_instancep(register LispPTR tos, register int atom_index) {
register unsigned int type;
register struct dtd *dtd68k;
for (dtd68k = (struct dtd *)GetDTD(GetTypeNumber(tos));