示例#1
0
文件: lisp507.c 项目: plops/clicc
void token_push_extend(CL_FORM *base)
{
	COPY(ARG(0), ARG(1));
	COPY(SYMVAL(Slisp, 439), ARG(2));	/* *TOKEN* */
	COPY(SYMVAL(Slisp, 440), ARG(3));	/* *FILL-POINTER* */
	Fset_schar(ARG(1));
	COPY(SYMVAL(Slisp, 440), ARG(1));	/* *FILL-POINTER* */
	F1plus(ARG(1));
	COPY(ARG(1), SYMVAL(Slisp, 440));	/* *FILL-POINTER* */
	COPY(SYMVAL(Slisp, 441), ARG(2));	/* *TOKEN-LENGTH* */
	Fge(ARG(1), 2);
	if(CL_TRUEP(ARG(1)))
	{
		LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(1));	/* STRING */
		COPY(SYMVAL(Slisp, 439), ARG(2));	/* *TOKEN* */
		COPY(SYMVAL(Slisp, 442), ARG(3));	/* *TOKEN-EXTENSION* */
		LOAD_CHAR(ARG(4), ' ', ARG(4));
		make_string1(ARG(3));
		Fconcatenate(ARG(1), 3);
		COPY(ARG(1), SYMVAL(Slisp, 439));	/* *TOKEN* */
		COPY(SYMVAL(Slisp, 441), ARG(1));	/* *TOKEN-LENGTH* */
		COPY(SYMVAL(Slisp, 442), ARG(2));	/* *TOKEN-EXTENSION* */
		Fplus(ARG(1), 2);
		COPY(ARG(1), SYMVAL(Slisp, 441));	/* *TOKEN-LENGTH* */
		COPY(SYMVAL(Slisp, 441), ARG(0));	/* *TOKEN-LENGTH* */
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
示例#2
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:;
}
示例#3
0
文件: rt_charGE.c 项目: plops/clicc
void rt_charGE(CL_FORM *base)
{
	COPY(ARG(0), ARG(2));
	Fchar_code(ARG(2));
	COPY(ARG(1), ARG(3));
	Fchar_code(ARG(3));
	Fge(ARG(2), 2);
	COPY(ARG(2), ARG(0));
}
示例#4
0
文件: Fsome.c 项目: hoelzl/Clicc
void Fsome(CL_FORM *base, int nargs)
{
	Flist(ARG(2), nargs - 2);
	ALLOC_CONS(ARG(5), ARG(1), ARG(2), ARG(2));
	LOAD_GLOBFUN(&CFmin, ARG(3));
	LOAD_GLOBFUN(&CFlength, ARG(4));
	COPY(ARG(2), ARG(5));
	Fmapcar(ARG(4), 2);
	Fapply(ARG(3), 2);
	mv_count = 1;
	LOAD_FIXNUM(ARG(4), 0, ARG(4));
	GEN_HEAPVAR(ARG(4), ARG(5));
	{
		GEN_CLOSURE(array, ARG(5), 4, Z147_get_elem, 1);
		COPY(ARG(4), &array[3]);
		LOAD_CLOSURE(array, ARG(5));
	}
	M1_1:;
	COPY(INDIRECT(ARG(4)), ARG(6));
	COPY(ARG(3), ARG(7));
	Fge(ARG(6), 2);
	if(CL_TRUEP(ARG(6)))
	{
		LOAD_NIL(ARG(0));
		goto RETURN1;
	}
	COPY(ARG(0), ARG(6));
	COPY(ARG(5), ARG(7));
	COPY(ARG(2), ARG(8));
	Fmaplist(ARG(7), 2);
	Fapply(ARG(6), 2);
	mv_count = 1;
	if(CL_TRUEP(ARG(6)))
	{
		COPY(ARG(6), ARG(0));
		goto RETURN1;
	}
	COPY(INDIRECT(ARG(4)), ARG(6));
	F1plus(ARG(6));
	COPY(ARG(6), INDIRECT(ARG(4)));
	goto M1_1;
	RETURN1:;
}
示例#5
0
文件: lisp475.c 项目: plops/clicc
void rt_do_external_symbols_iterator(CL_FORM *base)
{
	COPY(ARG(1), ARG(2));
	Ppackage_external(ARG(2));
	COPY(SYMVAL(Slisp, 372), ARG(3));	/* PACKAGE-HASHTAB-SIZE */
	LOAD_SMALLFIXNUM(0, ARG(4));
	M1_1:;
	COPY(ARG(4), ARG(5));
	COPY(ARG(3), ARG(6));
	Fge(ARG(5), 2);
	if(CL_TRUEP(ARG(5)))
	{
		LOAD_NIL(ARG(0));
		goto RETURN1;
	}
	LOAD_NIL(ARG(5));
	COPY(ARG(2), ARG(6));
	COPY(ARG(4), ARG(7));
	Fsvref(ARG(6));
	M2_1:;
	if(CL_ATOMP(ARG(6)))
	{
		LOAD_NIL(ARG(5));
		goto RETURN2;
	}
	COPY(ARG(6), ARG(7));
	COPY(GET_CAR(ARG(7)), ARG(5));
	COPY(ARG(0), ARG(7));
	COPY(ARG(5), ARG(8));
	Ffuncall(ARG(7), 2);
	mv_count = 1;
	COPY(ARG(6), ARG(7));
	COPY(GET_CDR(ARG(7)), ARG(6));
	goto M2_1;
	RETURN2:;
	F1plus(ARG(4));
	goto M1_1;
	RETURN1:;
}
示例#6
0
文件: Fmap.c 项目: hoelzl/Clicc
void Fmap(CL_FORM *base, int nargs)
{
	Flist(ARG(3), nargs - 3);
	ALLOC_CONS(ARG(6), ARG(2), ARG(3), ARG(3));
	LOAD_GLOBFUN(&CFmin, ARG(4));
	LOAD_GLOBFUN(&CFlength, ARG(5));
	COPY(ARG(3), ARG(6));
	Fmapcar(ARG(5), 2);
	Fapply(ARG(4), 2);
	mv_count = 1;
	LOAD_FIXNUM(ARG(5), 0, ARG(5));
	GEN_HEAPVAR(ARG(5), ARG(6));
	{
		GEN_CLOSURE(array, ARG(6), 4, Z146_get_elem, 1);
		COPY(ARG(5), &array[3]);
		LOAD_CLOSURE(array, ARG(6));
	}
	if(CL_TRUEP(ARG(0)))
	{
		if(CL_SYMBOLP(ARG(0)) && GET_SYMBOL(ARG(0)) == SYMBOL(Slisp, 28))	/* LIST */
		{
			LOAD_NIL(ARG(7));
			LOAD_NIL(ARG(8));
			ALLOC_CONS(ARG(9), ARG(7), ARG(8), ARG(7));
			M1_1:;
			COPY(INDIRECT(ARG(5)), ARG(8));
			COPY(ARG(4), ARG(9));
			Fge(ARG(8), 2);
			if(CL_TRUEP(ARG(8)))
			{
				COPY(GET_CAR(ARG(7)), ARG(0));
				goto RETURN1;
			}
			COPY(ARG(1), ARG(8));
			COPY(ARG(6), ARG(9));
			COPY(ARG(3), ARG(10));
			Fmaplist(ARG(9), 2);
			Fapply(ARG(8), 2);
			mv_count = 1;
			COPY(ARG(7), ARG(9));
			add_q(ARG(8));
			COPY(INDIRECT(ARG(5)), ARG(8));
			F1plus(ARG(8));
			COPY(ARG(8), INDIRECT(ARG(5)));
			goto M1_1;
			RETURN1:;
		}
		else
		{
			COPY(ARG(0), ARG(7));
			COPY(ARG(4), ARG(8));
			LOAD_NIL(ARG(9));
			LOAD_NIL(ARG(10));
			make_sequence1(ARG(7));
			M2_1:;
			COPY(INDIRECT(ARG(5)), ARG(8));
			COPY(ARG(4), ARG(9));
			Fge(ARG(8), 2);
			if(CL_TRUEP(ARG(8)))
			{
				COPY(ARG(7), ARG(0));
				goto RETURN2;
			}
			COPY(ARG(7), ARG(8));
			COPY(INDIRECT(ARG(5)), ARG(9));
			COPY(ARG(1), ARG(10));
			COPY(ARG(6), ARG(11));
			COPY(ARG(3), ARG(12));
			Fmaplist(ARG(11), 2);
			Fapply(ARG(10), 2);
			mv_count = 1;
			COPY(ARG(10), ARG(11));
			COPY(ARG(8), ARG(12));
			COPY(ARG(9), ARG(13));
			Fset_elt(ARG(11));
			COPY(INDIRECT(ARG(5)), ARG(8));
			F1plus(ARG(8));
			COPY(ARG(8), INDIRECT(ARG(5)));
			goto M2_1;
			RETURN2:;
		}
	}
	else
	{
		M3_1:;
		COPY(INDIRECT(ARG(5)), ARG(7));
		COPY(ARG(4), ARG(8));
		Fge(ARG(7), 2);
		if(CL_TRUEP(ARG(7)))
		{
			LOAD_NIL(ARG(0));
			goto RETURN3;
		}
		COPY(ARG(1), ARG(7));
		COPY(ARG(6), ARG(8));
		COPY(ARG(3), ARG(9));
		Fmaplist(ARG(8), 2);
		Fapply(ARG(7), 2);
		mv_count = 1;
		COPY(INDIRECT(ARG(5)), ARG(7));
		F1plus(ARG(7));
		COPY(ARG(7), INDIRECT(ARG(5)));
		goto M3_1;
		RETURN3:;
	}
}
示例#7
0
void list_position(CL_FORM *base)
{
	GEN_HEAPVAR(ARG(4), ARG(8));
	COPY(ARG(5), ARG(8));
	LOAD_NIL(ARG(9));
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		if(CL_TRUEP(INDIRECT(ARG(4))))
		{
			GEN_CLOSURE(array, ARG(10), 4, Z161_lambda, -1);
			COPY(ARG(4), &array[3]);
			LOAD_CLOSURE(array, ARG(10));
			COPY(ARG(10), ARG(3));
		}
		else
		{
			GEN_STATIC_GLOBAL_FUNARG(extern_closure, Feql, 2);
			LOAD_GLOBFUN(&extern_closure, ARG(3));
		}
	}
	LOAD_NIL(ARG(10));
	COPY(ARG(5), ARG(11));
	COPY(ARG(1), ARG(12));
	Fnthcdr(ARG(11));
	M1_1:;
	if(CL_ATOMP(ARG(11)))
	{
		LOAD_NIL(ARG(10));
		goto RETURN1;
	}
	COPY(ARG(11), ARG(12));
	COPY(GET_CAR(ARG(12)), ARG(10));
	COPY(ARG(8), ARG(12));
	COPY(ARG(6), ARG(13));
	Fge(ARG(12), 2);
	if(CL_TRUEP(ARG(12)))
	{
		goto RETURN1;
	}
	COPY(ARG(3), ARG(12));
	COPY(ARG(0), ARG(13));
	if(CL_TRUEP(ARG(7)))
	{
		COPY(ARG(7), ARG(14));
		COPY(ARG(10), ARG(15));
		Ffuncall(ARG(14), 2);
		mv_count = 1;
	}
	else
	{
		COPY(ARG(10), ARG(14));
	}
	Ffuncall(ARG(12), 3);
	mv_count = 1;
	if(CL_TRUEP(ARG(12)))
	{
		COPY(ARG(8), ARG(9));
		if(CL_TRUEP(ARG(2)))
		{
		}
		else
		{
			goto RETURN1;
		}
	}
	COPY(ARG(8), ARG(12));
	F1plus(ARG(12));
	COPY(ARG(12), ARG(8));
	COPY(ARG(11), ARG(12));
	COPY(GET_CDR(ARG(12)), ARG(11));
	goto M1_1;
	RETURN1:;
	COPY(ARG(9), ARG(0));
}
示例#8
0
文件: FcharL.c 项目: hoelzl/Clicc
void FcharL(CL_FORM *base, int nargs)
{
	CL_FORM *rest_0;
	CL_FORM *local;
	rest_0 = ARG(1);
	local = ARG(nargs);
	{
		CL_FORM *rest_1;
		LOAD_NIL(LOCAL(0));
		rest_1 = rest_0;
		M1_1:;
		if(NOT(REST_NOT_EMPTY(rest_1)))
		{
			LOAD_NIL(LOCAL(0));
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
			goto RETURN1;
		}
		{
			CL_FORM *rest_2;
			rest_2 = rest_1;
			REST_CAR(rest_2, LOCAL(0));
		}
		if(CL_CHARP(ARG(0)))
		{
		}
		else
		{
			COPY(SYMVAL(Slisp, 58), LOCAL(1));	/* WRONG_TYPE */
			COPY(ARG(0), LOCAL(2));
			LOAD_SYMBOL(SYMBOL(Slisp, 18), LOCAL(3));	/* CHARACTER */
			Ferror(LOCAL(1), 3);
		}
		COPY(ARG(0), LOCAL(1));
		rt_char_code(LOCAL(1));
		if(CL_CHARP(LOCAL(0)))
		{
		}
		else
		{
			COPY(SYMVAL(Slisp, 58), LOCAL(2));	/* WRONG_TYPE */
			COPY(LOCAL(0), LOCAL(3));
			LOAD_SYMBOL(SYMBOL(Slisp, 18), LOCAL(4));	/* CHARACTER */
			Ferror(LOCAL(2), 3);
		}
		COPY(LOCAL(0), LOCAL(2));
		rt_char_code(LOCAL(2));
		Fge(LOCAL(1), 2);
		if(CL_TRUEP(LOCAL(1)))
		{
			LOAD_NIL(ARG(0));
			goto RETURN1;
		}
		COPY(LOCAL(0), ARG(0));
		{
			CL_FORM *rest_3;
			rest_3 = rest_1;
			rest_1 = REST_CDR(rest_3);
		}
		goto M1_1;
	}
	RETURN1:;
}
示例#9
0
文件: lisp464.c 项目: hoelzl/Clicc
void rt_do_symbols_iterator(CL_FORM *base)
{
	COPY(ARG(1), ARG(2));
	Ppackage_external(ARG(2));
	LOAD_FIXNUM(ARG(3), 0, ARG(3));
	M1_1:;
	COPY(ARG(3), ARG(4));
	LOAD_FIXNUM(ARG(5), 101, ARG(5));
	Fge(ARG(4), 2);
	if(CL_TRUEP(ARG(4)))
	{
		goto RETURN1;
	}
	LOAD_NIL(ARG(4));
	COPY(ARG(2), ARG(5));
	COPY(ARG(3), ARG(6));
	Fsvref(ARG(5));
	M2_1:;
	if(CL_ATOMP(ARG(5)))
	{
		LOAD_NIL(ARG(4));
		goto RETURN2;
	}
	COPY(ARG(5), ARG(6));
	COPY(GET_CAR(ARG(6)), ARG(4));
	COPY(ARG(0), ARG(6));
	COPY(ARG(4), ARG(7));
	Ffuncall(ARG(6), 2);
	mv_count = 1;
	COPY(ARG(5), ARG(6));
	COPY(GET_CDR(ARG(6)), ARG(5));
	goto M2_1;
	RETURN2:;
	F1plus(ARG(3));
	goto M1_1;
	RETURN1:;
	COPY(ARG(1), ARG(2));
	Ppackage_internal(ARG(2));
	LOAD_FIXNUM(ARG(3), 0, ARG(3));
	M3_1:;
	COPY(ARG(3), ARG(4));
	LOAD_FIXNUM(ARG(5), 101, ARG(5));
	Fge(ARG(4), 2);
	if(CL_TRUEP(ARG(4)))
	{
		goto RETURN3;
	}
	LOAD_NIL(ARG(4));
	COPY(ARG(2), ARG(5));
	COPY(ARG(3), ARG(6));
	Fsvref(ARG(5));
	M4_1:;
	if(CL_ATOMP(ARG(5)))
	{
		LOAD_NIL(ARG(4));
		goto RETURN4;
	}
	COPY(ARG(5), ARG(6));
	COPY(GET_CAR(ARG(6)), ARG(4));
	COPY(ARG(0), ARG(6));
	COPY(ARG(4), ARG(7));
	Ffuncall(ARG(6), 2);
	mv_count = 1;
	COPY(ARG(5), ARG(6));
	COPY(GET_CDR(ARG(6)), ARG(5));
	goto M4_1;
	RETURN4:;
	F1plus(ARG(3));
	goto M3_1;
	RETURN3:;
	LOAD_NIL(ARG(3));
	COPY(ARG(1), ARG(4));
	Ppackage_use_list(ARG(4));
	M5_1:;
	if(CL_ATOMP(ARG(4)))
	{
		LOAD_NIL(ARG(3));
		COPY(ARG(3), ARG(0));
		goto RETURN5;
	}
	COPY(ARG(4), ARG(5));
	COPY(GET_CAR(ARG(5)), ARG(3));
	COPY(ARG(3), ARG(5));
	Ppackage_internal(ARG(5));
	COPY(ARG(5), ARG(2));
	LOAD_FIXNUM(ARG(5), 0, ARG(5));
	M6_1:;
	COPY(ARG(5), ARG(6));
	LOAD_FIXNUM(ARG(7), 101, ARG(7));
	Fge(ARG(6), 2);
	if(CL_TRUEP(ARG(6)))
	{
		goto RETURN6;
	}
	LOAD_NIL(ARG(6));
	COPY(ARG(2), ARG(7));
	COPY(ARG(5), ARG(8));
	Fsvref(ARG(7));
	M7_1:;
	if(CL_ATOMP(ARG(7)))
	{
		LOAD_NIL(ARG(6));
		goto RETURN7;
	}
	COPY(ARG(7), ARG(8));
	COPY(GET_CAR(ARG(8)), ARG(6));
	COPY(ARG(0), ARG(8));
	COPY(ARG(6), ARG(9));
	Ffuncall(ARG(8), 2);
	mv_count = 1;
	COPY(ARG(7), ARG(8));
	COPY(GET_CDR(ARG(8)), ARG(7));
	goto M7_1;
	RETURN7:;
	F1plus(ARG(5));
	goto M6_1;
	RETURN6:;
	COPY(ARG(4), ARG(5));
	COPY(GET_CDR(ARG(5)), ARG(4));
	goto M5_1;
	RETURN5:;
}
示例#10
0
文件: lisp318.c 项目: plops/clicc
void concatenate_to_list(CL_FORM *base, int nargs)
{
	Flist(STACK(base, 0), nargs - 0);
	LOAD_NIL(STACK(base, 1));
	LOAD_NIL(STACK(base, 2));
	{
		CL_FORM *lptr;
		lptr = form_alloc(STACK(base, 3), 2);
		COPY(STACK(base, 1), CAR(lptr));
		COPY(STACK(base, 2), CDR(lptr));
		LOAD_CONS(lptr, STACK(base, 1));
	}
	LOAD_NIL(STACK(base, 2));
	COPY(STACK(base, 0), STACK(base, 3));
	M148_1:;
	if(CL_ATOMP(STACK(base, 3)))
	{
		LOAD_NIL(STACK(base, 2));
		goto RETURN162;
	}
	COPY(STACK(base, 3), STACK(base, 4));
	Fcar(STACK(base, 4));
	COPY(STACK(base, 4), STACK(base, 2));
	if(CL_LISTP(STACK(base, 2)))
	{
		LOAD_NIL(STACK(base, 4));
		COPY(STACK(base, 2), STACK(base, 5));
		M149_1:;
		if(CL_ATOMP(STACK(base, 5)))
		{
			LOAD_NIL(STACK(base, 4));
			goto RETURN163;
		}
		COPY(STACK(base, 5), STACK(base, 6));
		Fcar(STACK(base, 6));
		COPY(STACK(base, 6), STACK(base, 4));
		COPY(STACK(base, 1), STACK(base, 7));
		add_q(STACK(base, 6));
		Fcdr(STACK(base, 5));
		goto M149_1;
		RETURN163:;
	}
	else
	{
		COPY(STACK(base, 2), STACK(base, 4));
		Flength(STACK(base, 4));
		LOAD_FIXNUM(0, STACK(base, 5));
		M150_1:;
		COPY(STACK(base, 5), STACK(base, 6));
		COPY(STACK(base, 4), STACK(base, 7));
		Fge(STACK(base, 6), 2);
		if(CL_TRUEP(STACK(base, 6)))
		{
			goto RETURN164;
		}
		COPY(STACK(base, 2), STACK(base, 6));
		COPY(STACK(base, 5), STACK(base, 7));
		Felt(STACK(base, 6));
		COPY(STACK(base, 1), STACK(base, 7));
		add_q(STACK(base, 6));
		F1plus(STACK(base, 5));
		goto M150_1;
		RETURN164:;
	}
	Fcdr(STACK(base, 3));
	goto M148_1;
	RETURN162:;
	COPY(STACK(base, 1), STACK(base, 0));
	Fcar(STACK(base, 0));
}
示例#11
0
文件: lisp583.c 项目: hoelzl/Clicc
void concatenate_to_list(CL_FORM *base, int nargs)
{
	CL_FORM *rest_0;
	CL_FORM *local;
	rest_0 = ARG(0);
	local = ARG(nargs);
	{
		LOAD_NIL(LOCAL(0));
		LOAD_NIL(LOCAL(1));
		ALLOC_CONS(LOCAL(2), LOCAL(0), LOCAL(1), LOCAL(0));
		{
			CL_FORM *rest_1;
			LOAD_NIL(LOCAL(1));
			rest_1 = rest_0;
			M1_1:;
			if(NOT(REST_NOT_EMPTY(rest_1)))
			{
				LOAD_NIL(LOCAL(1));
				goto RETURN1;
			}
			{
				CL_FORM *rest_2;
				rest_2 = rest_1;
				REST_CAR(rest_2, LOCAL(1));
			}
			if(CL_LISTP(LOCAL(1)))
			{
				LOAD_NIL(LOCAL(2));
				COPY(LOCAL(1), LOCAL(3));
				M2_1:;
				if(CL_ATOMP(LOCAL(3)))
				{
					LOAD_NIL(LOCAL(2));
					goto RETURN2;
				}
				{
					COPY(LOCAL(3), LOCAL(4));
					COPY(GET_CAR(LOCAL(4)), LOCAL(2));
				}
				COPY(LOCAL(2), LOCAL(4));
				COPY(LOCAL(0), LOCAL(5));
				add_q(LOCAL(4));
				{
					COPY(LOCAL(3), LOCAL(4));
					COPY(GET_CDR(LOCAL(4)), LOCAL(3));
				}
				goto M2_1;
				RETURN2:;
			}
			else
			{
				LOAD_FIXNUM(LOCAL(2), 0, LOCAL(2));
				M3_1:;
				COPY(LOCAL(2), LOCAL(3));
				COPY(LOCAL(1), LOCAL(4));
				Flength(LOCAL(4));
				Fge(LOCAL(3), 2);
				if(CL_TRUEP(LOCAL(3)))
				{
					goto RETURN3;
				}
				COPY(LOCAL(1), LOCAL(3));
				COPY(LOCAL(2), LOCAL(4));
				Felt(LOCAL(3));
				COPY(LOCAL(0), LOCAL(4));
				add_q(LOCAL(3));
				F1plus(LOCAL(2));
				goto M3_1;
				RETURN3:;
			}
			{
				CL_FORM *rest_3;
				rest_3 = rest_1;
				rest_1 = REST_CDR(rest_3);
			}
			goto M1_1;
		}
		RETURN1:;
		COPY(GET_CAR(LOCAL(0)), ARG(0));
	}
}
示例#12
0
void print_float(CL_FORM *base)
{
	COPY(ARG(0), ARG(2));
	Fminusp(ARG(2));
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_CHAR(ARG(2), '-', ARG(2));
		COPY(ARG(1), ARG(3));
		write_char1(ARG(2));
		mv_count = 1;
		COPY(ARG(0), ARG(2));
		Fminus(ARG(2), 1);
		COPY(ARG(2), ARG(0));
	}
	COPY(ARG(0), ARG(2));
	Fzerop(ARG(2));
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_SMSTR((CL_FORM *)&Kprint_float[0], ARG(2));	/* 0.0 */
		COPY(ARG(2), ARG(3));
		COPY(ARG(1), ARG(4));
		LOAD_FIXNUM(ARG(5), 0, ARG(5));
		COPY(ARG(2), ARG(6));
		Flength(ARG(6));
		write_string1(ARG(3));
		COPY(ARG(3), ARG(0));
	}
	else
	{
		LOAD_FIXNUM(ARG(2), 10, ARG(2));
		COPY(ARG(0), ARG(2));
		LOAD_FIXNUM(ARG(3), 10, ARG(3));
		rt_log(ARG(2));
		LOAD_FIXNUM(ARG(3), 1, ARG(3));
		LOAD_FIXNUM(ARG(3), 1, ARG(3));
		rt_floor(ARG(2));
		mv_count = 1;
		COPY(ARG(0), ARG(3));
		GEN_FLOAT(ARG(4), 10.0, ARG(4));
		LOAD_FIXNUM(ARG(5), -1, ARG(5));
		COPY(ARG(2), ARG(6));
		Fminus(ARG(5), 2);
		COPY(ARG(5), ARG(6));
		Fminusp(ARG(6));
		if(CL_TRUEP(ARG(6)))
		{
			LOAD_FIXNUM(ARG(6), 1, ARG(6));
			COPY(ARG(4), ARG(7));
			COPY(ARG(5), ARG(8));
			Fminus(ARG(8), 1);
			Fexpt(ARG(7));
			Fdiv(ARG(6), 2);
			COPY(ARG(6), ARG(4));
		}
		else
		{
			rt_expt(ARG(4));
		}
		Fmult(ARG(3), 2);
		LOAD_NIL(ARG(4));
		COPY(SYMVAL(Slisp, 2), ARG(5));	/* SHORT-FLOAT-EPSILON */
		LOAD_NIL(ARG(6));
		COPY(ARG(3), ARG(7));
		LOAD_FIXNUM(ARG(8), 1, ARG(8));
		COPY(ARG(5), ARG(9));
		Fminus(ARG(8), 2);
		Fge(ARG(7), 2);
		if(CL_TRUEP(ARG(7)))
		{
			GEN_FLOAT(ARG(7), 0.1, ARG(3));
			F1plus(ARG(2));
		}
		COPY(ARG(2), ARG(7));
		LOAD_FIXNUM(ARG(8), 7, ARG(8));
		Fgt(ARG(7), 2);
		if(CL_TRUEP(ARG(7)))
		{
			goto THEN1;
		}
		else
		{
			COPY(ARG(2), ARG(8));
			LOAD_FIXNUM(ARG(9), -3, ARG(9));
			Flt(ARG(8), 2);
		}
		if(CL_TRUEP(ARG(8)))
		{
			THEN1:;
			LOAD_FIXNUM(ARG(7), 0, ARG(4));
		}
		else
		{
			COPY(ARG(2), ARG(4));
			LOAD_FIXNUM(ARG(7), 0, ARG(2));
		}
		COPY(ARG(4), ARG(7));
		Fminusp(ARG(7));
		if(CL_TRUEP(ARG(7)))
		{
			LOAD_CHAR(ARG(7), '0', ARG(7));
			COPY(ARG(1), ARG(8));
			write_char1(ARG(7));
			mv_count = 1;
			LOAD_CHAR(ARG(7), '.', ARG(7));
			COPY(ARG(1), ARG(8));
			write_char1(ARG(7));
			mv_count = 1;
			LOAD_FIXNUM(ARG(7), 0, ARG(7));
			M1_1:;
			COPY(ARG(7), ARG(8));
			COPY(ARG(4), ARG(9));
			Fminus(ARG(9), 1);
			F1minus(ARG(9));
			Fge(ARG(8), 2);
			if(CL_TRUEP(ARG(8)))
			{
				goto RETURN1;
			}
			LOAD_CHAR(ARG(8), '0', ARG(8));
			COPY(ARG(1), ARG(9));
			write_char1(ARG(8));
			mv_count = 1;
			F1plus(ARG(7));
			goto M1_1;
			RETURN1:;
			LOAD_FIXNUM(ARG(7), -1, ARG(4));
		}
		M2_1:;
		COPY(ARG(5), ARG(7));
		LOAD_FIXNUM(ARG(8), 10, ARG(8));
		Fmult(ARG(7), 2);
		COPY(ARG(7), ARG(5));
		LOAD_FIXNUM(ARG(7), 10, ARG(7));
		COPY(ARG(3), ARG(8));
		Fmult(ARG(7), 2);
		LOAD_FIXNUM(ARG(8), 1, ARG(8));
		LOAD_FIXNUM(ARG(8), 1, ARG(8));
		rt_truncate(ARG(7));
		COPY(&mv_buf[0], ARG(8));
		{
			int nargs;
			nargs = 2;
			mv_count = 1;
			{
				switch(nargs)
				{
					case 0:
					LOAD_NIL(ARG(7));
					case 1:
					LOAD_NIL(ARG(8));
					nargs = 2;
				}
				COPY(ARG(7), ARG(6));
				COPY(ARG(8), ARG(3));
			}
		}
		COPY(ARG(3), ARG(7));
		LOAD_FIXNUM(ARG(8), 1, ARG(8));
		COPY(ARG(5), ARG(9));
		Fminus(ARG(8), 2);
		Fge(ARG(7), 2);
		if(CL_TRUEP(ARG(7)))
		{
			goto THEN2;
		}
		else
		{
			COPY(ARG(3), ARG(8));
			COPY(ARG(5), ARG(9));
			Fle(ARG(8), 2);
		}
		if(CL_TRUEP(ARG(8)))
		{
			THEN2:;
			goto RETURN2;
		}
		COPY(ARG(6), ARG(7));
		LOAD_FIXNUM(ARG(8), 10, ARG(8));
		digit_char1(ARG(7));
		COPY(ARG(1), ARG(8));
		write_char1(ARG(7));
		mv_count = 1;
		COPY(ARG(4), ARG(7));
		Fzerop(ARG(7));
		if(CL_TRUEP(ARG(7)))
		{
			LOAD_CHAR(ARG(7), '.', ARG(7));
			COPY(ARG(1), ARG(8));
			write_char1(ARG(7));
			mv_count = 1;
		}
		F1minus(ARG(4));
		goto M2_1;
		RETURN2:;
		COPY(ARG(3), ARG(7));
		GEN_FLOAT(ARG(8), 0.5, ARG(8));
		Fge(ARG(7), 2);
		if(CL_TRUEP(ARG(7)))
		{
			F1plus(ARG(6));
		}
		COPY(ARG(6), ARG(7));
		LOAD_FIXNUM(ARG(8), 10, ARG(8));
		digit_char1(ARG(7));
		COPY(ARG(1), ARG(8));
		write_char1(ARG(7));
		mv_count = 1;
		COPY(ARG(4), ARG(7));
		LOAD_FIXNUM(ARG(8), 0, ARG(8));
		Fge(ARG(7), 2);
		if(CL_TRUEP(ARG(7)))
		{
			LOAD_FIXNUM(ARG(7), 0, ARG(7));
			M3_1:;
			COPY(ARG(7), ARG(8));
			COPY(ARG(4), ARG(9));
			Fge(ARG(8), 2);
			if(CL_TRUEP(ARG(8)))
			{
				goto RETURN3;
			}
			LOAD_CHAR(ARG(8), '0', ARG(8));
			COPY(ARG(1), ARG(9));
			write_char1(ARG(8));
			mv_count = 1;
			F1plus(ARG(7));
			goto M3_1;
			RETURN3:;
			LOAD_CHAR(ARG(7), '.', ARG(7));
			COPY(ARG(1), ARG(8));
			write_char1(ARG(7));
			mv_count = 1;
			LOAD_CHAR(ARG(7), '0', ARG(7));
			COPY(ARG(1), ARG(8));
			write_char1(ARG(7));
			mv_count = 1;
		}
		COPY(ARG(2), ARG(7));
		Fzerop(ARG(7));
		if(CL_TRUEP(ARG(7)))
		{
		}
		else
		{
			LOAD_CHAR(ARG(7), 'E', ARG(7));
			COPY(ARG(1), ARG(8));
			write_char1(ARG(7));
			mv_count = 1;
			COPY(ARG(2), ARG(7));
			COPY(ARG(1), ARG(8));
			print_integer(ARG(7));
			mv_count = 1;
		}
		LOAD_NIL(ARG(0));
	}
}
示例#13
0
文件: lisp475.c 项目: hoelzl/Clicc
void check_array_internal(CL_FORM *base)
{
	LOAD_BOOL(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 49), ARG(3));	/* * */
	if(CL_TRUEP(ARG(3)))
	{
		goto THEN1;
	}
	else
	{
		COPY(ARG(0), ARG(4));
		array_element_type_internal(ARG(4));
		to_element_type(ARG(4));
		COPY(ARG(1), ARG(5));
		Fupgraded_array_element_type(ARG(5));
	}
	if(EQL(ARG(4), ARG(5)))
	{
		THEN1:;
		LOAD_BOOL(CL_SYMBOLP(ARG(2)) && GET_SYMBOL(ARG(2)) == SYMBOL(Slisp, 49), ARG(3));	/* * */
		if(CL_TRUEP(ARG(3)))
		{
			COPY(ARG(3), ARG(0));
		}
		else
		{
			if(CL_ATOMP(ARG(2)))
			{
				COPY(ARG(0), ARG(4));
				Farray_rank(ARG(4));
				COPY(ARG(2), ARG(5));
				Fnumeql(ARG(4), 2);
				COPY(ARG(4), ARG(0));
			}
			else
			{
				COPY(ARG(0), ARG(4));
				Farray_rank(ARG(4));
				COPY(ARG(2), ARG(5));
				Flength(ARG(5));
				Fnumeql(ARG(4), 2);
				if(CL_TRUEP(ARG(4)))
				{
					LOAD_NIL(ARG(4));
					LOAD_FIXNUM(ARG(5), 0, ARG(5));
					M1_1:;
					COPY(ARG(5), ARG(6));
					COPY(ARG(2), ARG(7));
					Flength(ARG(7));
					Fge(ARG(6), 2);
					if(CL_TRUEP(ARG(6)))
					{
						LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
						goto RETURN1;
					}
					COPY(ARG(2), ARG(6));
					COPY(ARG(6), ARG(7));
					if(CL_CONSP(ARG(7)))
					{
						COPY(GET_CAR(ARG(7)), ARG(6));
					}
					else
					{
						if(CL_TRUEP(ARG(7)))
						{
							LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(6));	/* ~a is not a list */
							Ferror(ARG(6), 2);
						}
						else
						{
							COPY(ARG(7), ARG(6));
						}
					}
					COPY(ARG(2), ARG(7));
					COPY(ARG(7), ARG(8));
					if(CL_CONSP(ARG(8)))
					{
						COPY(GET_CDR(ARG(8)), ARG(2));
					}
					else
					{
						if(CL_TRUEP(ARG(8)))
						{
							LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(9));	/* ~a is not a list */
							COPY(ARG(8), ARG(10));
							Ferror(ARG(9), 2);
						}
						else
						{
							COPY(ARG(8), ARG(2));
						}
					}
					COPY(ARG(6), ARG(4));
					LOAD_BOOL(CL_SYMBOLP(ARG(4)) && GET_SYMBOL(ARG(4)) == SYMBOL(Slisp, 49), ARG(6));	/* * */
					if(CL_TRUEP(ARG(6)))
					{
						goto THEN2;
					}
					else
					{
						COPY(ARG(0), ARG(7));
						COPY(ARG(5), ARG(8));
						Farray_dimension(ARG(7));
						COPY(ARG(4), ARG(8));
						Fnumeql(ARG(7), 2);
					}
					if(CL_TRUEP(ARG(7)))
					{
						THEN2:;
					}
					else
					{
						LOAD_NIL(ARG(0));
						goto RETURN1;
					}
					F1plus(ARG(5));
					goto M1_1;
					RETURN1:;
				}
				else
				{
					LOAD_NIL(ARG(0));
				}
			}
		}
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
示例#14
0
文件: list_remove.c 项目: plops/clicc
void list_remove(CL_FORM *base)
{
	LOAD_NIL(ARG(8));
	LOAD_NIL(ARG(9));
	ALLOC_CONS(ARG(10), ARG(8), ARG(9), ARG(8));
	LOAD_SMALLFIXNUM(0, ARG(9));
	LOAD_NIL(ARG(10));
	LOAD_NIL(ARG(11));
	ALLOC_CONS(ARG(12), ARG(10), ARG(11), ARG(10));
	LOAD_SMALLFIXNUM(0, ARG(11));
	LOAD_NIL(ARG(12));
	COPY(ARG(1), ARG(13));
	M1_1:;
	if(CL_ATOMP(ARG(13)))
	{
		LOAD_NIL(ARG(12));
		goto RETURN1;
	}
	COPY(ARG(13), ARG(14));
	COPY(GET_CAR(ARG(14)), ARG(12));
	COPY(ARG(11), ARG(14));
	COPY(ARG(5), ARG(15));
	Fge(ARG(14), 2);
	if(CL_TRUEP(ARG(14)))
	{
		goto RETURN1;
	}
	COPY(ARG(11), ARG(14));
	COPY(ARG(4), ARG(15));
	Fge(ARG(14), 2);
	if(CL_TRUEP(ARG(14)))
	{
		COPY(ARG(3), ARG(14));
		COPY(ARG(0), ARG(15));
		if(CL_TRUEP(ARG(7)))
		{
			COPY(ARG(7), ARG(16));
			COPY(ARG(12), ARG(17));
			Ffuncall(ARG(16), 2);
			mv_count = 1;
		}
		else
		{
			COPY(ARG(12), ARG(16));
		}
		Ffuncall(ARG(14), 3);
		mv_count = 1;
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(14)))
	{
		COPY(ARG(11), ARG(14));
		COPY(ARG(8), ARG(15));
		add_q(ARG(14));
		COPY(ARG(9), ARG(14));
		F1plus(ARG(14));
		COPY(ARG(14), ARG(9));
	}
	ELSE1:;
	COPY(ARG(11), ARG(14));
	F1plus(ARG(14));
	COPY(ARG(14), ARG(11));
	COPY(ARG(13), ARG(14));
	COPY(GET_CDR(ARG(14)), ARG(13));
	goto M1_1;
	RETURN1:;
	COPY(ARG(8), ARG(11));
	COPY(ARG(11), ARG(12));
	COPY(GET_CAR(ARG(12)), ARG(8));
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_SMALLFIXNUM(0, ARG(11));
		M2_1:;
		if(CL_TRUEP(ARG(1)))
		{
			if(CL_CONSP(ARG(1)))
			{
				LOAD_NIL(ARG(12));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[233], ARG(12));	/* ~a is not a list */
				COPY(ARG(1), ARG(13));
				Ferror(ARG(12), 2);
			}
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(12));	/* T */
		}
		if(CL_TRUEP(ARG(12)))
		{
			goto THEN2;
		}
		else
		{
			COPY(ARG(11), ARG(13));
			COPY(ARG(5), ARG(14));
			Fge(ARG(13), 2);
		}
		if(CL_TRUEP(ARG(13)))
		{
			THEN2:;
			goto RETURN2;
		}
		COPY(ARG(9), ARG(12));
		COPY(ARG(6), ARG(13));
		Fle(ARG(12), 2);
		if(CL_TRUEP(ARG(12)))
		{
			if(CL_CONSP(ARG(8)))
			{
				COPY(GET_CAR(ARG(8)), ARG(13));
			}
			else
			{
				if(CL_TRUEP(ARG(8)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(13));	/* ~a is not a list */
					COPY(ARG(8), ARG(14));
					Ferror(ARG(13), 2);
				}
				else
				{
					COPY(ARG(8), ARG(13));
				}
			}
		}
		else
		{
			goto ELSE3;
		}
		if(EQL(ARG(11), ARG(13)))
		{
			if(CL_CONSP(ARG(8)))
			{
			}
			else
			{
				if(CL_TRUEP(ARG(8)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
					COPY(ARG(8), ARG(13));
					Ferror(ARG(12), 2);
				}
				else
				{
				}
			}
			COPY(ARG(8), ARG(12));
			COPY(ARG(12), ARG(13));
			if(CL_CONSP(ARG(13)))
			{
				COPY(GET_CDR(ARG(13)), ARG(8));
			}
			else
			{
				if(CL_TRUEP(ARG(13)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(14));	/* ~a is not a list */
					COPY(ARG(13), ARG(15));
					Ferror(ARG(14), 2);
				}
				else
				{
					LOAD_NIL(ARG(8));
				}
			}
			COPY(ARG(9), ARG(12));
			F1minus(ARG(12));
			COPY(ARG(12), ARG(9));
			if(CL_CONSP(ARG(1)))
			{
			}
			else
			{
				if(CL_TRUEP(ARG(1)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
					COPY(ARG(1), ARG(13));
					Ferror(ARG(12), 2);
				}
				else
				{
				}
			}
			COPY(ARG(1), ARG(12));
			COPY(ARG(12), ARG(13));
			if(CL_CONSP(ARG(13)))
			{
				COPY(GET_CDR(ARG(13)), ARG(1));
			}
			else
			{
				if(CL_TRUEP(ARG(13)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(14));	/* ~a is not a list */
					COPY(ARG(13), ARG(15));
					Ferror(ARG(14), 2);
				}
				else
				{
					LOAD_NIL(ARG(1));
				}
			}
		}
		else
		{
			ELSE3:;
			if(CL_CONSP(ARG(1)))
			{
				COPY(GET_CAR(ARG(1)), ARG(12));
			}
			else
			{
				if(CL_TRUEP(ARG(1)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
					COPY(ARG(1), ARG(13));
					Ferror(ARG(12), 2);
				}
				else
				{
					COPY(ARG(1), ARG(12));
				}
			}
			COPY(ARG(1), ARG(13));
			COPY(ARG(13), ARG(14));
			if(CL_CONSP(ARG(14)))
			{
				COPY(GET_CDR(ARG(14)), ARG(1));
			}
			else
			{
				if(CL_TRUEP(ARG(14)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(15));	/* ~a is not a list */
					COPY(ARG(14), ARG(16));
					Ferror(ARG(15), 2);
				}
				else
				{
					LOAD_NIL(ARG(1));
				}
			}
			COPY(ARG(10), ARG(13));
			add_q(ARG(12));
			if(CL_CONSP(ARG(8)))
			{
				COPY(GET_CAR(ARG(8)), ARG(13));
			}
			else
			{
				if(CL_TRUEP(ARG(8)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(13));	/* ~a is not a list */
					COPY(ARG(8), ARG(14));
					Ferror(ARG(13), 2);
				}
				else
				{
					COPY(ARG(8), ARG(13));
				}
			}
			if(EQL(ARG(11), ARG(13)))
			{
				if(CL_CONSP(ARG(8)))
				{
				}
				else
				{
					if(CL_TRUEP(ARG(8)))
					{
						LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
						COPY(ARG(8), ARG(13));
						Ferror(ARG(12), 2);
					}
					else
					{
					}
				}
				COPY(ARG(8), ARG(12));
				COPY(ARG(12), ARG(13));
				if(CL_CONSP(ARG(13)))
				{
					COPY(GET_CDR(ARG(13)), ARG(8));
				}
				else
				{
					if(CL_TRUEP(ARG(13)))
					{
						LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(14));	/* ~a is not a list */
						COPY(ARG(13), ARG(15));
						Ferror(ARG(14), 2);
					}
					else
					{
						LOAD_NIL(ARG(8));
					}
				}
				COPY(ARG(9), ARG(12));
				F1minus(ARG(12));
				COPY(ARG(12), ARG(9));
			}
		}
		F1plus(ARG(11));
		goto M2_1;
		RETURN2:;
	}
	else
	{
		LOAD_SMALLFIXNUM(0, ARG(11));
		M3_1:;
		if(CL_TRUEP(ARG(1)))
		{
			if(CL_CONSP(ARG(1)))
			{
				LOAD_NIL(ARG(12));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[233], ARG(12));	/* ~a is not a list */
				COPY(ARG(1), ARG(13));
				Ferror(ARG(12), 2);
			}
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(12));	/* T */
		}
		if(CL_TRUEP(ARG(12)))
		{
			goto THEN4;
		}
		else
		{
			COPY(ARG(11), ARG(13));
			COPY(ARG(5), ARG(14));
			Fge(ARG(13), 2);
		}
		if(CL_TRUEP(ARG(13)))
		{
			THEN4:;
			goto RETURN3;
		}
		COPY(ARG(6), ARG(12));
		Fplusp(ARG(12));
		if(CL_TRUEP(ARG(12)))
		{
			if(CL_CONSP(ARG(8)))
			{
				COPY(GET_CAR(ARG(8)), ARG(13));
			}
			else
			{
				if(CL_TRUEP(ARG(8)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(13));	/* ~a is not a list */
					COPY(ARG(8), ARG(14));
					Ferror(ARG(13), 2);
				}
				else
				{
					COPY(ARG(8), ARG(13));
				}
			}
		}
		else
		{
			goto ELSE5;
		}
		if(EQL(ARG(11), ARG(13)))
		{
			if(CL_CONSP(ARG(8)))
			{
			}
			else
			{
				if(CL_TRUEP(ARG(8)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
					COPY(ARG(8), ARG(13));
					Ferror(ARG(12), 2);
				}
				else
				{
				}
			}
			COPY(ARG(8), ARG(12));
			COPY(ARG(12), ARG(13));
			if(CL_CONSP(ARG(13)))
			{
				COPY(GET_CDR(ARG(13)), ARG(8));
			}
			else
			{
				if(CL_TRUEP(ARG(13)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(14));	/* ~a is not a list */
					COPY(ARG(13), ARG(15));
					Ferror(ARG(14), 2);
				}
				else
				{
					LOAD_NIL(ARG(8));
				}
			}
			COPY(ARG(6), ARG(12));
			F1minus(ARG(12));
			COPY(ARG(12), ARG(6));
			if(CL_CONSP(ARG(1)))
			{
			}
			else
			{
				if(CL_TRUEP(ARG(1)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
					COPY(ARG(1), ARG(13));
					Ferror(ARG(12), 2);
				}
				else
				{
				}
			}
			COPY(ARG(1), ARG(12));
			COPY(ARG(12), ARG(13));
			if(CL_CONSP(ARG(13)))
			{
				COPY(GET_CDR(ARG(13)), ARG(1));
			}
			else
			{
				if(CL_TRUEP(ARG(13)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(14));	/* ~a is not a list */
					COPY(ARG(13), ARG(15));
					Ferror(ARG(14), 2);
				}
				else
				{
					LOAD_NIL(ARG(1));
				}
			}
		}
		else
		{
			ELSE5:;
			if(CL_CONSP(ARG(1)))
			{
				COPY(GET_CAR(ARG(1)), ARG(12));
			}
			else
			{
				if(CL_TRUEP(ARG(1)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(12));	/* ~a is not a list */
					COPY(ARG(1), ARG(13));
					Ferror(ARG(12), 2);
				}
				else
				{
					COPY(ARG(1), ARG(12));
				}
			}
			COPY(ARG(1), ARG(13));
			COPY(ARG(13), ARG(14));
			if(CL_CONSP(ARG(14)))
			{
				COPY(GET_CDR(ARG(14)), ARG(1));
			}
			else
			{
				if(CL_TRUEP(ARG(14)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(15));	/* ~a is not a list */
					COPY(ARG(14), ARG(16));
					Ferror(ARG(15), 2);
				}
				else
				{
					LOAD_NIL(ARG(1));
				}
			}
			COPY(ARG(10), ARG(13));
			add_q(ARG(12));
		}
		F1plus(ARG(11));
		goto M3_1;
		RETURN3:;
	}
	COPY(GET_CAR(ARG(10)), ARG(0));
}
示例#15
0
文件: lisp369.c 项目: hoelzl/Clicc
void unparse_unix_enough(CL_FORM *base)
{
	LOAD_NIL(ARG(2));
	LOAD_NIL(ARG(3));
	ALLOC_CONS(ARG(4), ARG(2), ARG(3), ARG(2));
	COPY(ARG(0), ARG(3));
	Ppathname_directory(ARG(3));
	COPY(ARG(1), ARG(4));
	Ppathname_directory(ARG(4));
	COPY(ARG(4), ARG(5));
	Flength(ARG(5));
	COPY(ARG(5), ARG(6));
	LOAD_FIXNUM(ARG(7), 1, ARG(7));
	Fgt(ARG(6), 2);
	if(CL_TRUEP(ARG(6)))
	{
		COPY(ARG(3), ARG(6));
		Flength(ARG(6));
		COPY(ARG(5), ARG(7));
		Fge(ARG(6), 2);
		if(CL_TRUEP(ARG(6)))
		{
			COPY(ARG(3), ARG(6));
			LOAD_FIXNUM(ARG(7), 0, ARG(7));
			COPY(ARG(5), ARG(8));
			subseq1(ARG(6));
			COPY(ARG(4), ARG(7));
			compare_component(ARG(6));
		}
		else
		{
			goto ELSE1;
		}
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(6)))
	{
		LOAD_SYMBOL(SYMBOL(Slisp, 270), ARG(6));	/* RELATIVE */
		COPY(ARG(5), ARG(7));
		COPY(ARG(3), ARG(8));
		Fnthcdr(ARG(7));
		ALLOC_CONS(ARG(8), ARG(6), ARG(7), ARG(6));
	}
	else
	{
		ELSE1:;
		if(CL_CONSP(ARG(3)))
		{
			COPY(GET_CAR(ARG(3)), ARG(6));
		}
		else
		{
			if(CL_TRUEP(ARG(3)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(6));	/* ~a is not a list */
				COPY(ARG(3), ARG(7));
				Ferror(ARG(6), 2);
			}
			else
			{
				COPY(ARG(3), ARG(6));
			}
		}
		if(CL_SYMBOLP(ARG(6)) && GET_SYMBOL(ARG(6)) == SYMBOL(Slisp, 267))	/* ABSOLUTE */
		{
			COPY(ARG(3), ARG(6));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[232], ARG(6));	/* ~S cannot be represented relative to ~S */
			COPY(ARG(0), ARG(7));
			COPY(ARG(1), ARG(8));
			Ferror(ARG(6), 3);
		}
	}
	COPY(ARG(6), ARG(7));
	unparse_unix_directory_list(ARG(7));
	COPY(ARG(2), ARG(8));
	add_q(ARG(7));
	COPY(ARG(0), ARG(3));
	Ppathname_version(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
		if(CL_SYMBOLP(ARG(3)) && GET_SYMBOL(ARG(3)) == SYMBOL(Slisp, 269))	/* NEWEST */
		{
			LOAD_NIL(ARG(4));
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
		}
	}
	else
	{
		LOAD_NIL(ARG(4));
	}
	COPY(ARG(0), ARG(5));
	Ppathname_type(ARG(5));
	if(CL_TRUEP(ARG(4)))
	{
		COPY(ARG(4), ARG(6));
	}
	else
	{
		if(CL_TRUEP(ARG(5)))
		{
			if(CL_SYMBOLP(ARG(5)) && GET_SYMBOL(ARG(5)) == SYMBOL(Slisp, 266))	/* UNSPECIFIC */
			{
				LOAD_NIL(ARG(6));
			}
			else
			{
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
			}
		}
		else
		{
			LOAD_NIL(ARG(6));
		}
	}
	COPY(ARG(0), ARG(7));
	Ppathname_name(ARG(7));
	if(CL_TRUEP(ARG(6)))
	{
		COPY(ARG(6), ARG(8));
	}
	else
	{
		if(CL_TRUEP(ARG(7)))
		{
			COPY(ARG(7), ARG(8));
			COPY(ARG(1), ARG(9));
			Ppathname_name(ARG(9));
			compare_component(ARG(8));
			if(CL_TRUEP(ARG(8)))
			{
				LOAD_NIL(ARG(8));
			}
			else
			{
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(8));	/* T */
			}
		}
		else
		{
			LOAD_NIL(ARG(8));
		}
	}
	if(CL_TRUEP(ARG(8)))
	{
		if(CL_TRUEP(ARG(7)))
		{
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[232], ARG(9));	/* ~S cannot be represented relative to ~S */
			COPY(ARG(0), ARG(10));
			COPY(ARG(1), ARG(11));
			Ferror(ARG(9), 3);
		}
		COPY(ARG(7), ARG(9));
		unparse_unix_piece(ARG(9));
		COPY(ARG(2), ARG(10));
		add_q(ARG(9));
	}
	if(CL_TRUEP(ARG(6)))
	{
		if(CL_TRUEP(ARG(5)))
		{
			LOAD_NIL(ARG(9));
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(9));	/* T */
		}
		if(CL_TRUEP(ARG(9)))
		{
			goto THEN2;
		}
		else
		{
		}	/* UNSPECIFIC */
		if(CL_SYMBOLP(ARG(5)) && GET_SYMBOL(ARG(5)) == SYMBOL(Slisp, 266))
		{
			THEN2:;
			LOAD_SMSTR((CL_FORM *)&KClisp[232], ARG(9));	/* ~S cannot be represented relative to ~S */
			COPY(ARG(0), ARG(10));
			COPY(ARG(1), ARG(11));
			Ferror(ARG(9), 3);
		}
		LOAD_SMSTR((CL_FORM *)&Kunparse_unix_enough[0], ARG(9));	/* . */
		COPY(ARG(2), ARG(10));
		add_q(ARG(9));
		COPY(ARG(5), ARG(9));
		unparse_unix_piece(ARG(9));
		COPY(ARG(2), ARG(10));
		add_q(ARG(9));
	}
	if(CL_TRUEP(ARG(4)))
	{
		if(CL_SYMBOLP(ARG(3)) && GET_SYMBOL(ARG(3)) == SYMBOL(Slisp, 271))	/* WILD */
		{
			LOAD_SMSTR((CL_FORM *)&Kunparse_unix_enough[2], ARG(9));	/* .* */
			COPY(ARG(2), ARG(10));
			add_q(ARG(9));
		}
		else
		{
			if(CL_FIXNUMP(ARG(3)))
			{
				LOAD_NIL(ARG(9));
				LOAD_SMSTR((CL_FORM *)&Kunparse_unix_enough[4], ARG(10));	/* .~D */
				COPY(ARG(3), ARG(11));
				Fformat(ARG(9), 3);
				mv_count = 1;
				COPY(ARG(2), ARG(10));
				add_q(ARG(9));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[232], ARG(9));	/* ~S cannot be represented relative to ~S */
				COPY(ARG(0), ARG(10));
				COPY(ARG(1), ARG(11));
				Ferror(ARG(9), 3);
			}
		}
	}
	LOAD_GLOBFUN(&CFconcatenate, ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 40), ARG(4));	/* SIMPLE-STRING */
	COPY(GET_CAR(ARG(2)), ARG(5));
	Fapply(ARG(3), 3);
	COPY(ARG(3), ARG(0));
}
示例#16
0
文件: lisp355.c 项目: plops/clicc
static void Z122_check_for(CL_FORM *base)
{
	COPY(ARG(1), ARG(2));
	LOAD_SYMBOL(SYMBOL(Slisp, 248), ARG(3));	/* PATTERN */
	rt_struct_typep(ARG(2));
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_NIL(ARG(2));
		COPY(ARG(1), ARG(3));
		pattern_pieces(ARG(3));
		M1_1:;
		if(CL_ATOMP(ARG(3)))
		{
			LOAD_NIL(ARG(2));
			COPY(ARG(2), ARG(0));
			goto RETURN1;
		}
		COPY(ARG(3), ARG(4));
		COPY(GET_CAR(ARG(4)), ARG(2));
		if(CL_SMSTRP(ARG(2)))
		{
			COPY(ARG(0), ARG(4));
			COPY(ARG(2), ARG(5));
			Z122_check_for(ARG(4));
			bool_result = CL_TRUEP(ARG(4));
		}
		else
		{
			if(CL_CONSP(ARG(2)))
			{
				if(CL_CONSP(ARG(1)))
				{
					COPY(GET_CAR(ARG(1)), ARG(4));
				}
				else
				{
					if(CL_TRUEP(ARG(1)))
					{
						LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(4));	/* ~a is not a list */
						COPY(ARG(1), ARG(5));
						Ferror(ARG(4), 2);
					}
					else
					{
						COPY(ARG(1), ARG(4));
					}
				}
				if(CL_SYMBOLP(ARG(4)) && GET_SYMBOL(ARG(4)) == SYMBOL(Slisp, 255))	/* CHARACTER-SET */
				{
					COPY(ARG(0), ARG(5));
					if(CL_CONSP(ARG(1)))
					{
						COPY(GET_CDR(ARG(1)), ARG(6));
					}
					else
					{
						if(CL_TRUEP(ARG(1)))
						{
							LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(6));	/* ~a is not a list */
							COPY(ARG(1), ARG(7));
							Ferror(ARG(6), 2);
						}
						else
						{
							COPY(ARG(1), ARG(6));
						}
					}
					Z122_check_for(ARG(5));
				}
				else
				{
					goto ELSE1;
				}
			}
			else
			{
				goto ELSE1;
			}
			bool_result = CL_TRUEP(ARG(5));
		}
		if(bool_result)
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
			goto RETURN1;
		}
		ELSE1:;
		COPY(ARG(3), ARG(4));
		COPY(GET_CDR(ARG(4)), ARG(3));
		goto M1_1;
		RETURN1:;
	}
	else
	{
		if(CL_LISTP(ARG(1)))
		{
			LOAD_NIL(ARG(2));
			COPY(ARG(1), ARG(3));
			M2_1:;
			if(CL_ATOMP(ARG(3)))
			{
				LOAD_NIL(ARG(2));
				COPY(ARG(2), ARG(0));
				goto RETURN2;
			}
			COPY(ARG(3), ARG(4));
			COPY(GET_CAR(ARG(4)), ARG(2));
			COPY(ARG(0), ARG(4));
			COPY(ARG(2), ARG(5));
			Z122_check_for(ARG(4));
			if(CL_TRUEP(ARG(4)))
			{
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
				goto RETURN2;
			}
			COPY(ARG(3), ARG(4));
			COPY(GET_CDR(ARG(4)), ARG(3));
			goto M2_1;
			RETURN2:;
		}
		else
		{
			if(CL_SMSTRP(ARG(1)))
			{
				COPY(ARG(1), ARG(2));
				Flength(ARG(2));
				LOAD_SMALLFIXNUM(0, ARG(3));
				M3_1:;
				COPY(ARG(3), ARG(4));
				COPY(ARG(2), ARG(5));
				Fge(ARG(4), 2);
				if(CL_TRUEP(ARG(4)))
				{
					LOAD_NIL(ARG(0));
					goto RETURN3;
				}
				COPY(ARG(0), ARG(4));
				COPY(ARG(1), ARG(5));
				COPY(ARG(3), ARG(6));
				Fschar(ARG(5));
				Ffuncall(ARG(4), 2);
				mv_count = 1;
				if(CL_TRUEP(ARG(4)))
				{
					LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
					goto RETURN3;
				}
				F1plus(ARG(3));
				goto M3_1;
				RETURN3:;
			}
			else
			{
				if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 256))	/* UNSPECIFIC */
				{
					LOAD_NIL(ARG(0));
				}
				else
				{
					LOAD_SMSTR((CL_FORM *)&Kmaybe_diddle_case[0], ARG(0));	/* etypecase: the value ~a is not a legal value */
					Ferror(ARG(0), 2);
				}
			}
		}
	}
}
示例#17
0
文件: lisp143.c 项目: hoelzl/Clicc
void vector_push_extend1(CL_FORM *base)
{
	COPY(ARG(1), ARG(3));
	Farray_has_fill_pointer_p(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		COPY(SYMVAL(Slisp, 154), ARG(3));	/* NO_FILL_PTR */
		COPY(ARG(1), ARG(4));
		Ferror(ARG(3), 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(OFFSET(AR_BASE(GET_FORM(ARG(1))), 3 + 1), ARG(3));
	}
	else
	{
		COPY(SYMVAL(Slisp, 352), ARG(3));	/* NO_STRUCT */
		COPY(ARG(1), ARG(4));
		LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(5));	/* COMPLEX-VECTOR */
		Ferror(ARG(3), 3);
	}
	COPY(ARG(3), ARG(4));
	COPY(ARG(1), ARG(5));
	Farray_total_size(ARG(5));
	Fge(ARG(4), 2);
	if(CL_TRUEP(ARG(4)))
	{
		COPY(ARG(1), ARG(4));
		if(CL_TRUEP(ARG(2)))
		{
			COPY(ARG(1), ARG(5));
			Farray_total_size(ARG(5));
			COPY(ARG(2), ARG(6));
			Fplus(ARG(5), 2);
		}
		else
		{
			LOAD_FIXNUM(ARG(5), 2, ARG(5));
			COPY(ARG(1), ARG(6));
			Farray_total_size(ARG(6));
			Fmult(ARG(5), 2);
		}
		LOAD_NIL(ARG(6));
		LOAD_NIL(ARG(7));
		LOAD_NIL(ARG(8));
		COPY(ARG(3), ARG(9));
		LOAD_NIL(ARG(10));
		LOAD_NIL(ARG(11));
		LOAD_SYMBOL(SYMBOL(Slisp, 101), ARG(12));	/* FILL-POINTER */
		COPY(ARG(3), ARG(13));
		Flist(ARG(12), 2);
		LOAD_NIL(ARG(13));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(14));	/* T */
		adjust_array1(ARG(4));
	}
	COPY(ARG(0), ARG(4));
	COPY(ARG(1), ARG(5));
	COPY(ARG(3), ARG(6));
	rt_set_vref(ARG(4));
	COPY(ARG(3), ARG(4));
	F1plus(ARG(4));
	COPY(ARG(1), ARG(5));
	Fset_fill_pointer(ARG(4));
	COPY(ARG(3), ARG(0));
}
示例#18
0
文件: lisp317.c 项目: plops/clicc
void concatenate_to_non_list(CL_FORM *base, int nargs)
{
	Flist(STACK(base, 1), nargs - 1);
	LOAD_NIL(STACK(base, 2));
	LOAD_FIXNUM(0, STACK(base, 3));
	LOAD_FIXNUM(0, STACK(base, 4));
	LOAD_NIL(STACK(base, 5));
	COPY(STACK(base, 1), STACK(base, 6));
	M144_1:;
	if(CL_ATOMP(STACK(base, 6)))
	{
		LOAD_NIL(STACK(base, 5));
		goto RETURN158;
	}
	COPY(STACK(base, 6), STACK(base, 7));
	Fcar(STACK(base, 7));
	COPY(STACK(base, 7), STACK(base, 5));
	COPY(STACK(base, 3), STACK(base, 7));
	COPY(STACK(base, 5), STACK(base, 8));
	Flength(STACK(base, 8));
	Fplus(STACK(base, 7), 2);
	COPY(STACK(base, 7), STACK(base, 3));
	Fcdr(STACK(base, 6));
	goto M144_1;
	RETURN158:;
	COPY(STACK(base, 0), STACK(base, 5));
	COPY(STACK(base, 3), STACK(base, 6));
	Fmake_sequence(STACK(base, 5), 2);
	COPY(STACK(base, 5), STACK(base, 2));
	LOAD_NIL(STACK(base, 5));
	COPY(STACK(base, 1), STACK(base, 6));
	M145_1:;
	if(CL_ATOMP(STACK(base, 6)))
	{
		LOAD_NIL(STACK(base, 5));
		goto RETURN159;
	}
	COPY(STACK(base, 6), STACK(base, 7));
	Fcar(STACK(base, 7));
	COPY(STACK(base, 7), STACK(base, 5));
	if(CL_LISTP(STACK(base, 5)))
	{
		LOAD_NIL(STACK(base, 7));
		COPY(STACK(base, 5), STACK(base, 8));
		M146_1:;
		if(CL_ATOMP(STACK(base, 8)))
		{
			LOAD_NIL(STACK(base, 7));
			goto RETURN160;
		}
		COPY(STACK(base, 8), STACK(base, 9));
		Fcar(STACK(base, 9));
		COPY(STACK(base, 9), STACK(base, 7));
		COPY(STACK(base, 2), STACK(base, 10));
		COPY(STACK(base, 4), STACK(base, 11));
		Fset_elt(STACK(base, 9));
		COPY(STACK(base, 4), STACK(base, 9));
		F1plus(STACK(base, 9));
		COPY(STACK(base, 9), STACK(base, 4));
		Fcdr(STACK(base, 8));
		goto M146_1;
		RETURN160:;
	}
	else
	{
		COPY(STACK(base, 5), STACK(base, 7));
		Flength(STACK(base, 7));
		LOAD_FIXNUM(0, STACK(base, 8));
		M147_1:;
		COPY(STACK(base, 8), STACK(base, 9));
		COPY(STACK(base, 7), STACK(base, 10));
		Fge(STACK(base, 9), 2);
		if(CL_TRUEP(STACK(base, 9)))
		{
			goto RETURN161;
		}
		COPY(STACK(base, 5), STACK(base, 9));
		COPY(STACK(base, 8), STACK(base, 10));
		Felt(STACK(base, 9));
		COPY(STACK(base, 9), STACK(base, 10));
		COPY(STACK(base, 2), STACK(base, 11));
		COPY(STACK(base, 4), STACK(base, 12));
		Fset_elt(STACK(base, 10));
		COPY(STACK(base, 4), STACK(base, 9));
		F1plus(STACK(base, 9));
		COPY(STACK(base, 9), STACK(base, 4));
		F1plus(STACK(base, 8));
		goto M147_1;
		RETURN161:;
	}
	Fcdr(STACK(base, 6));
	goto M145_1;
	RETURN159:;
	COPY(STACK(base, 2), STACK(base, 0));
}