예제 #1
0
파일: phase.c 프로젝트: dokterp/aldor
local void
phPrintLibStats(LibStats stats)
{
	int	i;

	if (stats) {
		fprintf(osStdout, " Lib%8d bytes, ", (int) stats->libSize);
		for (i = LIB_NAME_START; i < LIB_NAME_LIMIT; i++)
			if (stats->sectSize[i] != 0) {
				fprintf(osStdout, " %d%s",
					(int) stats->sectSize[i],
					libSectInfo(i).abbrev);
			}
		fprintf(osStdout, "\n");
	}
}
예제 #2
0
파일: axlcomp.c 프로젝트: nilqed/aldor
void
compInfoAudit(void)
{
#if !defined(NDEBUG)
	int	i;

	for (i = 0; i < OB_LIMIT; i++)
		if (obInfo[i].code != i)
			bug("obInfo is badly initialized at %d.", i);
	compInfoByteLimit(OB_LIMIT, "OB_LIMIT");

	for (i = 0; i < PH_LIMIT; i++)
		if (phInfo[i].phno != i)
			bug("phInfo is badly initialized at %d.", i);
	compInfoByteLimit(PH_LIMIT, "PH_LIMIT");

	for (i = TK_START; i < TK_LIMIT; i++)
		if (tokInfo(i).tag != i)
			bug("tokInfo is badly initialized at %d.", i);
	compInfoByteLimit(TK_LIMIT, "TK_LIMIT");

	for (i = AB_START; i < AB_LIMIT; i++)
		if (abInfo(i).tag != i)
			bug("abInfo is badly initialized at %d.", i);
	compInfoByteLimit(AB_LIMIT, "AB_LIMIT");

	for (i = TF_START; i < TF_LIMIT; i++)
		if (tformInfo(i).tag != i)
			bug("tformInfo is badly initialized at %d.", i);
	compInfoByteLimit(TF_LIMIT, "TF_LIMIT");

	for (i = 0; i < SYME_LIMIT; i++)
		if (symeInfo[i].kind != i)
			bug("symeInfo is badly initialized at %d.", i);
	compInfoByteLimit(SYME_LIMIT, "SYME_LIMIT");

	for (i = FOAM_START; i < FOAM_LIMIT; i++)
		if (foamInfo(i).tag != i)
			bug("foamInfo is badly initialized at %s = %d.",
			    foamStr(i), i);
	compInfoByteLimit(foamTagLimit(), "foamTagLimit()");

	for (i = LIB_NAME_START; i < LIB_NAME_LIMIT; i++)
		if (libSectInfo(i).tag != i)
			bug("libSectInfo is badly initialized at %s = %d.",
			    libSectInfo(i).str, i);
	compInfoByteLimit(LIB_NAME_LIMIT, "LIB_NAME_LIMIT");

	for (i = FOAM_BVAL_START; i < FOAM_BVAL_LIMIT; i++)
		if (foamBValInfo(i).tag != i)
			bug("foamBValInfo is badly initialized at %s = %d.",
			    foamBValStr(i), i);
#if SMALL_BVAL_TAGS
	compInfoByteLimit(FOAM_BVAL_LIMIT, "FOAM_BVAL_LIMIT");
#endif

	for (i = FOAM_PROTO_START; i < FOAM_PROTO_LIMIT; i++)
		if (foamProtoInfo(i).tag != i)
			bug("foamProtoInfo is badly initialized at %s = %d.",
			    foamProtoStr(i), i);
	compInfoByteLimit(FOAM_PROTO_LIMIT, "FOAM_PROTO_LIMIT");

	for (i = CCO_START; i < CCO_LIMIT; i++)
		if (ccoInfo(i).tag != i)
			bug("ccoInfo is badly initialized at %d.", i);
	compInfoByteLimit(CCO_LIMIT, "CCO_LIMIT");
#endif
}