shithub: femtolisp

ref: c48cb65963f0fab8576020a00a04578f1d23e2b9
dir: /opcodes.c/

View raw version
#include "flisp.h"

const Builtin builtins[N_OPCODES] = {
	[OP_SETCAR] = {"set-car!", 2},
	[OP_CDR] = {"cdr", 1},
	[OP_BOOLEANP] = {"boolean?", 1},
	[OP_FUNCTIONP] = {"function?", 1},
	[OP_CADR] = {"cadr", 1},
	[OP_SETCDR] = {"set-cdr!", 2},
	[OP_EQ] = {"eq?", 2},
	[OP_APPLY] = {"apply", -2},
	[OP_NULLP] = {"null?", 1},
	[OP_CONSP] = {"cons?", 1},
	[OP_ATOMP] = {"atom?", 1},
	[OP_ASET] = {"aset!", -3},
	[OP_NOT] = {"not", 1},
	[OP_LIST] = {"list", ANYARGS},
	[OP_CONS] = {"cons", 2},
	[OP_NUMBERP] = {"number?", 1},
	[OP_BOUNDP] = {"bound?", 1},
	[OP_LT] = {"<", 2},
	[OP_VECTORP] = {"vector?", 1},
	[OP_CAR] = {"car", 1},
	[OP_EQV] = {"eqv?", 2},
	[OP_IDIV] = {"div0", 2},
	[OP_FIXNUMP] = {"fixnum?", 1},
	[OP_NUMEQ] = {"=", 2},
	[OP_SYMBOLP] = {"symbol?", 1},
	[OP_BUILTINP] = {"builtin?", 1},
	[OP_SUB] = {"-", -1},
	[OP_COMPARE] = {"compare", 2},
	[OP_FOR] = {"for", 3},
	[OP_MUL] = {"*", ANYARGS},
	[OP_ADD] = {"+", ANYARGS},
	[OP_AREF] = {"aref", -2},
	[OP_DIV] = {"/", -1},
	[OP_VECTOR] = {"vector", ANYARGS},
	[OP_EQUAL] = {"equal?", 2},
};