コード例 #1
0
ファイル: Fmapcon.c プロジェクト: hoelzl/Clicc
static void Z131_get_rest_args(CL_FORM *base, CL_FORM *display[])
{
	if(CL_ATOMP(ARG(0)))
	{
		LOAD_NIL(ARG(0));
	}
	else
	{
		COPY(GET_CAR(ARG(0)), ARG(1));
		if(CL_ATOMP(ARG(1)))
		{
			COPY(&display[1][0], ARG(1));
			LOAD_NIL(ARG(2));
			call_cont(ARG(1));
		}
		COPY(GET_CAR(ARG(0)), ARG(1));
		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(ARG(1), ARG(3));
		COPY(ARG(3), ARG(4));
		if(CL_CONSP(ARG(4)))
		{
			COPY(GET_CDR(ARG(4)), ARG(1));
		}
		else
		{
			if(CL_TRUEP(ARG(4)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(5));	/* ~a is not a list */
				COPY(ARG(4), ARG(6));
				Ferror(ARG(5), 2);
			}
			else
			{
				COPY(ARG(4), ARG(1));
			}
		}
		COPY(ARG(1), GET_CAR(ARG(0)));
		COPY(&display[0][1], ARG(1));
		COPY(GET_CDR(ARG(0)), ARG(2));
		Z131_get_rest_args(ARG(2), display);
		ALLOC_CONS(ARG(3), ARG(1), ARG(2), ARG(0));
	}
}
コード例 #2
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));
	}
}
コード例 #3
0
ファイル: patternE.c プロジェクト: hoelzl/Clicc
static void Z114_lambda(CL_FORM *base)
{
	if(CL_SMSTRP(ARG(0)))
	{
		if(CL_SMSTRP(ARG(1)))
		{
			LOAD_FIXNUM(ARG(2), 0, ARG(2));
			LOAD_NIL(ARG(3));
			LOAD_FIXNUM(ARG(4), 0, ARG(4));
			LOAD_NIL(ARG(5));
			stringE1(ARG(0));
		}
		else
		{
			LOAD_NIL(ARG(0));
		}
	}
	else
	{
		if(CL_CONSP(ARG(0)))
		{
			if(CL_CONSP(ARG(1)))
			{
				COPY(GET_CAR(ARG(0)), ARG(2));
				COPY(GET_CAR(ARG(1)), ARG(3));
				if(EQ(ARG(2), ARG(3)))
				{
					COPY(GET_CDR(ARG(0)), ARG(2));
					COPY(GET_CDR(ARG(1)), ARG(3));
					COPY(ARG(2), ARG(0));
					COPY(ARG(3), ARG(1));
					LOAD_FIXNUM(ARG(2), 0, ARG(2));
					LOAD_NIL(ARG(3));
					LOAD_FIXNUM(ARG(4), 0, ARG(4));
					LOAD_NIL(ARG(5));
					stringE1(ARG(0));
				}
				else
				{
					LOAD_NIL(ARG(0));
				}
			}
			else
			{
				LOAD_NIL(ARG(0));
			}
		}
		else
		{
			LOAD_BOOL(EQ(ARG(0), ARG(1)), ARG(0));
		}
	}
}
コード例 #4
0
ファイル: Flogeqv.c プロジェクト: hoelzl/Clicc
void Flogeqv(CL_FORM *base, int nargs)
{
	Flist(ARG(0), nargs - 0);
	LOAD_FIXNUM(ARG(1), -1, ARG(1));
	M1_1:;
	if(CL_TRUEP(ARG(0)))
	{
	}
	else
	{
		COPY(ARG(1), ARG(0));
		goto RETURN1;
	}
	COPY(ARG(0), ARG(3));
	COPY(ARG(3), ARG(4));
	if(CL_CONSP(ARG(4)))
	{
		COPY(GET_CAR(ARG(4)), ARG(3));
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(3));	/* ~a is not a list */
		Ferror(ARG(3), 2);
	}
	COPY(ARG(0), ARG(4));
	COPY(ARG(4), ARG(5));
	if(CL_CONSP(ARG(5)))
	{
		COPY(GET_CDR(ARG(5)), ARG(0));
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(6));	/* ~a is not a list */
		COPY(ARG(5), ARG(7));
		Ferror(ARG(6), 2);
	}
	if(CL_FIXNUMP(ARG(3)))
	{
	}
	else
	{
		COPY(ARG(3), ARG(4));
		LOAD_SMSTR((CL_FORM *)&KClisp[244], ARG(3));	/* type error: ~S is not of type ~S */
		LOAD_SYMBOL(SYMBOL(Slisp, 23), ARG(5));	/* FIXNUM */
		Ferror(ARG(3), 3);
	}
	LOAD_FIXNUM(ARG(4), GET_FIXNUM(ARG(1)) ^ GET_FIXNUM(ARG(3)), ARG(2));
	LOAD_FIXNUM(ARG(3),  ~ GET_FIXNUM(ARG(2)), ARG(1));
	goto M1_1;
	RETURN1:;
}
コード例 #5
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));
}
コード例 #6
0
ファイル: lisp503.c プロジェクト: hoelzl/Clicc
void null_or_quoted(CL_FORM *base)
{
	if(CL_TRUEP(ARG(0)))
	{
		LOAD_NIL(ARG(1));
	}
	else
	{
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(1));	/* T */
	}
	if(CL_TRUEP(ARG(1)))
	{
		COPY(ARG(1), ARG(0));
	}
	else
	{
		if(CL_CONSP(ARG(0)))
		{
			COPY(GET_CAR(ARG(0)), ARG(2));
			LOAD_BOOL(EQ(ARG(2), SYMVAL(Slisp, 444)), ARG(0));	/* *BQ-QUOTE* */
		}
		else
		{
			LOAD_NIL(ARG(0));
		}
	}
}
コード例 #7
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));
		}
	}
}
コード例 #8
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));
	}
}
コード例 #9
0
ファイル: Fset_elt.c プロジェクト: hoelzl/Clicc
void Fset_elt(CL_FORM *base)
{
	if(CL_CONSP(ARG(1)))
	{
		COPY(ARG(2), ARG(3));
		COPY(ARG(1), ARG(4));
		Fnthcdr(ARG(3));
		if(CL_CONSP(ARG(3)))
		{
			COPY(ARG(0), GET_CAR(ARG(3)));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[252], ARG(0));	/* ~a is not a cons */
			COPY(ARG(3), ARG(1));
			Ferror(ARG(0), 2);
		}
	}
	else
	{
		LOAD_BOOL(CL_SMVECP(ARG(1)), ARG(3));
		if(CL_TRUEP(ARG(3)))
		{
			goto THEN1;
		}
		else
		{
			COPY(ARG(1), ARG(4));
			LOAD_SYMBOL(SYMBOL(Slisp, 150), ARG(5));	/* COMPLEX-VECTOR */
			rt_struct_typep(ARG(4));
		}
		if(CL_TRUEP(ARG(4)))
		{
			THEN1:;
			Fset_row_major_aref(ARG(0));
		}
		else
		{
			COPY(SYMVAL(Slisp, 58), ARG(0));	/* WRONG_TYPE */
			LOAD_SYMBOL(SYMBOL(Slisp, 36), ARG(2));	/* SEQUENCE */
			Ferror(ARG(0), 3);
		}
	}
}
コード例 #10
0
ファイル: Fposition.c プロジェクト: hoelzl/Clicc
void Fposition(CL_FORM *base, int nargs)
{
	CL_FORM *rest_0;
	CL_FORM *local;
	rest_0 = ARG(2);
	local = ARG(nargs);
	if(CL_TRUEP(ARG(1)))
	{
		if(CL_CONSP(ARG(1)))
		{
			LOAD_GLOBFUN(&Clist_position, LOCAL(0));
			COPY(ARG(0), LOCAL(1));
			COPY(ARG(1), LOCAL(2));
			REST_APPLY(LOCAL(0), 3, rest_0);
			COPY(LOCAL(0), ARG(0));
		}
		else
		{
			LOAD_BOOL(CL_SMVECP(ARG(1)), LOCAL(0));
			if(CL_TRUEP(LOCAL(0)))
			{
				goto THEN1;
			}
			else
			{
				COPY(ARG(1), LOCAL(1));
				LOAD_SYMBOL(SYMBOL(Slisp, 150), LOCAL(2));	/* COMPLEX-VECTOR */
				rt_struct_typep(LOCAL(1));
			}
			if(CL_TRUEP(LOCAL(1)))
			{
				THEN1:;
				LOAD_GLOBFUN(&Cvector_position, LOCAL(0));
				COPY(ARG(0), LOCAL(1));
				COPY(ARG(1), LOCAL(2));
				REST_APPLY(LOCAL(0), 3, rest_0);
				COPY(LOCAL(0), ARG(0));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), LOCAL(0));	/* WRONG_TYPE */
				COPY(ARG(1), LOCAL(1));
				LOAD_SYMBOL(SYMBOL(Slisp, 36), LOCAL(2));	/* SEQUENCE */
				Ferror(LOCAL(0), 3);
			}
		}
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
コード例 #11
0
ファイル: Frplaca.c プロジェクト: plops/clicc
void Frplaca(CL_FORM *base)
{
	if(CL_CONSP(ARG(0)))
	{
		COPY(ARG(1), GET_CAR(ARG(0)));
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&KClisp[237], ARG(2));	/* ~a is not a cons */
		COPY(ARG(0), ARG(3));
		Ferror(ARG(2), 2);
	}
}
コード例 #12
0
ファイル: Fcar.c プロジェクト: hoelzl/Clicc
void Fcar(CL_FORM *base)
{
    if(CL_CONSP(ARG(0)))
    {
        COPY(GET_CAR(ARG(0)), ARG(0));
    }
    else
    {
        if(CL_TRUEP(ARG(0)))
        {
            LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(1));	/* ~a is not a list */
            COPY(ARG(0), ARG(2));
            Ferror(ARG(1), 2);
        }
        else
        {
        }
    }
}
コード例 #13
0
ファイル: Fendp.c プロジェクト: hoelzl/Clicc
void Fendp(CL_FORM *base)
{
	if(CL_TRUEP(ARG(0)))
	{
		if(CL_CONSP(ARG(0)))
		{
			LOAD_NIL(ARG(0));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[228], ARG(1));	/* ~a is not a list */
			COPY(ARG(0), ARG(2));
			Ferror(ARG(1), 2);
		}
	}
	else
	{
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
	}
}
コード例 #14
0
ファイル: lisp514.c プロジェクト: plops/clicc
void bq_splicing_frob(CL_FORM *base)
{
	if(CL_CONSP(ARG(0)))
	{
		COPY(GET_CAR(ARG(0)), ARG(1));
		LOAD_BOOL(EQ(ARG(1), SYMVAL(Slisp, 427)), ARG(1));	/* *COMMA-ATSIGN* */
		if(CL_TRUEP(ARG(1)))
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
		}
		else
		{
			COPY(GET_CAR(ARG(0)), ARG(2));
			LOAD_BOOL(EQ(ARG(2), SYMVAL(Slisp, 428)), ARG(0));	/* *COMMA-DOT* */
		}
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
}
コード例 #15
0
ファイル: lisp742.c プロジェクト: hoelzl/Clicc
void rt_simple_assoc(CL_FORM *base)
{
	LOAD_NIL(ARG(2));
	COPY(ARG(1), 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_CONSP(ARG(2)))
	{
		COPY(GET_CAR(ARG(2)), ARG(5));
	}
	else
	{
		if(CL_TRUEP(ARG(2)))
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(5));	/* ~a is not a list */
			COPY(ARG(2), ARG(6));
			Ferror(ARG(5), 2);
		}
		else
		{
			COPY(ARG(2), ARG(5));
		}
	}
	if(EQ(ARG(0), ARG(5)))
	{
		COPY(ARG(2), ARG(0));
		goto RETURN1;
	}
	COPY(ARG(3), ARG(4));
	COPY(GET_CDR(ARG(4)), ARG(3));
	goto M1_1;
	RETURN1:;
}
コード例 #16
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));
}
コード例 #17
0
ファイル: nunion1.c プロジェクト: hoelzl/Clicc
static void Z6_union_internal(CL_FORM *base, CL_FORM *display[])
{
	M1_1:;
	if(CL_TRUEP(ARG(0)))
	{
		if(CL_TRUEP(&display[0][4]))
		{
			COPY(&display[0][4], ARG(1));
			if(CL_CONSP(ARG(0)))
			{
				COPY(GET_CAR(ARG(0)), ARG(2));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(2));	/* ~a is not a list */
				COPY(ARG(0), ARG(3));
				Ferror(ARG(2), 2);
			}
			Ffuncall(ARG(1), 2);
			mv_count = 1;
		}
		else
		{
			if(CL_CONSP(ARG(0)))
			{
				COPY(GET_CAR(ARG(0)), ARG(1));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(1));	/* ~a is not a list */
				COPY(ARG(0), ARG(2));
				Ferror(ARG(1), 2);
			}
		}
		COPY(&display[0][1], ARG(2));
		COPY(&display[0][2], ARG(3));
		COPY(&display[0][4], ARG(4));
		COPY(ARG(1), ARG(5));
		COPY(ARG(2), ARG(6));
		COPY(ARG(3), ARG(7));
		LOAD_NIL(ARG(8));
		COPY(ARG(4), ARG(9));
		member1(ARG(5));
		if(CL_TRUEP(ARG(5)))
		{
			COPY(ARG(0), ARG(1));
			if(CL_CONSP(ARG(1)))
			{
				COPY(GET_CDR(ARG(1)), ARG(0));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(0));	/* ~a is not a list */
				Ferror(ARG(0), 2);
			}
			goto M1_1;
		}
		else
		{
			if(CL_CONSP(ARG(0)))
			{
				COPY(GET_CAR(ARG(0)), ARG(1));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(1));	/* ~a is not a list */
				COPY(ARG(0), ARG(2));
				Ferror(ARG(1), 2);
			}
			if(CL_CONSP(ARG(0)))
			{
				COPY(GET_CDR(ARG(0)), ARG(2));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(2));	/* ~a is not a list */
				COPY(ARG(0), ARG(3));
				Ferror(ARG(2), 2);
			}
			Z6_union_internal(ARG(2), display);
			ALLOC_CONS(ARG(3), ARG(1), ARG(2), ARG(0));
		}
	}
	else
	{
		COPY(&display[0][1], ARG(0));
	}
	goto RETURN1;
	RETURN1:;
}
コード例 #18
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));
}
コード例 #19
0
ファイル: rassoc_if1.c プロジェクト: hoelzl/Clicc
void rassoc_if1(CL_FORM *base)
{
	LOAD_NIL(ARG(3));
	COPY(ARG(1), ARG(4));
	M1_1:;
	if(CL_ATOMP(ARG(4)))
	{
		LOAD_NIL(ARG(3));
		COPY(ARG(3), ARG(0));
		goto RETURN2;
	}
	COPY(ARG(4), ARG(5));
	COPY(GET_CAR(ARG(5)), ARG(3));
	COPY(ARG(0), ARG(5));
	if(CL_TRUEP(ARG(2)))
	{
		COPY(ARG(2), ARG(6));
		if(CL_CONSP(ARG(3)))
		{
			COPY(GET_CDR(ARG(3)), ARG(7));
		}
		else
		{
			if(CL_TRUEP(ARG(3)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(7));	/* ~a is not a list */
				COPY(ARG(3), ARG(8));
				Ferror(ARG(7), 2);
			}
			else
			{
				COPY(ARG(3), ARG(7));
			}
		}
		Ffuncall(ARG(6), 2);
		mv_count = 1;
	}
	else
	{
		if(CL_CONSP(ARG(3)))
		{
			COPY(GET_CDR(ARG(3)), ARG(6));
		}
		else
		{
			if(CL_TRUEP(ARG(3)))
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(6));	/* ~a is not a list */
				COPY(ARG(3), ARG(7));
				Ferror(ARG(6), 2);
			}
			else
			{
				COPY(ARG(3), ARG(6));
			}
		}
	}
	Ffuncall(ARG(5), 2);
	mv_count = 1;
	if(CL_TRUEP(ARG(5)))
	{
		COPY(ARG(3), ARG(0));
		goto RETURN1;
	}
	COPY(ARG(4), ARG(5));
	COPY(GET_CDR(ARG(5)), ARG(4));
	goto M1_1;
	RETURN2:;
	RETURN1:;
}
コード例 #20
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));
	}
}
コード例 #21
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);
				}
			}
		}
	}
}
コード例 #22
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));
	}
}
コード例 #23
0
ファイル: lisp381.c プロジェクト: plops/clicc
void Penumerate_directories(CL_FORM *base)
{
	M1_1:;
	if(CL_TRUEP(ARG(1)))
	{
		if(CL_CONSP(ARG(1)))
		{
			COPY(GET_CAR(ARG(1)), ARG(5));
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[239], ARG(5));	/* ~a is not a list */
			COPY(ARG(1), ARG(6));
			Ferror(ARG(5), 2);
		}
		if(CL_SMSTRP(ARG(5)))
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(6));	/* STRING */
			COPY(ARG(0), ARG(7));
			COPY(ARG(5), ARG(8));
			LOAD_SMSTR((CL_FORM *)&KPenumerate_directories[0], ARG(9));	/* / */
			Fconcatenate(ARG(6), 4);
			if(CL_CONSP(ARG(1)))
			{
				COPY(GET_CDR(ARG(1)), ARG(7));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(7));	/* ~a is not a list */
				COPY(ARG(1), ARG(8));
				Ferror(ARG(7), 2);
			}
			COPY(ARG(6), ARG(0));
			COPY(ARG(7), ARG(1));
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(3));	/* T */
			goto M1_1;
		}
		else
		{
			if(CL_SYMBOLP(ARG(5)) && GET_SYMBOL(ARG(5)) == SYMBOL(Slisp, 265))	/* UP */
			{
				LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(6));	/* STRING */
				COPY(ARG(0), ARG(7));
				LOAD_SMSTR((CL_FORM *)&KPenumerate_directories[2], ARG(8));	/* ../ */
				Fconcatenate(ARG(6), 3);
				if(CL_CONSP(ARG(1)))
				{
					COPY(GET_CDR(ARG(1)), ARG(7));
				}
				else
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[241], ARG(7));	/* ~a is not a list */
					COPY(ARG(1), ARG(8));
					Ferror(ARG(7), 2);
				}
				COPY(ARG(6), ARG(0));
				COPY(ARG(7), ARG(1));
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(3));	/* T */
				goto M1_1;
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KPenumerate_directories[4], ARG(0));	/* etypecase: the value ~a is not a legal value */
				COPY(ARG(5), ARG(1));
				Ferror(ARG(0), 2);
			}
		}
	}
	else
	{
		COPY(ARG(2), ARG(1));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(2));	/* T */
		COPY(ARG(4), ARG(3));
		Penumerate_files(ARG(0));
	}
	goto RETURN1;
	RETURN1:;
}
コード例 #24
0
ファイル: Ftypep.c プロジェクト: hoelzl/Clicc
void Ftypep(CL_FORM *base)
{
	if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 48))	/* T */
	{
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
	}
	else
	{
		if(CL_TRUEP(ARG(1)))
		{
			if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 23))	/* FIXNUM */
			{
				if(CL_FIXNUMP(ARG(0)))
				{
					COPY(SYMVAL(Slisp, 1), ARG(2));	/* MOST-NEGATIVE-FIXNUM */
					COPY(ARG(0), ARG(3));
					COPY(SYMVAL(Slisp, 0), ARG(4));	/* MOST-POSITIVE-FIXNUM */
					Fle(ARG(2), 3);
					COPY(ARG(2), ARG(0));
				}
				else
				{
					LOAD_NIL(ARG(0));
				}
			}
			else
			{
				LOAD_BOOL(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 24), ARG(2));	/* FLOAT */
				if(CL_TRUEP(ARG(2)))
				{
					goto THEN1;
				}
				else
				{
					LOAD_BOOL(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 37), ARG(3));	/* SHORT-FLOAT */
					if(CL_TRUEP(ARG(3)))
					{
						goto THEN1;
					}
					else
					{
						LOAD_BOOL(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 42), ARG(4));	/* SINGLE-FLOAT */
						if(CL_TRUEP(ARG(4)))
						{
							goto THEN1;
						}
						else
						{
							LOAD_BOOL(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 22), ARG(5));	/* DOUBLE-FLOAT */
							if(CL_TRUEP(ARG(5)))
							{
								goto THEN1;
							}
							else
							{
							}	/* LONG-FLOAT */
						}
					}
				}
				if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 29))
				{
					THEN1:;
					LOAD_BOOL(CL_FLOATP(ARG(0)), ARG(0));
				}
				else
				{
					LOAD_BOOL(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 18), ARG(2));	/* CHARACTER */
					if(CL_TRUEP(ARG(2)))
					{
						goto THEN2;
					}
					else
					{
					}	/* STANDARD-CHAR */
					if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 43))
					{
						THEN2:;
						LOAD_BOOL(CL_CHARP(ARG(0)), ARG(0));
					}
					else
					{
						if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 28))	/* LIST */
						{
							LOAD_BOOL(CL_LISTP(ARG(0)), ARG(0));
						}
						else
						{
							if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 31))	/* NULL */
							{
								if(CL_TRUEP(ARG(0)))
								{
									LOAD_NIL(ARG(0));
								}
								else
								{
									LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
								}
							}
							else
							{
								if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 21))	/* CONS */
								{
									LOAD_BOOL(CL_CONSP(ARG(0)), ARG(0));
								}
								else
								{
									LOAD_SMSTR((CL_FORM *)&KClisp[86], ARG(2));	/* (TYPEP ~S ~S) is not implemented */
									COPY(ARG(0), ARG(3));
									COPY(ARG(1), ARG(4));
									Ferror(ARG(2), 3);
								}
							}
						}
					}
				}
			}
		}
		else
		{
			LOAD_NIL(ARG(0));
		}
	}
}
コード例 #25
0
ファイル: lisp785.c プロジェクト: hoelzl/Clicc
void Fget_properties(CL_FORM *base)
{
	M1_1:;
	if(CL_ATOMP(ARG(0)))
	{
		LOAD_NIL(ARG(0));
		LOAD_NIL(ARG(1));
		LOAD_NIL(ARG(2));
		COPY(ARG(1), &mv_buf[0]);
		COPY(ARG(2), &mv_buf[1]);
		mv_count = 3;
	}
	else
	{
		COPY(GET_CAR(ARG(0)), ARG(2));
		COPY(ARG(2), ARG(3));
		COPY(ARG(1), ARG(4));
		LOAD_NIL(ARG(5));
		LOAD_NIL(ARG(6));
		LOAD_NIL(ARG(7));
		member1(ARG(3));
		if(CL_TRUEP(ARG(3)))
		{
			COPY(GET_CAR(ARG(0)), ARG(2));
			COPY(GET_CDR(ARG(0)), ARG(3));
			if(CL_CONSP(ARG(3)))
			{
				COPY(GET_CAR(ARG(3)), ARG(3));
			}
			else
			{
				if(CL_TRUEP(ARG(3)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(4));	/* ~a is not a list */
					COPY(ARG(3), ARG(5));
					Ferror(ARG(4), 2);
				}
				else
				{
				}
			}
			COPY(ARG(0), ARG(4));
			COPY(ARG(2), ARG(0));
			COPY(ARG(3), &mv_buf[0]);
			COPY(ARG(4), &mv_buf[1]);
			mv_count = 3;
		}
		else
		{
			COPY(ARG(0), ARG(2));
			COPY(ARG(2), ARG(3));
			COPY(GET_CDR(ARG(3)), ARG(3));
			if(CL_CONSP(ARG(3)))
			{
				COPY(GET_CDR(ARG(3)), ARG(0));
			}
			else
			{
				if(CL_TRUEP(ARG(3)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(4));	/* ~a is not a list */
					COPY(ARG(3), ARG(5));
					Ferror(ARG(4), 2);
				}
				else
				{
					COPY(ARG(3), ARG(0));
				}
			}
			goto M1_1;
		}
	}
	goto RETURN1;
	RETURN1:;
}
コード例 #26
0
ファイル: member1.c プロジェクト: hoelzl/Clicc
void member1(CL_FORM *base)
{
	GEN_HEAPVAR(ARG(3), ARG(5));
	if(CL_TRUEP(ARG(2)))
	{
	}
	else
	{
		if(CL_TRUEP(INDIRECT(ARG(3))))
		{
			GEN_CLOSURE(array, ARG(5), 4, Z11_lambda, -1);
			COPY(ARG(3), &array[3]);
			LOAD_CLOSURE(array, ARG(5));
			COPY(ARG(5), ARG(2));
		}
		else
		{
			GEN_STATIC_GLOBAL_FUNARG(extern_closure, Feql, 2);
			LOAD_GLOBFUN(&extern_closure, ARG(2));
		}
	}
	COPY(ARG(1), ARG(5));
	M1_1:;
	if(CL_TRUEP(ARG(5)))
	{
		COPY(ARG(2), ARG(6));
		COPY(ARG(0), ARG(7));
		if(CL_TRUEP(ARG(4)))
		{
			COPY(ARG(4), ARG(8));
			if(CL_CONSP(ARG(5)))
			{
				COPY(GET_CAR(ARG(5)), ARG(9));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(9));	/* ~a is not a list */
				COPY(ARG(5), ARG(10));
				Ferror(ARG(9), 2);
			}
			Ffuncall(ARG(8), 2);
			mv_count = 1;
		}
		else
		{
			if(CL_CONSP(ARG(5)))
			{
				COPY(GET_CAR(ARG(5)), ARG(8));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(8));	/* ~a is not a list */
				COPY(ARG(5), ARG(9));
				Ferror(ARG(8), 2);
			}
		}
		Ffuncall(ARG(6), 3);
		mv_count = 1;
		if(CL_TRUEP(ARG(6)))
		{
			COPY(ARG(5), ARG(0));
		}
		else
		{
			COPY(ARG(5), ARG(6));
			COPY(ARG(6), ARG(7));
			if(CL_CONSP(ARG(7)))
			{
				COPY(GET_CDR(ARG(7)), ARG(5));
			}
			else
			{
				if(CL_TRUEP(ARG(7)))
				{
					LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(5));	/* ~a is not a list */
					COPY(ARG(7), ARG(6));
					Ferror(ARG(5), 2);
				}
				else
				{
					COPY(ARG(7), ARG(5));
				}
			}
			goto M1_1;
		}
	}
	else
	{
		LOAD_NIL(ARG(0));
	}
	goto RETURN1;
	RETURN1:;
}
コード例 #27
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));
	}
}
コード例 #28
0
ファイル: eval_feature.c プロジェクト: hoelzl/Clicc
void eval_feature(CL_FORM *base)
{
	if(CL_ATOMP(ARG(0)))
	{
		COPY(SYMVAL(Slisp, 419), ARG(1));	/* *FEATURES* */
		LOAD_NIL(ARG(2));
		LOAD_NIL(ARG(3));
		LOAD_NIL(ARG(4));
		member1(ARG(0));
	}
	else
	{
		COPY(GET_CAR(ARG(0)), ARG(1));
		if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 396))	/* NOT */
		{
			COPY(GET_CDR(ARG(0)), 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[264], ARG(3));	/* ~a is not a list */
					COPY(ARG(2), ARG(4));
					Ferror(ARG(3), 2);
				}
				else
				{
				}
			}
			eval_feature(ARG(2));
			if(CL_TRUEP(ARG(2)))
			{
				LOAD_NIL(ARG(0));
			}
			else
			{
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
			}
		}
		else
		{
			if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 466))	/* AND */
			{
				LOAD_NIL(ARG(2));
				COPY(GET_CDR(ARG(0)), ARG(3));
				M1_1:;
				if(CL_ATOMP(ARG(3)))
				{
					LOAD_NIL(ARG(2));
					goto RETURN2;
				}
				COPY(ARG(3), ARG(4));
				COPY(GET_CAR(ARG(4)), ARG(2));
				COPY(ARG(2), ARG(4));
				eval_feature(ARG(4));
				if(CL_TRUEP(ARG(4)))
				{
				}
				else
				{
					LOAD_NIL(ARG(0));
					goto RETURN1;
				}
				COPY(ARG(3), ARG(4));
				COPY(GET_CDR(ARG(4)), ARG(3));
				goto M1_1;
				RETURN2:;
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
			}
			else
			{
				if(CL_SYMBOLP(ARG(1)) && GET_SYMBOL(ARG(1)) == SYMBOL(Slisp, 467))	/* OR */
				{
					LOAD_NIL(ARG(2));
					COPY(GET_CDR(ARG(0)), ARG(3));
					M2_1:;
					if(CL_ATOMP(ARG(3)))
					{
						LOAD_NIL(ARG(2));
						COPY(ARG(2), ARG(0));
						goto RETURN3;
					}
					COPY(ARG(3), ARG(4));
					COPY(GET_CAR(ARG(4)), ARG(2));
					COPY(ARG(2), ARG(4));
					eval_feature(ARG(4));
					if(CL_TRUEP(ARG(4)))
					{
						LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
						goto RETURN1;
					}
					COPY(ARG(3), ARG(4));
					COPY(GET_CDR(ARG(4)), ARG(3));
					goto M2_1;
					RETURN3:;
				}
				else
				{
					LOAD_SMSTR((CL_FORM *)&Keval_feature[0], ARG(2));	/* illegal feature expression ~s */
					COPY(ARG(0), ARG(3));
					Ferror(ARG(2), 2);
				}
			}
		}
	}
	RETURN1:;
}
コード例 #29
0
ファイル: lisp94.c プロジェクト: hoelzl/Clicc
void make_dispatch_macro_character1(CL_FORM *base)
{
    LOAD_FIXNUM(ARG(3), 256, ARG(3));
    LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
    LOAD_NIL(ARG(5));
    LOAD_NIL(ARG(6));
    LOAD_NIL(ARG(7));
    LOAD_NIL(ARG(8));
    LOAD_NIL(ARG(9));
    LOAD_FIXNUM(ARG(10), 0, ARG(10));
    LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(11));	/* T */
    LOAD_NIL(ARG(12));
    LOAD_NIL(ARG(13));
    make_array1(ARG(3));
    GEN_HEAPVAR(ARG(3), ARG(4));
    COPY(ARG(2), ARG(4));
    LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(5));	/* READTABLE */
    rt_struct_typep(ARG(4));
    if(CL_TRUEP(ARG(4)))
    {
        COPY(OFFSET(AR_BASE(GET_FORM(ARG(2))), 0 + 1), ARG(4));
    }
    else
    {
        COPY(SYMVAL(Slisp, 352), ARG(4));	/* NO_STRUCT */
        COPY(ARG(2), ARG(5));
        LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(6));	/* READTABLE */
        Ferror(ARG(4), 3);
    }
    if(CL_CHARP(ARG(0)))
    {
    }
    else
    {
        COPY(SYMVAL(Slisp, 58), ARG(5));	/* WRONG_TYPE */
        COPY(ARG(0), ARG(6));
        LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(7));	/* CHARACTER */
        Ferror(ARG(5), 3);
    }
    COPY(ARG(0), ARG(5));
    rt_char_code(ARG(5));
    {
        GEN_CLOSURE(array, ARG(6), 4, Z49_lambda, 2);
        COPY(ARG(3), &array[3]);
        LOAD_CLOSURE(array, ARG(6));
    }
    COPY(ARG(6), ARG(6));
    ALLOC_CONS(ARG(8), ARG(6), ARG(1), ARG(6));
    COPY(ARG(6), ARG(7));
    COPY(ARG(4), ARG(8));
    COPY(ARG(5), ARG(9));
    rt_set_vref(ARG(7));
    COPY(ARG(0), ARG(4));
    COPY(ARG(2), ARG(5));
    LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(6));	/* READTABLE */
    rt_struct_typep(ARG(5));
    if(CL_TRUEP(ARG(5)))
    {
        COPY(OFFSET(AR_BASE(GET_FORM(ARG(2))), 1 + 1), ARG(5));
    }
    else
    {
        COPY(SYMVAL(Slisp, 352), ARG(5));	/* NO_STRUCT */
        COPY(ARG(2), ARG(6));
        LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(7));	/* READTABLE */
        Ferror(ARG(5), 3);
    }
    LOAD_NIL(ARG(6));
    LOAD_NIL(ARG(7));
    LOAD_NIL(ARG(8));
    assoc1(ARG(4));
    if(CL_TRUEP(ARG(4)))
    {
        if(CL_CONSP(ARG(4)))
        {
            COPY(INDIRECT(ARG(3)), GET_CDR(ARG(4)));
        }
        else
        {
            LOAD_SMSTR((CL_FORM *)&KClisp[254], ARG(5));	/* ~a is not a cons */
            COPY(ARG(4), ARG(6));
            Ferror(ARG(5), 2);
        }
    }
    else
    {
        ALLOC_CONS(ARG(7), ARG(0), INDIRECT(ARG(3)), ARG(5));
        COPY(ARG(2), ARG(6));
        LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(7));	/* READTABLE */
        rt_struct_typep(ARG(6));
        if(CL_TRUEP(ARG(6)))
        {
            COPY(OFFSET(AR_BASE(GET_FORM(ARG(2))), 1 + 1), ARG(6));
        }
        else
        {
            COPY(SYMVAL(Slisp, 352), ARG(6));	/* NO_STRUCT */
            COPY(ARG(2), ARG(7));
            LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(8));	/* READTABLE */
            Ferror(ARG(6), 3);
        }
        ALLOC_CONS(ARG(7), ARG(5), ARG(6), ARG(5));
        LOAD_FIXNUM(ARG(6), 1, ARG(6));
        COPY(ARG(2), ARG(7));
        LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(8));	/* READTABLE */
        rt_struct_typep(ARG(7));
        if(CL_TRUEP(ARG(7)))
        {
            COPY(ARG(5), OFFSET(AR_BASE(GET_FORM(ARG(2))), 1 + 1));
        }
        else
        {
            COPY(SYMVAL(Slisp, 352), ARG(7));	/* NO_STRUCT */
            COPY(ARG(2), ARG(8));
            LOAD_SYMBOL(SYMBOL(Slisp, 420), ARG(9));	/* READTABLE */
            Ferror(ARG(7), 3);
        }
    }
    LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
}
コード例 #30
0
ファイル: Flist_length.c プロジェクト: hoelzl/Clicc
void Flist_length(CL_FORM *base)
{
	LOAD_FIXNUM(ARG(1), 0, ARG(1));
	COPY(ARG(0), ARG(2));
	COPY(ARG(0), ARG(3));
	M1_1:;
	if(CL_TRUEP(ARG(2)))
	{
		if(CL_CONSP(ARG(2)))
		{
			goto ELSE1;
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[228], ARG(4));	/* ~a is not a list */
			COPY(ARG(2), ARG(5));
			Ferror(ARG(4), 2);
		}
	}
	else
	{
		goto THEN2;
	}
	{
		THEN2:;
		COPY(ARG(1), ARG(0));
		goto RETURN1;
	}
	ELSE1:;
	if(CL_CONSP(ARG(2)))
	{
		COPY(GET_CAR(ARG(2)), ARG(4));
	}
	else
	{
		if(CL_TRUEP(ARG(2)))
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[264], ARG(4));	/* ~a is not a list */
			COPY(ARG(2), ARG(5));
			Ferror(ARG(4), 2);
		}
		else
		{
			COPY(ARG(2), ARG(4));
		}
	}
	COPY(ARG(2), ARG(5));
	COPY(ARG(5), ARG(6));
	if(CL_CONSP(ARG(6)))
	{
		COPY(GET_CDR(ARG(6)), ARG(2));
	}
	else
	{
		if(CL_TRUEP(ARG(6)))
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(7));	/* ~a is not a list */
			COPY(ARG(6), ARG(8));
			Ferror(ARG(7), 2);
		}
		else
		{
			COPY(ARG(6), ARG(2));
		}
	}
	if(CL_TRUEP(ARG(2)))
	{
		if(CL_CONSP(ARG(2)))
		{
			goto ELSE3;
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[228], ARG(4));	/* ~a is not a list */
			COPY(ARG(2), ARG(5));
			Ferror(ARG(4), 2);
		}
	}
	else
	{
		goto THEN4;
	}
	{
		THEN4:;
		COPY(ARG(1), ARG(0));
		F1plus(ARG(0));
		goto RETURN1;
	}
	ELSE3:;
	if(EQ(ARG(2), ARG(3)))
	{
		LOAD_NIL(ARG(0));
		goto RETURN1;
	}
	COPY(ARG(1), ARG(4));
	LOAD_FIXNUM(ARG(5), 2, ARG(5));
	Fplus(ARG(4), 2);
	COPY(ARG(2), ARG(5));
	if(CL_CONSP(ARG(5)))
	{
		COPY(GET_CDR(ARG(5)), ARG(5));
	}
	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(3), ARG(6));
	if(CL_CONSP(ARG(6)))
	{
		COPY(GET_CDR(ARG(6)), ARG(3));
	}
	else
	{
		if(CL_TRUEP(ARG(6)))
		{
			LOAD_SMSTR((CL_FORM *)&KClisp[262], ARG(7));	/* ~a is not a list */
			COPY(ARG(6), ARG(8));
			Ferror(ARG(7), 2);
		}
		else
		{
			COPY(ARG(6), ARG(3));
		}
	}
	COPY(ARG(5), ARG(2));
	COPY(ARG(4), ARG(1));
	goto M1_1;
	RETURN1:;
}