Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50325/tnlow.bli
There are no other files named tnlow.bli in the archive.
! File:   TNLOW.BLI
!
!    This work was supported by the Advanced Research
!    Projects Agency of the Office of the Secretary of
!    Defense (F44620-73-C-0074) and is monitored by the
!    Air Force Office of Scientific Research.

MODULE TNLOSG(TIMER=EXTERNAL(SIX12))=
BEGIN
!
!	THIS MODULE CONTAINS ROUTINES RELATING TO TEMPORARY
!	NAMES THAT ARE USED BY OTHER PARTS OF THE COMPILER.
!
REQUIRE COMMON.BEG;
REQUIRE GTST.BEG;
REQUIRE GTX.BEG;
REQUIRE FLOW.BEG;
REQUIRE DTC.BEG;
REQUIRE TN.BEG;

BEGIN

    STRUCTURE TNLSTHDR[I,J,K,L]=.TNLSTHDR<.K,.L>;

    EXTERNAL
	TNLSTHDR TNCHAIN;

    BIND TNSIZE=6;	! SIZE OF TEMP NAME CELL

    GLOBAL ROUTINE TNREP(TN)=
	BEGIN
	REGISTER TNREPR T;
	T_GETSPACE(GT,2);
	T[TNPTR]_.TN;
	T[RLINK]_T[LLINK]_.T[BASE]
	END;

    GLOBAL ROUTINE RELTNREPLST(LST)=
	BEGIN MAP TNREPR LST;
	UNTIL EMPTY(.LST) DO
		RELEASESPACE(GT,DELINK(.LST[RLINK]),2)
	END;

    GLOBAL ROUTINE GETTN=
	BEGIN REGISTER GTVEC T;
	T_GETSPACE(GT,TNSIZE);
	T[LDF]_-1;
	T[TYPEF]_TEMPNAMET;
	T[LONFU]_T[FONFU]_-1;	! 
	LINK(TNREP(.T),TNCHAIN);
	.T
	END;

BEGIN		! FOR DECLARATIONS BELOW

REQUIRE TRY.BEG;	! NEED THIS FOR STRUCTURES ETC. BELOW

    GLOBAL ROUTINE RELALLTNS=
	BEGIN
	MACRO RELEASESTK(STK)=
	    DECR I FROM .STK[MAXD] TO 0 DO RELTNREPLST(STK[LSELEM(.I)]<0,0>);
	    RELEASESPACE(GT,.STK,STKSIZE)$,
	      CL(X)=(MAP STVEC X; X[REGF]_0)$;
	LOCAL TNREPR L;

	DECR I FROM 5 TO 0 DO RELTNREPLST(REGS[.I]<0,0>);
	RELEASESTK(STEMPS);
	RELEASESTK(DTEMPS);
	UNTIL EMPTY(.TNCHAIN) DO
	    BEGIN
	    L_.TNCHAIN[RLINK];
	    RELEASESPACE(GT,.L[TNPTR],TNSIZE);
	    RELEASESPACE(GT,DELINK(.L),2)
	    END;
	CL(PCREG);
	CL(SPREG);
	CL(VVREG);
	CL(RR0);
	CL(RR1);
	CL(RR2);
	CL(RR3);
	CL(RR4);
	CL(RR5);
	END;

END		! OF DECLARATION BLOCK


END
END
ELUDOM