示例#1
0
文件: lisp421.c 项目: hoelzl/Clicc
void rt_copy_struct(CL_FORM *base)
{
	COPY(ARG(0), ARG(2));
	COPY(ARG(1), ARG(3));
	rt_struct_typep(ARG(2));
	if(CL_TRUEP(ARG(2)))
	{
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(2));	/* NO_STRUCT */
		COPY(ARG(0), ARG(3));
		COPY(ARG(1), ARG(4));
		Ferror(ARG(2), 3);
	}
	LOAD_FIXNUM(ARG(3), AR_SIZE(GET_FORM(ARG(0))), ARG(2));
	COPY(ARG(2), ARG(3));
	rt_new_struct(ARG(3));
	COPY(ARG(1), OFFSET(AR_BASE(GET_FORM(ARG(3))), -1 + 1));
	LOAD_FIXNUM(ARG(4), 0, ARG(4));
	M1_1:;
	COPY(ARG(4), ARG(5));
	COPY(ARG(2), ARG(6));
	Fge(ARG(5), 2);
	if(CL_TRUEP(ARG(5)))
	{
		COPY(ARG(3), ARG(0));
		goto RETURN1;
	}
	COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), GET_FIXNUM(ARG(4)) + 1), ARG(5));
	COPY(ARG(5), OFFSET(AR_BASE(GET_FORM(ARG(3))), GET_FIXNUM(ARG(4)) + 1));
	F1plus(ARG(4));
	goto M1_1;
	RETURN1:;
}
示例#2
0
文件: lisp355.c 项目: plops/clicc
static void Z124_lambda(CL_FORM *base)
{
	if(CL_SMSTRP(ARG(1)))
	{
		COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(2));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
		Ffuncall(ARG(2), 2);
		COPY(ARG(2), ARG(0));
	}
	else
	{
		if(CL_CONSP(ARG(1)))
		{
			COPY(GET_CAR(ARG(1)), ARG(2));
			if(CL_SYMBOLP(ARG(2)) && GET_SYMBOL(ARG(2)) == SYMBOL(Slisp, 255))	/* CHARACTER-SET */
			{
				LOAD_SYMBOL(SYMBOL(Slisp, 255), ARG(3));	/* CHARACTER-SET */
				COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(4));
				COPY(GET_CDR(ARG(1)), ARG(5));
				Ffuncall(ARG(4), 2);
				mv_count = 1;
				ALLOC_CONS(ARG(5), ARG(3), ARG(4), ARG(0));
			}
			else
			{
				COPY(ARG(1), ARG(0));
			}
		}
		else
		{
			COPY(ARG(1), ARG(0));
		}
	}
}
示例#3
0
文件: pvref.c 项目: hoelzl/Clicc
void pvref(CL_FORM *base)
{
	if(CL_FIXNUMP(ARG(1)))
	{
		LOAD_FIXNUM(ARG(2), 0, ARG(2));
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		F1minus(ARG(4));
		Fle(ARG(2), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(2)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(2));	/* OUT_OF_RANGE */
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		Ferror(ARG(2), 3);
	}
	rt_pvref(ARG(0));
}
示例#4
0
void Fslot_boundp(CL_FORM *base)
{
	if(CL_INSTANCEP(ARG(0)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), -1 + 1), ARG(2));
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&KClisp[238], ARG(2));	/* ~S ist not a valid argument for CLASS-OF, ~
              these have been restricted to instances of user-defined-classes. */
		COPY(ARG(0), ARG(3));
		Ferror(ARG(2), 2);
	}
	COPY(OFFSET(AR_BASE(GET_FORM(ARG(2))), 3 + 1), ARG(2));
	COPY(ARG(1), ARG(3));
	COPY(ARG(2), ARG(4));
	LOAD_SYMBOL(SYMBOL(Slisp, 209), ARG(5));	/* KEY */
	LOAD_GLOBFUN(&CFthird, ARG(6));
	Fposition(ARG(3), 4);
	if(CL_TRUEP(ARG(3)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), GET_FIXNUM(ARG(3)) + 1), ARG(4));
		LOAD_BOOL(CL_UNBOUNDP(ARG(4)), ARG(4));
		if(CL_TRUEP(ARG(4)))
		{
			LOAD_NIL(ARG(0));
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
		}
	}
	else
	{
		if(CL_INSTANCEP(ARG(0)))
		{
			COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), -1 + 1), ARG(4));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[238], ARG(4));	/* ~S ist not a valid argument for CLASS-OF, ~
              these have been restricted to instances of user-defined-classes. */
			COPY(ARG(0), ARG(5));
			Ferror(ARG(4), 2);
		}
		LOAD_SMSTR((CL_FORM *)&KClisp[234], ARG(5));	/* ~S: The slot ~s is missing from the object ~s of class ~s. */
		LOAD_SYMBOL(SYMBOL(Slisp, 201), ARG(6));	/* SLOT-BOUNDP */
		COPY(ARG(1), ARG(7));
		COPY(ARG(0), ARG(8));
		COPY(ARG(4), ARG(9));
		Ferror(ARG(5), 5);
	}
}
示例#5
0
文件: lisp159.c 项目: hoelzl/Clicc
static void Z70_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(1));
	COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(2));
	Flt(ARG(1), 2);
	if(CL_TRUEP(ARG(1)))
	{
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(1));
		Fstringp(ARG(1));
		if(CL_TRUEP(ARG(1)))
		{
		}
		else
		{
			COPY(SYMVAL(Slisp, 58), ARG(1));	/* WRONG_TYPE */
			COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(2));
			LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(3));	/* STRING */
			Ferror(ARG(1), 3);
		}
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(1));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(2));
		Frow_major_aref(ARG(1));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(2));
		F1plus(ARG(2));
		COPY(ARG(2), INDIRECT(GET_FORM(ARG(0)) + 5));
		COPY(ARG(1), ARG(0));
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
示例#6
0
文件: lisp192.c 项目: plops/clicc
static void Z86_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(2));
	if(CL_CONSP(ARG(2)))
	{
		COPY(GET_CAR(ARG(2)), ARG(2));
	}
	else
	{
		if(CL_TRUEP(ARG(2)))
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(3));	/* ~a is not a list */
			COPY(ARG(2), ARG(4));
			Ferror(ARG(3), 2);
		}
		else
		{
			LOAD_NIL(ARG(2));
		}
	}
	stream_unreadc(ARG(2));
	COPY(ARG(1), ARG(3));
	Ffuncall(ARG(2), 2);
	COPY(ARG(2), ARG(0));
}
示例#7
0
文件: lisp159.c 项目: hoelzl/Clicc
static void Z67_lambda(CL_FORM *base)
{
	COPY(ARG(1), ARG(2));
	COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(3));
	Fle(ARG(2), 2);
	if(CL_TRUEP(ARG(2)))
	{
		COPY(ARG(1), INDIRECT(GET_FORM(ARG(0)) + 3));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(0));
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&Kmake_string_input_stream1[4], ARG(2));	/* illegal position */
		Ferror(ARG(2), 1);
	}
}
示例#8
0
文件: lisp177.c 项目: hoelzl/Clicc
static void Z77_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(2));
	if(CL_SYMBOLP(ARG(2)))
	{
		COPY(SYM_VALUE(ARG(2)), ARG(2));
	}
	else
	{
		if(CL_TRUEP(ARG(2)))
		{
			COPY(SYMVAL(Slisp, 676), ARG(3));	/* SYM_EXPECTED */
			COPY(ARG(2), ARG(4));
			Ferror(ARG(3), 2);
		}
		else
		{
			LOAD_NIL(ARG(2));
		}
	}
	stream_unreadc(ARG(2));
	COPY(ARG(1), ARG(3));
	Ffuncall(ARG(2), 2);
	COPY(ARG(2), ARG(0));
}
示例#9
0
文件: lisp72.c 项目: plops/clicc
static void Z36_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
	COPY(ARG(2), ARG(4));
	Ffuncall(ARG(3), 2);
	COPY(ARG(3), ARG(0));
}
示例#10
0
文件: lisp428.c 项目: plops/clicc
void rt_struct_typep(CL_FORM *base)
{
	if(CL_STRUCTP(ARG(0)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), -1 + 1), ARG(2));
		M1_1:;
		if(EQ(ARG(1), ARG(2)))
		{
			goto RETURN1;
		}
		COPY(ARG(2), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 148), ARG(3));	/* INCLUDED-STRUCT */
		LOAD_NIL(ARG(4));
		get1(ARG(2));
		if(CL_TRUEP(ARG(2)))
		{
		}
		else
		{
			LOAD_NIL(ARG(0));
			goto RETURN1;
		}
		goto M1_1;
		RETURN1:;
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
示例#11
0
文件: Flength.c 项目: hoelzl/Clicc
void Flength(CL_FORM *base)
{
	if(CL_TRUEP(ARG(0)))
	{
		if(CL_CONSP(ARG(0)))
		{
			LOAD_FIXNUM(ARG(1), 0, ARG(1));
			COPY(ARG(0), ARG(2));
			M1_1:;
			if(CL_ATOMP(ARG(2)))
			{
				goto RETURN1;
			}
			F1plus(ARG(1));
			COPY(ARG(2), ARG(3));
			COPY(GET_CDR(ARG(3)), ARG(2));
			goto M1_1;
			RETURN1:;
			COPY(ARG(1), ARG(0));
		}
		else
		{
			if(CL_SMVECP(ARG(0)))
			{
				LOAD_FIXNUM(ARG(2), AR_SIZE(GET_FORM(ARG(0))), ARG(0));
			}
			else
			{
				COPY(ARG(0), ARG(1));
				LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(2));	/* COMPLEX-VECTOR */
				rt_struct_typep(ARG(1));
				if(CL_TRUEP(ARG(1)))
				{
					COPY(ARG(0), ARG(1));
					complex_vector_fillptr(ARG(1));
					Fminusp(ARG(1));
					if(CL_TRUEP(ARG(1)))
					{
						complex_vector_length(ARG(0));
					}
					else
					{
						complex_vector_fillptr(ARG(0));
					}
				}
				else
				{
					COPY(SYMVAL(Slisp, 58), ARG(1));	/* WRONG_TYPE */
					COPY(ARG(0), ARG(2));
					LOAD_SYMBOL(SYMBOL(Slisp, 36), ARG(3));	/* SEQUENCE */
					Ferror(ARG(1), 3);
				}
			}
		}
	}
	else
	{
		LOAD_FIXNUM(ARG(1), 0, ARG(0));
	}
}
示例#12
0
文件: lisp463.c 项目: hoelzl/Clicc
static void Z133_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(2));
	COPY(ARG(1), ARG(3));
	find_symbol1(ARG(2));
	COPY(&mv_buf[0], ARG(3));
	{
		int nargs;
		nargs = 2;
		mv_count = 1;
		{
			switch(nargs)
			{
				case 0:
				LOAD_NIL(ARG(2));
				case 1:
				LOAD_NIL(ARG(3));
				nargs = 2;
			}
			LOAD_CONS((CL_FORM *)&KClisp[88], ARG(4));
			COPY(ARG(3), ARG(5));
			COPY(ARG(4), ARG(6));
			LOAD_NIL(ARG(7));
			LOAD_NIL(ARG(8));
			LOAD_NIL(ARG(9));
			member1(ARG(5));
			if(CL_TRUEP(ARG(5)))
			{
				COPY(ARG(2), ARG(4));
				COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(5));
				COPY(ARG(4), ARG(6));
				COPY(ARG(5), ARG(7));
				LOAD_NIL(ARG(8));
				LOAD_NIL(ARG(9));
				LOAD_NIL(ARG(10));
				adjoin1(ARG(6));
				COPY(ARG(6), INDIRECT(GET_FORM(ARG(0)) + 3));
				COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(0));
			}
			else
			{
				LOAD_NIL(ARG(0));
			}
		}
	}
}
示例#13
0
文件: set_pvref.c 项目: hoelzl/Clicc
void set_pvref(CL_FORM *base)
{
	if(CL_FIXNUMP(ARG(2)))
	{
		LOAD_FIXNUM(ARG(3), 0, ARG(3));
		COPY(ARG(2), ARG(4));
		LOAD_FIXNUM(ARG(6), AR_SIZE(GET_FORM(ARG(1))), ARG(5));
		F1minus(ARG(5));
		Fle(ARG(3), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(3));	/* OUT_OF_RANGE */
		COPY(ARG(2), ARG(4));
		LOAD_FIXNUM(ARG(6), AR_SIZE(GET_FORM(ARG(1))), ARG(5));
		Ferror(ARG(3), 3);
	}
	COPY(ARG(0), ARG(3));
	COPY(ARG(1), ARG(4));
	rt_plain_vector_element_code(ARG(4));
	type_code_p(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&Kset_pvref[0], ARG(3));	/* Can't store ~A in a vector of type ~A */
		COPY(ARG(0), ARG(4));
		COPY(ARG(1), ARG(5));
		rt_plain_vector_element_code(ARG(5));
		Ferror(ARG(3), 3);
	}
	rt_set_pvref(ARG(0));
}
示例#14
0
文件: Fsvref.c 项目: hoelzl/Clicc
void Fsvref(CL_FORM *base)
{
	if(CL_SMVEC_T_P(ARG(0)))
	{
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(2));	/* WRONG_TYPE */
		COPY(ARG(0), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 41), ARG(4));	/* SIMPLE-VECTOR */
		Ferror(ARG(2), 3);
	}
	if(CL_FIXNUMP(ARG(1)))
	{
		LOAD_FIXNUM(ARG(2), 0, ARG(2));
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		F1minus(ARG(4));
		Fle(ARG(2), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(2)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(2));	/* OUT_OF_RANGE */
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		Ferror(ARG(2), 3);
	}
	COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), GET_FIXNUM(ARG(1))), ARG(0));
}
示例#15
0
文件: lisp71.c 项目: plops/clicc
static void Z35_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
	COPY(ARG(2), ARG(4));
	Ffuncall(ARG(3), 2);
	mv_count = 1;
	if(CL_TRUEP(ARG(3)))
	{
		LOAD_NIL(ARG(0));
	}
	else
	{
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
	}
}
示例#16
0
文件: lisp192.c 项目: plops/clicc
static void Z87_readc(CL_FORM *base)
{
	if(CL_TRUEP(INDIRECT(GET_FORM(ARG(0)) + 3)))
	{
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(1));
		if(CL_CONSP(ARG(1)))
		{
			COPY(GET_CAR(ARG(1)), ARG(1));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(2));	/* ~a is not a list */
			COPY(ARG(1), ARG(3));
			Ferror(ARG(2), 2);
		}
		stream_readc(ARG(1));
		Ffuncall(ARG(1), 1);
		mv_count = 1;
		if(CL_TRUEP(ARG(1)))
		{
			COPY(ARG(1), ARG(0));
		}
		else
		{
			if(CL_CONSP(INDIRECT(GET_FORM(ARG(0)) + 3)))
			{
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(2));	/* ~a is not a list */
				COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
				Ferror(ARG(2), 2);
			}
			COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(2));
			COPY(ARG(2), ARG(3));
			if(CL_CONSP(ARG(3)))
			{
				COPY(GET_CDR(ARG(3)), INDIRECT(GET_FORM(ARG(0)) + 3));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(4));	/* ~a is not a list */
				COPY(ARG(3), ARG(5));
				Ferror(ARG(4), 2);
			}
			COPY(ARG(0), ARG(2));
			Z87_readc(ARG(2));
			COPY(ARG(2), ARG(0));
		}
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
示例#17
0
文件: lisp498.c 项目: plops/clicc
void hash_table_array(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 389), ARG(2));	/* HASH-TABLE */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 5 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 342), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 389), ARG(3));	/* HASH-TABLE */
		Ferror(ARG(1), 3);
	}
}
示例#18
0
文件: lisp510.c 项目: hoelzl/Clicc
void readtable_dispatch(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(2));	/* READTABLE */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 1 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(3));	/* READTABLE */
		Ferror(ARG(1), 3);
	}
}
示例#19
0
文件: lisp333.c 项目: hoelzl/Clicc
void Ppathname_directory(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 234), ARG(2));	/* PATHNAME */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 2 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 234), ARG(3));	/* PATHNAME */
		Ferror(ARG(1), 3);
	}
}
示例#20
0
文件: lisp341.c 项目: plops/clicc
void pattern_pieces(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 248), ARG(2));	/* PATTERN */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 0 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 342), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 248), ARG(3));	/* PATTERN */
		Ferror(ARG(1), 3);
	}
}
示例#21
0
文件: lisp221.c 项目: plops/clicc
void set_complex_vector_fillptr(CL_FORM *base)
{
	LOAD_SMALLFIXNUM(3, ARG(2));
	COPY(ARG(1), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(4));	/* COMPLEX-VECTOR */
	rt_struct_typep(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
		COPY(ARG(0), OFFSET(AR_BASE(GET_FORM(ARG(1))), GET_FIXNUM(ARG(2)) + 1));
	}
	else
	{
		COPY(SYMVAL(Slisp, 342), ARG(0));	/* NO_STRUCT */
		LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(2));	/* COMPLEX-VECTOR */
		Ferror(ARG(0), 3);
	}
}
示例#22
0
文件: lisp207.c 项目: hoelzl/Clicc
void complex_vector_fillptr(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(2));	/* COMPLEX-VECTOR */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 3 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(3));	/* COMPLEX-VECTOR */
		Ferror(ARG(1), 3);
	}
}
示例#23
0
文件: lisp200.c 项目: hoelzl/Clicc
void complex_array_displaced(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 147), ARG(2));	/* COMPLEX-ARRAY */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 1 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 147), ARG(3));	/* COMPLEX-ARRAY */
		Ferror(ARG(1), 3);
	}
}
示例#24
0
文件: lisp437.c 项目: hoelzl/Clicc
void Ppackage_used_by_list(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	LOAD_SYMBOL(SYMBOL(Slisp, 354), ARG(2));	/* PACKAGE */
	rt_struct_typep(ARG(1));
	if(CL_TRUEP(ARG(1)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), 6 + 1), ARG(0));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(1));	/* NO_STRUCT */
		COPY(ARG(0), ARG(2));
		LOAD_SYMBOL(SYMBOL(Slisp, 354), ARG(3));	/* PACKAGE */
		Ferror(ARG(1), 3);
	}
}
示例#25
0
void fresh_line1(CL_FORM *base)
{
	if(CL_TRUEP(ARG(0)))
	{
		if(CL_SYMBOLP(ARG(0)) && GET_SYMBOL(ARG(0)) == SYMBOL(Slisp, 48))	/* T */
		{
			COPY(SYMVAL(Slisp, 59), ARG(0));	/* *TERMINAL-IO* */
		}
	}
	else
	{
		COPY(SYMVAL(Slisp, 61), ARG(0));	/* *STANDARD-OUTPUT* */
	}
	COPY(ARG(0), ARG(1));
	COPY(ARG(1), ARG(2));
	COPY(ARG(2), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 64), ARG(4));	/* STREAM */
	rt_struct_typep(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(2))), 5 + 1), ARG(1));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(1));	/* NO_STRUCT */
		LOAD_SYMBOL(SYMBOL(Slisp, 64), ARG(3));	/* STREAM */
		Ferror(ARG(1), 3);
	}
	Ffuncall(ARG(1), 1);
	mv_count = 1;
	if(CL_FIXNUMP(ARG(1)) && GET_FIXNUM(ARG(1)) == 0)
	{
		LOAD_NIL(ARG(0));
	}
	else
	{
		LOAD_CHAR(ARG(1), '\n', ARG(1));
		COPY(ARG(0), ARG(2));
		write_char1(ARG(1));
		COPY(ARG(1), ARG(0));
	}
}
示例#26
0
文件: nunion1.c 项目: hoelzl/Clicc
static void Z7_lambda(CL_FORM *base, int nargs)
{
	CL_FORM *rest_0;
	CL_FORM *local;
	rest_0 = ARG(1);
	local = ARG(nargs + 1);
	{
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), LOCAL(0));
		REST_APPLY(LOCAL(0), 1, rest_0);
		mv_count = 1;
		if(CL_TRUEP(LOCAL(0)))
		{
			LOAD_NIL(ARG(0));
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
		}
	}
}
示例#27
0
文件: gensym1.c 项目: hoelzl/Clicc
void gensym1(CL_FORM *base)
{
	if(CL_TRUEP(ARG(0)))
	{
		LOAD_FIXNUM(ARG(2), 0, ARG(2));
		if(CL_FIXNUMP(ARG(0)) && GET_FIXNUM(ARG(0)) >= GET_FIXNUM(ARG(2)))
		{
			COPY(ARG(0), SYMVAL(Slisp, 662));	/* *GENSYM-COUNTER* */
		}
		else
		{
			COPY(ARG(0), ARG(1));
			Fstringp(ARG(1));
			if(CL_TRUEP(ARG(1)))
			{
				COPY(ARG(0), SYMVAL(Slisp, 674));	/* *GENSYM-PREFIX* */
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&Kgensym1[0], ARG(1));	/* positive integer or string expected */
				Ferror(ARG(1), 1);
			}
		}
	}
	LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(1));	/* STRING */
	COPY(SYMVAL(Slisp, 674), ARG(2));	/* *GENSYM-PREFIX* */
	COPY(SYMVAL(Slisp, 662), ARG(3));	/* *GENSYM-COUNTER* */
	LOAD_FIXNUM(ARG(4), 10, ARG(4));
	LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(5));	/* CHARACTER */
	LOAD_NIL(ARG(6));
	LOAD_NIL(ARG(7));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(8));	/* T */
	LOAD_FIXNUM(ARG(9), 0, ARG(9));
	LOAD_NIL(ARG(10));
	LOAD_FIXNUM(ARG(11), 0, ARG(11));
	LOAD_NIL(ARG(12));
	LOAD_NIL(ARG(13));
	LOAD_NIL(ARG(14));
	make_array1(ARG(4));
	make_string_output_stream1(ARG(4));
	COPY(ARG(3), ARG(5));
	COPY(ARG(4), ARG(6));
	prin11(ARG(5));
	COPY(ARG(4), ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 64), ARG(6));	/* STREAM */
	rt_struct_typep(ARG(5));
	if(CL_TRUEP(ARG(5)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(4))), 0 + 1), ARG(5));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(5));	/* NO_STRUCT */
		COPY(ARG(4), ARG(6));
		LOAD_SYMBOL(SYMBOL(Slisp, 64), ARG(7));	/* STREAM */
		Ferror(ARG(5), 3);
	}
	if(CL_SYMBOLP(ARG(5)) && GET_SYMBOL(ARG(5)) == SYMBOL(Slisp, 102))	/* STRING-OUTPUT */
	{
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&KClisp[268], ARG(5));	/* string-output-stream expected */
		Ferror(ARG(5), 1);
	}
	COPY(ARG(4), ARG(5));
	COPY(ARG(5), ARG(6));
	COPY(ARG(6), ARG(7));
	LOAD_SYMBOL(SYMBOL(Slisp, 64), ARG(8));	/* STREAM */
	rt_struct_typep(ARG(7));
	if(CL_TRUEP(ARG(7)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(6))), 1 + 1), ARG(5));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(5));	/* NO_STRUCT */
		LOAD_SYMBOL(SYMBOL(Slisp, 64), ARG(7));	/* STREAM */
		Ferror(ARG(5), 3);
	}
	Ffuncall(ARG(5), 1);
	mv_count = 1;
	COPY(ARG(5), ARG(3));
	Fconcatenate(ARG(1), 3);
	Fmake_symbol(ARG(1));
	COPY(SYMVAL(Slisp, 662), ARG(2));	/* *GENSYM-COUNTER* */
	F1plus(ARG(2));
	COPY(ARG(2), SYMVAL(Slisp, 662));	/* *GENSYM-COUNTER* */
	COPY(ARG(1), ARG(0));
}
示例#28
0
文件: Fmap.c 项目: hoelzl/Clicc
static void Z146_get_elem(CL_FORM *base)
{
	if(CL_CONSP(ARG(1)))
	{
		COPY(GET_CAR(ARG(1)), ARG(2));
	}
	else
	{
		if(CL_TRUEP(ARG(1)))
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(2));	/* ~a is not a list */
			COPY(ARG(1), ARG(3));
			Ferror(ARG(2), 2);
		}
		else
		{
			COPY(ARG(1), ARG(2));
		}
	}
	if(CL_LISTP(ARG(2)))
	{
		if(CL_CONSP(ARG(1)))
		{
			COPY(GET_CAR(ARG(1)), ARG(2));
		}
		else
		{
			if(CL_TRUEP(ARG(1)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(2));	/* ~a is not a list */
				COPY(ARG(1), ARG(3));
				Ferror(ARG(2), 2);
			}
			else
			{
				COPY(ARG(1), ARG(2));
			}
		}
		if(CL_CONSP(ARG(2)))
		{
			COPY(GET_CAR(ARG(2)), ARG(3));
		}
		else
		{
			if(CL_TRUEP(ARG(2)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(3));	/* ~a is not a list */
				COPY(ARG(2), ARG(4));
				Ferror(ARG(3), 2);
			}
			else
			{
				COPY(ARG(2), ARG(3));
			}
		}
		COPY(ARG(2), ARG(4));
		COPY(ARG(4), ARG(5));
		if(CL_CONSP(ARG(5)))
		{
			COPY(GET_CDR(ARG(5)), ARG(2));
		}
		else
		{
			if(CL_TRUEP(ARG(5)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(6));	/* ~a is not a list */
				COPY(ARG(5), ARG(7));
				Ferror(ARG(6), 2);
			}
			else
			{
				COPY(ARG(5), ARG(2));
			}
		}
		if(CL_CONSP(ARG(1)))
		{
			COPY(ARG(2), GET_CAR(ARG(1)));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[252], ARG(4));	/* ~a is not a cons */
			COPY(ARG(1), ARG(5));
			Ferror(ARG(4), 2);
		}
		COPY(ARG(3), ARG(0));
	}
	else
	{
		if(CL_CONSP(ARG(1)))
		{
			COPY(GET_CAR(ARG(1)), ARG(2));
		}
		else
		{
			if(CL_TRUEP(ARG(1)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(2));	/* ~a is not a list */
				COPY(ARG(1), ARG(3));
				Ferror(ARG(2), 2);
			}
			else
			{
				COPY(ARG(1), ARG(2));
			}
		}
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
		Felt(ARG(2));
		COPY(ARG(2), ARG(0));
	}
}
示例#29
0
文件: lisp108.c 项目: plops/clicc
void get_macro_character1(CL_FORM *base)
{
	COPY(ARG(1), ARG(2));
	LOAD_SYMBOL(SYMBOL(Slisp, 410), ARG(3));	/* READTABLE */
	rt_struct_typep(ARG(2));
	if(CL_TRUEP(ARG(2)))
	{
		COPY(OFFSET(AR_BASE(GET_FORM(ARG(1))), 0 + 1), ARG(2));
	}
	else
	{
		COPY(SYMVAL(Slisp, 342), ARG(2));	/* NO_STRUCT */
		COPY(ARG(1), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 410), ARG(4));	/* READTABLE */
		Ferror(ARG(2), 3);
	}
	if(CL_CHARP(ARG(0)))
	{
		COPY(ARG(0), ARG(3));
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(3));	/* WRONG_TYPE */
		COPY(ARG(0), ARG(4));
		LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(5));	/* CHARACTER */
		Ferror(ARG(3), 3);
	}
	rt_char_code(ARG(3));
	LOAD_BOOL(CL_SMVECP(ARG(2)), ARG(4));
	if(CL_TRUEP(ARG(4)))
	{
		goto THEN1;
	}
	else
	{
		COPY(ARG(2), ARG(5));
		LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(6));	/* COMPLEX-VECTOR */
		rt_struct_typep(ARG(5));
	}
	if(CL_TRUEP(ARG(5)))
	{
		THEN1:;
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(4));	/* WRONG_TYPE */
		COPY(ARG(2), ARG(5));
		LOAD_SYMBOL(SYMBOL(Slisp, 47), ARG(6));	/* VECTOR */
		Ferror(ARG(4), 3);
	}
	Frow_major_aref(ARG(2));
	if(CL_TRUEP(ARG(2)))
	{
		if(CL_CONSP(ARG(2)))
		{
			COPY(GET_CAR(ARG(2)), ARG(3));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(3));	/* ~a is not a list */
			COPY(ARG(2), ARG(4));
			Ferror(ARG(3), 2);
		}
		if(CL_CONSP(ARG(2)))
		{
			COPY(GET_CDR(ARG(2)), ARG(4));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(4));	/* ~a is not a list */
			COPY(ARG(2), ARG(5));
			Ferror(ARG(4), 2);
		}
		COPY(ARG(3), ARG(0));
		COPY(ARG(4), &mv_buf[0]);
		mv_count = 2;
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
示例#30
0
文件: char_reader.c 项目: plops/clicc
void char_reader(CL_FORM *base)
{
	COPY(ARG(0), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
	LOAD_NIL(ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
	read_char1(ARG(3));
	LOAD_NIL(ARG(4));
	COPY(ARG(0), ARG(5));
	LOAD_NIL(ARG(6));
	LOAD_NIL(ARG(7));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(8));	/* T */
	peek_char1(ARG(4));
	if(CL_TRUEP(ARG(4)))
	{
		if(CL_TRUEP(SYMVAL(Slisp, 447)))	/* *READTABLE-UNCHANGED* */
		{
			if(CL_CHARP(ARG(4)))	/* *READTABLE-SYNTAX* */
			{
				COPY(ARG(4), ARG(5));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(5));	/* WRONG_TYPE */
				COPY(ARG(4), ARG(6));
				LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(7));	/* CHARACTER */
				Ferror(ARG(5), 3);
			}
			rt_char_code(ARG(5));
			COPY(OFFSET(AR_BASE(GET_FORM(SYMVAL(Slisp, 450))), GET_FIXNUM(ARG(5))), ARG(5));
		}
		else
		{
			COPY(SYMVAL(Slisp, 449), ARG(5));	/* *READTABLE* */
			readtable_syntax(ARG(5));
			if(CL_CHARP(ARG(4)))
			{
				COPY(ARG(4), ARG(6));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(6));	/* WRONG_TYPE */
				COPY(ARG(4), ARG(7));
				LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(8));	/* CHARACTER */
				Ferror(ARG(6), 3);
			}
			rt_char_code(ARG(6));
			LOAD_BOOL(CL_SMVECP(ARG(5)), ARG(7));
			if(CL_TRUEP(ARG(7)))
			{
				goto THEN1;
			}
			else
			{
				COPY(ARG(5), ARG(8));
				LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(9));	/* COMPLEX-VECTOR */
				rt_struct_typep(ARG(8));
			}
			if(CL_TRUEP(ARG(8)))
			{
				THEN1:;
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(7));	/* WRONG_TYPE */
				COPY(ARG(5), ARG(8));
				LOAD_SYMBOL(SYMBOL(Slisp, 47), ARG(9));	/* VECTOR */
				Ferror(ARG(7), 3);
			}
			Frow_major_aref(ARG(5));
		}
	}	/* CONSTITUENT */
	else
	{
		goto ELSE2;
	}
	if(CL_SYMBOLP(ARG(5)) && GET_SYMBOL(ARG(5)) == SYMBOL(Slisp, 460))
	{
		LOAD_SMALLFIXNUM(0, SYMVAL(Slisp, 440));	/* *FILL-POINTER* */
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(5));	/* T */
		BIND_SPECIAL(SYMBOL(Slisp, 408), ARG(5));	/* *READ-SUPPRESS* */
		COPY(ARG(0), ARG(6));
		COPY(ARG(3), ARG(7));
		bool_result = CL_TRUEP(SYMVAL(Slisp, 447));	/* *READTABLE-UNCHANGED* */
		if(bool_result)
		{
			if(CL_CHARP(ARG(3)))	/* *READTABLE-SYNTAX* */
			{
				COPY(ARG(3), ARG(8));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(8));	/* WRONG_TYPE */
				COPY(ARG(3), ARG(9));
				LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(10));	/* CHARACTER */
				Ferror(ARG(8), 3);
			}
			rt_char_code(ARG(8));
			COPY(OFFSET(AR_BASE(GET_FORM(SYMVAL(Slisp, 450))), GET_FIXNUM(ARG(8))), ARG(8));
		}
		else
		{
			COPY(SYMVAL(Slisp, 449), ARG(8));	/* *READTABLE* */
			readtable_syntax(ARG(8));
			if(CL_CHARP(ARG(3)))
			{
				COPY(ARG(3), ARG(9));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(9));	/* WRONG_TYPE */
				COPY(ARG(3), ARG(10));
				LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(11));	/* CHARACTER */
				Ferror(ARG(9), 3);
			}
			rt_char_code(ARG(9));
			LOAD_BOOL(CL_SMVECP(ARG(8)), ARG(10));
			if(CL_TRUEP(ARG(10)))
			{
				goto THEN3;
			}
			else
			{
				COPY(ARG(8), ARG(11));
				LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(12));	/* COMPLEX-VECTOR */
				rt_struct_typep(ARG(11));
			}
			if(CL_TRUEP(ARG(11)))
			{
				THEN3:;
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(10));	/* WRONG_TYPE */
				COPY(ARG(8), ARG(11));
				LOAD_SYMBOL(SYMBOL(Slisp, 47), ARG(12));	/* VECTOR */
				Ferror(ARG(10), 3);
			}
			Frow_major_aref(ARG(8));
		}
		read_token(ARG(6));
		RESTORE_SPECIAL;
		if(CL_TRUEP(SYMVAL(Slisp, 408)))	/* *READ-SUPPRESS* */
		{
		}
		else
		{
			get_token_string(ARG(5));
			Fname_char(ARG(5));
			COPY(ARG(5), ARG(3));
			if(CL_TRUEP(ARG(3)))
			{
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&Kchar_reader[0], ARG(5));	/* illegal character name ~s */
				get_token_string(ARG(6));
				Ferror(ARG(5), 2);
			}
		}
	}
	ELSE2:;
	if(CL_TRUEP(SYMVAL(Slisp, 408)))	/* *READ-SUPPRESS* */
	{
		LOAD_NIL(ARG(0));
	}
	else
	{
		if(CL_TRUEP(ARG(2)))
		{
			COPY(ARG(2), ARG(5));
			Fplusp(ARG(5));
		}
		else
		{
			goto ELSE4;
		}
		if(CL_TRUEP(ARG(5)))
		{
			LOAD_SMSTR((CL_FORM *)&Kchar_reader[2], ARG(5));	/* font ~s of ~s will be ignored */
			COPY(ARG(2), ARG(6));
			COPY(ARG(3), ARG(7));
			Fwarn(ARG(5), 3);
			mv_count = 1;
		}
		ELSE4:;
		COPY(ARG(3), ARG(0));
	}
}