Ejemplo n.º 1
0
Archivo: pvref.c Proyecto: hoelzl/Clicc
void pvref(CL_FORM *base)
{
	if(CL_FIXNUMP(ARG(1)))
	{
		LOAD_FIXNUM(ARG(2), 0, ARG(2));
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		F1minus(ARG(4));
		Fle(ARG(2), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(2)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(2));	/* OUT_OF_RANGE */
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		Ferror(ARG(2), 3);
	}
	rt_pvref(ARG(0));
}
Ejemplo n.º 2
0
void radix_reader(CL_FORM *base)
{
	if(CL_TRUEP(SYMVAL(Slisp, 418)))	/* *READ-SUPPRESS* */
	{
		COPY(ARG(0), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
		LOAD_NIL(ARG(5));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
		read_char1(ARG(3));
		COPY(ARG(0), ARG(4));
		COPY(ARG(3), ARG(5));
		read_token(ARG(4));
		LOAD_NIL(ARG(0));
	}
	else
	{
		if(CL_TRUEP(ARG(2)))
		{
			LOAD_FIXNUM(ARG(3), 2, ARG(3));
			COPY(ARG(2), ARG(4));
			LOAD_FIXNUM(ARG(5), 36, ARG(5));
			Fle(ARG(3), 3);
			if(CL_TRUEP(ARG(3)))
			{
				COPY(ARG(2), ARG(3));
				BIND_SPECIAL(SYMBOL(Slisp, 417), ARG(3));	/* *READ-BASE* */
				COPY(ARG(0), ARG(3));
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
				LOAD_NIL(ARG(5));
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
				read1(ARG(3));
				RESTORE_SPECIAL;
				if(CL_FIXNUMP(ARG(3)))
				{
				}
				else
				{
					LOAD_SMSTR((CL_FORM *)&Kradix_reader[0], ARG(4));	/* #~A (base ~D) value is not a rational: ~S. */
					COPY(ARG(1), ARG(5));
					COPY(ARG(2), ARG(6));
					COPY(ARG(3), ARG(7));
					Ferror(ARG(4), 4);
				}
				COPY(ARG(3), ARG(0));
			}
			else
			{
				LOAD_SMSTR((CL_FORM *)&Kradix_reader[2], ARG(0));	/* Illegal radix for #R: ~D. */
				COPY(ARG(2), ARG(1));
				Ferror(ARG(0), 2);
			}
		}
		else
		{
			LOAD_SMSTR((CL_FORM *)&Kradix_reader[4], ARG(0));	/* Radix missing in #R. */
			Ferror(ARG(0), 1);
		}
	}
}
Ejemplo n.º 3
0
void rt_charLE(CL_FORM *base)
{
	COPY(ARG(0), ARG(2));
	Fchar_code(ARG(2));
	COPY(ARG(1), ARG(3));
	Fchar_code(ARG(3));
	Fle(ARG(2), 2);
	COPY(ARG(2), ARG(0));
}
Ejemplo n.º 4
0
void comma_reader(CL_FORM *base)
{
	COPY(SYMVAL(Slisp, 447), ARG(2));	/* *BQ-LEVEL* */
	LOAD_FIXNUM(ARG(3), 0, ARG(3));
	Fle(ARG(2), 2);
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_SMSTR((CL_FORM *)&Kcomma_reader[0], ARG(2));	/* A comma appeared outside of a backquote */
		Ferror(ARG(2), 1);
	}
	COPY(SYMVAL(Slisp, 447), ARG(2));	/* *BQ-LEVEL* */
	F1minus(ARG(2));
	COPY(ARG(2), SYMVAL(Slisp, 447));	/* *BQ-LEVEL* */
	LOAD_NIL(ARG(2));
	COPY(ARG(0), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
	LOAD_NIL(ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
	peek_char1(ARG(2));
	if(CL_CHARP(ARG(2)) && GET_CHAR(ARG(2)) == '@')
	{
		COPY(ARG(0), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
		LOAD_NIL(ARG(5));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
		read_char1(ARG(3));
		COPY(SYMVAL(Slisp, 437), ARG(2));	/* *COMMA-ATSIGN* */
	}
	else
	{
		if(CL_CHARP(ARG(2)) && GET_CHAR(ARG(2)) == '.')
		{
			COPY(ARG(0), ARG(3));
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
			LOAD_NIL(ARG(5));
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
			read_char1(ARG(3));
			COPY(SYMVAL(Slisp, 438), ARG(2));	/* *COMMA-DOT* */
		}
		else
		{
			COPY(SYMVAL(Slisp, 436), ARG(2));	/* *COMMA* */
		}
	}
	COPY(ARG(0), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
	LOAD_NIL(ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
	internal_read(ARG(3));
	ALLOC_CONS(ARG(4), ARG(2), ARG(3), ARG(2));
	COPY(SYMVAL(Slisp, 447), ARG(3));	/* *BQ-LEVEL* */
	F1plus(ARG(3));
	COPY(ARG(3), SYMVAL(Slisp, 447));	/* *BQ-LEVEL* */
	COPY(ARG(2), ARG(0));
}
Ejemplo n.º 5
0
static void Z69_lambda(CL_FORM *base)
{
	COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(2));
	COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(3));
	Fle(ARG(2), 2);
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_SMSTR((CL_FORM *)&Kmake_string_input_stream1[0], ARG(2));	/* reached start of stream */
		Ferror(ARG(2), 1);
	}
	COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(2));
	F1minus(ARG(2));
	COPY(ARG(2), INDIRECT(GET_FORM(ARG(0)) + 5));
	COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
	Fstringp(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(3));	/* WRONG_TYPE */
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(4));
		LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(5));	/* STRING */
		Ferror(ARG(3), 3);
	}
	COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(3));
	COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(4));
	Frow_major_aref(ARG(3));
	if(EQL(ARG(1), ARG(3)))
	{
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&Kmake_string_input_stream1[2], ARG(2));	/* %s should be eql to %s */
		COPY(ARG(1), ARG(3));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(4));
		Fstringp(ARG(4));
		if(CL_TRUEP(ARG(4)))
		{
		}
		else
		{
			COPY(SYMVAL(Slisp, 58), ARG(4));	/* WRONG_TYPE */
			COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(5));
			LOAD_SYMBOL(SYMBOL(Slisp, 44), ARG(6));	/* STRING */
			Ferror(ARG(4), 3);
		}
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(4));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 5), ARG(5));
		Frow_major_aref(ARG(4));
		Ferror(ARG(2), 3);
	}
	LOAD_NIL(ARG(0));
}
Ejemplo n.º 6
0
static void Z67_lambda(CL_FORM *base)
{
	COPY(ARG(1), ARG(2));
	COPY(INDIRECT(GET_FORM(ARG(0)) + 4), ARG(3));
	Fle(ARG(2), 2);
	if(CL_TRUEP(ARG(2)))
	{
		COPY(ARG(1), INDIRECT(GET_FORM(ARG(0)) + 3));
		COPY(INDIRECT(GET_FORM(ARG(0)) + 3), ARG(0));
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&Kmake_string_input_stream1[4], ARG(2));	/* illegal position */
		Ferror(ARG(2), 1);
	}
}
Ejemplo n.º 7
0
void set_pvref(CL_FORM *base)
{
	if(CL_FIXNUMP(ARG(2)))
	{
		LOAD_FIXNUM(ARG(3), 0, ARG(3));
		COPY(ARG(2), ARG(4));
		LOAD_FIXNUM(ARG(6), AR_SIZE(GET_FORM(ARG(1))), ARG(5));
		F1minus(ARG(5));
		Fle(ARG(3), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(3));	/* OUT_OF_RANGE */
		COPY(ARG(2), ARG(4));
		LOAD_FIXNUM(ARG(6), AR_SIZE(GET_FORM(ARG(1))), ARG(5));
		Ferror(ARG(3), 3);
	}
	COPY(ARG(0), ARG(3));
	COPY(ARG(1), ARG(4));
	rt_plain_vector_element_code(ARG(4));
	type_code_p(ARG(3));
	if(CL_TRUEP(ARG(3)))
	{
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&Kset_pvref[0], ARG(3));	/* Can't store ~A in a vector of type ~A */
		COPY(ARG(0), ARG(4));
		COPY(ARG(1), ARG(5));
		rt_plain_vector_element_code(ARG(5));
		Ferror(ARG(3), 3);
	}
	rt_set_pvref(ARG(0));
}
Ejemplo n.º 8
0
void Fsvref(CL_FORM *base)
{
	if(CL_SMVEC_T_P(ARG(0)))
	{
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(2));	/* WRONG_TYPE */
		COPY(ARG(0), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 41), ARG(4));	/* SIMPLE-VECTOR */
		Ferror(ARG(2), 3);
	}
	if(CL_FIXNUMP(ARG(1)))
	{
		LOAD_FIXNUM(ARG(2), 0, ARG(2));
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		F1minus(ARG(4));
		Fle(ARG(2), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(2)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(2));	/* OUT_OF_RANGE */
		COPY(ARG(1), ARG(3));
		LOAD_FIXNUM(ARG(5), AR_SIZE(GET_FORM(ARG(0))), ARG(4));
		Ferror(ARG(2), 3);
	}
	COPY(OFFSET(AR_BASE(GET_FORM(ARG(0))), GET_FIXNUM(ARG(1))), ARG(0));
}
Ejemplo n.º 9
0
void FcharG(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));
		Fle(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:;
}
Ejemplo n.º 10
0
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));
		}
	}
}
Ejemplo n.º 11
0
void quick_sort(CL_FORM *base)
{
    LOAD_FIXNUM(ARG(5), 0, ARG(5));
    LOAD_FIXNUM(ARG(6), 0, ARG(6));
    COPY(ARG(2), ARG(7));
    COPY(ARG(1), ARG(8));
    F1plus(ARG(8));
    Fle(ARG(7), 2);
    if(CL_TRUEP(ARG(7)))
    {
        goto RETURN1;
    }
    COPY(ARG(1), ARG(5));
    COPY(ARG(2), ARG(6));
    F1minus(ARG(6));
    COPY(ARG(0), ARG(7));
    COPY(ARG(1), ARG(8));
    Felt(ARG(7));
M1_1:
    ;
    COPY(ARG(5), ARG(8));
    COPY(ARG(6), ARG(9));
    Fgt(ARG(8), 2);
    if(CL_TRUEP(ARG(8)))
    {
        goto RETURN2;
    }
M2_1:
    ;
    COPY(ARG(5), ARG(8));
    COPY(ARG(6), ARG(9));
    Fgt(ARG(8), 2);
    if(CL_TRUEP(ARG(8)))
    {
        goto THEN1;
    }
    else
    {
        COPY(ARG(3), ARG(9));
        COPY(ARG(4), ARG(10));
        COPY(ARG(0), ARG(11));
        COPY(ARG(6), ARG(12));
        Felt(ARG(11));
        Ffuncall(ARG(10), 2);
        mv_count = 1;
        COPY(ARG(4), ARG(11));
        COPY(ARG(7), ARG(12));
        Ffuncall(ARG(11), 2);
        mv_count = 1;
        Ffuncall(ARG(9), 3);
        mv_count = 1;
    }
    if(CL_TRUEP(ARG(9)))
    {
THEN1:
        ;
        goto RETURN3;
    }
    F1minus(ARG(6));
    goto M2_1;
RETURN3:
    ;
    COPY(ARG(6), ARG(8));
    COPY(ARG(1), ARG(9));
    Flt(ARG(8), 2);
    if(CL_TRUEP(ARG(8)))
    {
        COPY(ARG(0), ARG(8));
        COPY(ARG(1), ARG(9));
        F1plus(ARG(9));
        COPY(ARG(2), ARG(10));
        COPY(ARG(3), ARG(11));
        COPY(ARG(4), ARG(12));
        quick_sort(ARG(8));
        goto RETURN1;
    }
M3_1:
    ;
    COPY(ARG(5), ARG(8));
    COPY(ARG(6), ARG(9));
    Fgt(ARG(8), 2);
    if(CL_TRUEP(ARG(8)))
    {
        goto THEN2;
    }
    else
    {
        COPY(ARG(3), ARG(9));
        COPY(ARG(4), ARG(10));
        COPY(ARG(0), ARG(11));
        COPY(ARG(5), ARG(12));
        Felt(ARG(11));
        Ffuncall(ARG(10), 2);
        mv_count = 1;
        COPY(ARG(4), ARG(11));
        COPY(ARG(7), ARG(12));
        Ffuncall(ARG(11), 2);
        mv_count = 1;
        Ffuncall(ARG(9), 3);
        mv_count = 1;
        if(CL_TRUEP(ARG(9)))
        {
            goto ELSE3;
        }
        else
        {
            goto THEN2;
        }
    }
    {
THEN2:
        ;
        goto RETURN4;
    }
ELSE3:
    ;
    F1plus(ARG(5));
    goto M3_1;
RETURN4:
    ;
    COPY(ARG(5), ARG(8));
    COPY(ARG(6), ARG(9));
    Fgt(ARG(8), 2);
    if(CL_TRUEP(ARG(8)))
    {
        goto RETURN2;
    }
    COPY(ARG(0), ARG(8));
    COPY(ARG(5), ARG(9));
    Felt(ARG(8));
    COPY(ARG(0), ARG(9));
    COPY(ARG(6), ARG(10));
    Felt(ARG(9));
    COPY(ARG(0), ARG(10));
    COPY(ARG(5), ARG(11));
    Fset_elt(ARG(9));
    COPY(ARG(8), ARG(9));
    COPY(ARG(0), ARG(10));
    COPY(ARG(6), ARG(11));
    Fset_elt(ARG(9));
    F1plus(ARG(5));
    F1minus(ARG(6));
    goto M1_1;
RETURN2:
    ;
    COPY(ARG(0), ARG(7));
    COPY(ARG(1), ARG(8));
    COPY(ARG(5), ARG(9));
    COPY(ARG(3), ARG(10));
    COPY(ARG(4), ARG(11));
    quick_sort(ARG(7));
    COPY(ARG(0), ARG(7));
    COPY(ARG(5), ARG(8));
    COPY(ARG(2), ARG(9));
    COPY(ARG(3), ARG(10));
    COPY(ARG(4), ARG(11));
    quick_sort(ARG(7));
RETURN1:
    ;
}
Ejemplo n.º 12
0
void string_capitalize1(CL_FORM *base)
{
	COPY(ARG(0), ARG(3));
	Fstring(ARG(3));
	COPY(ARG(3), ARG(0));
	COPY(ARG(1), ARG(3));
	COPY(ARG(2), ARG(4));
	COPY(ARG(0), ARG(5));
	Flength(ARG(5));
	check_seq_start_end(ARG(3));
	COPY(ARG(3), ARG(2));
	COPY(ARG(0), ARG(3));
	COPY(ARG(3), ARG(4));
	COPY(ARG(4), ARG(5));
	LOAD_FIXNUM(ARG(6), 0, ARG(6));
	LOAD_NIL(ARG(7));
	subseq1(ARG(5));
	COPY(ARG(5), ARG(0));
	COPY(ARG(1), ARG(3));
	LOAD_NIL(ARG(4));
	LOAD_NIL(ARG(5));
	M1_1:;
	COPY(ARG(3), ARG(6));
	COPY(ARG(2), ARG(7));
	Fnumeql(ARG(6), 2);
	if(CL_TRUEP(ARG(6)))
	{
		goto RETURN1;
	}
	COPY(ARG(0), ARG(6));
	COPY(ARG(3), ARG(7));
	if(CL_SMSTRP(ARG(6)))
	{
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(8));	/* WRONG_TYPE */
		COPY(ARG(6), ARG(9));
		LOAD_SYMBOL(SYMBOL(Slisp, 40), ARG(10));	/* SIMPLE-STRING */
		Ferror(ARG(8), 3);
	}
	COPY(ARG(6), ARG(8));
	COPY(ARG(7), ARG(9));
	COPY(ARG(9), ARG(10));
	LOAD_FIXNUM(ARG(12), AR_SIZE(GET_FORM(ARG(8))), ARG(11));
	F1minus(ARG(11));
	if(CL_FIXNUMP(ARG(10)))
	{
		LOAD_FIXNUM(ARG(12), 0, ARG(12));
		COPY(ARG(10), ARG(13));
		COPY(ARG(11), ARG(14));
		Fle(ARG(12), 3);
	}
	else
	{
		goto ELSE1;
	}
	if(CL_TRUEP(ARG(12)))
	{
	}
	else
	{
		ELSE1:;
		COPY(SYMVAL(Slisp, 153), ARG(10));	/* OUT_OF_RANGE */
		COPY(ARG(9), ARG(11));
		LOAD_FIXNUM(ARG(13), AR_SIZE(GET_FORM(ARG(8))), ARG(12));
		Ferror(ARG(10), 3);
	}
	COPY(ARG(8), ARG(5));
	COPY(ARG(9), ARG(6));
	rt_pvref(ARG(5));
	if(CL_CHARP(ARG(5)))
	{
		COPY(ARG(5), ARG(6));
	}
	else
	{
		COPY(SYMVAL(Slisp, 58), ARG(6));	/* WRONG_TYPE */
		COPY(ARG(5), ARG(7));
		LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(8));	/* CHARACTER */
		Ferror(ARG(6), 3);
	}
	rt_alpha_char_p(ARG(6));
	if(CL_TRUEP(ARG(6)))
	{
		goto THEN2;
	}
	else
	{
		COPY(ARG(5), ARG(7));
		LOAD_FIXNUM(ARG(8), 10, ARG(8));
		digit_char_p1(ARG(7));
	}
	if(CL_TRUEP(ARG(7)))
	{
		THEN2:;
		if(CL_TRUEP(ARG(4)))
		{
			if(CL_CHARP(ARG(5)))
			{
				COPY(ARG(5), ARG(6));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(6));	/* WRONG_TYPE */
				COPY(ARG(5), ARG(7));
				LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(8));	/* CHARACTER */
				Ferror(ARG(6), 3);
			}
			rt_char_downcase(ARG(6));
		}
		else
		{
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
			if(CL_CHARP(ARG(5)))
			{
				COPY(ARG(5), ARG(6));
			}
			else
			{
				COPY(SYMVAL(Slisp, 58), ARG(6));	/* WRONG_TYPE */
				COPY(ARG(5), ARG(7));
				LOAD_SYMBOL(SYMBOL(Slisp, 18), ARG(8));	/* CHARACTER */
				Ferror(ARG(6), 3);
			}
			rt_char_upcase(ARG(6));
		}
	}
	else
	{
		LOAD_NIL(ARG(4));
		COPY(ARG(5), ARG(6));
	}
	COPY(ARG(6), ARG(7));
	COPY(ARG(0), ARG(8));
	COPY(ARG(3), ARG(9));
	Fset_schar(ARG(7));
	F1plus(ARG(3));
	goto M1_1;
	RETURN1:;
}
Ejemplo n.º 13
0
void Farray_in_bounds_p(CL_FORM *base, int nargs)
{
	CL_FORM *rest_0;
	CL_FORM *local;
	rest_0 = ARG(1);
	local = ARG(nargs);
	COPY(ARG(0), LOCAL(0));
	Farray_rank(LOCAL(0));
	REST_LENGTH(rest_0, LOCAL(1));
	Fnumeql(LOCAL(0), 2);
	if(CL_TRUEP(LOCAL(0)))
	{
	}
	else
	{
		LOAD_SMSTR((CL_FORM *)&KClisp[188], LOCAL(0));	/* Wrong number of subscripts for array ~a */
		COPY(ARG(0), LOCAL(1));
		Ferror(LOCAL(0), 2);
	}
	{
		LOAD_FIXNUM(LOCAL(0), 0, 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));
				LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(0));	/* T */
				goto RETURN1;
			}
			{
				CL_FORM *rest_2;
				rest_2 = rest_1;
				REST_CAR(rest_2, LOCAL(1));
			}
			if(CL_FIXNUMP(LOCAL(1)))
			{
				LOAD_FIXNUM(LOCAL(2), 0, LOCAL(2));
				COPY(LOCAL(1), LOCAL(3));
				COPY(ARG(0), LOCAL(4));
				COPY(LOCAL(0), LOCAL(5));
				Farray_dimension(LOCAL(4));
				F1minus(LOCAL(4));
				Fle(LOCAL(2), 3);
			}
			else
			{
				goto ELSE1;
			}
			if(CL_TRUEP(LOCAL(2)))
			{
			}
			else
			{
				ELSE1:;
				LOAD_NIL(ARG(0));
				goto RETURN1;
			}
			F1plus(LOCAL(0));
			{
				CL_FORM *rest_3;
				rest_3 = rest_1;
				rest_1 = REST_CDR(rest_3);
			}
			goto M1_1;
		}
		RETURN1:;
	}
}
Ejemplo n.º 14
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));
	}
}
Ejemplo n.º 15
0
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));
}
Ejemplo n.º 16
0
void setup_symbol(CL_FORM *base)
{
	LOAD_NIL(STACK(base, 2));
	COPY(STACK(base, 0), STACK(base, 2));
	symbol_package_index(STACK(base, 2));
	if(CL_TRUEP(STACK(base, 2)))
	{
		COPY(STACK(base, 1), STACK(base, 3));
		COPY(STACK(base, 2), STACK(base, 4));
		Fminusp(STACK(base, 4));
		if(CL_TRUEP(STACK(base, 4)))
		{
			COPY(STACK(base, 2), STACK(base, 4));
			Fminus(STACK(base, 4), 1);
		}
		else
		{
			COPY(STACK(base, 2), STACK(base, 4));
		}
		vref(STACK(base, 3));
		COPY(STACK(base, 0), STACK(base, 4));
		Fsymbol_name(STACK(base, 4));
		LOAD_FIXNUM(101, STACK(base, 5));
		string_hash(STACK(base, 4));
		COPY(STACK(base, 3), STACK(base, 5));
		COPY(STACK(base, 0), STACK(base, 6));
		set_symbol_package(STACK(base, 5));
		COPY(STACK(base, 2), STACK(base, 5));
		LOAD_FIXNUM(0, STACK(base, 6));
		Fle(STACK(base, 5), 2);
		if(CL_TRUEP(STACK(base, 5)))
		{
			COPY(STACK(base, 3), STACK(base, 5));
			LOAD_FIXNUM(3, STACK(base, 6));
			LOAD_SYMBOL(SYMBOL(Slisp, 273), STACK(base, 7));	/* PACKAGE */
			struct_ref(STACK(base, 5));
			COPY(STACK(base, 5), STACK(base, 6));
			COPY(STACK(base, 4), STACK(base, 7));
			Fsvref(STACK(base, 6));
			{
				CL_FORM *lptr;
				lptr = form_alloc(STACK(base, 7), 2);
				COPY(STACK(base, 0), CAR(lptr));
				COPY(STACK(base, 6), CDR(lptr));
				LOAD_CONS(lptr, STACK(base, 6));
			}
			COPY(STACK(base, 6), STACK(base, 0));
			COPY(STACK(base, 5), STACK(base, 1));
			COPY(STACK(base, 4), STACK(base, 2));
			Fset_svref(STACK(base, 0));
		}
		else
		{
			COPY(STACK(base, 3), STACK(base, 5));
			LOAD_FIXNUM(2, STACK(base, 6));
			LOAD_SYMBOL(SYMBOL(Slisp, 273), STACK(base, 7));	/* PACKAGE */
			struct_ref(STACK(base, 5));
			COPY(STACK(base, 5), STACK(base, 6));
			COPY(STACK(base, 4), STACK(base, 7));
			Fsvref(STACK(base, 6));
			{
				CL_FORM *lptr;
				lptr = form_alloc(STACK(base, 7), 2);
				COPY(STACK(base, 0), CAR(lptr));
				COPY(STACK(base, 6), CDR(lptr));
				LOAD_CONS(lptr, STACK(base, 6));
			}
			COPY(STACK(base, 6), STACK(base, 0));
			COPY(STACK(base, 5), STACK(base, 1));
			COPY(STACK(base, 4), STACK(base, 2));
			Fset_svref(STACK(base, 0));
		}
	}
	else
	{
		LOAD_NIL(STACK(base, 0));
	}
}